diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index a207de0..cb2a696 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -37,6 +37,14 @@ updates:
major-updates:
update-types:
- "major"
+ ignore:
+ # typescript-eslint declares `typescript: >=4.8.4 <6.1.0`, and TypeScript 7
+ # removed `ts.Extension`, which @typescript-eslint/typescript-estree reads
+ # at import time. Bumping to 7 makes `eslint .` fail to load its own config,
+ # so `npm run lint` cannot run at all. Drop this once typescript-eslint
+ # supports TypeScript 7.
+ - dependency-name: "typescript"
+ update-types: ["version-update:semver-major"]
# Docker base images (docker/Dockerfile + docker-compose / compose-dev)
- package-ecosystem: "docker"
diff --git a/.github/workflows/beta-release.yml b/.github/workflows/beta-release.yml
index 4f18967..bf771ed 100644
--- a/.github/workflows/beta-release.yml
+++ b/.github/workflows/beta-release.yml
@@ -28,7 +28,7 @@ jobs:
fetch-depth: 1
- name: Setup Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
@@ -67,7 +67,7 @@ jobs:
fetch-depth: 1
- name: Setup Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
cache: "npm"
@@ -78,11 +78,8 @@ jobs:
- name: Run ESLint
run: npx eslint .
- - name: Run Prettier check
- run: npx prettier --check .
-
- name: Type check
- run: npx tsc --noEmit
+ run: npm run type-check
- name: Run unit tests
run: npm run test
@@ -121,7 +118,7 @@ jobs:
CHANGES=$(git log --oneline --no-merges "${{ steps.prev.outputs.sha }}..${{ needs.prep.outputs.sha }}" -- . ':!package-lock.json' | sed 's/^/- /')
fi
if [ -z "$CHANGES" ]; then
- CHANGES="- No new commits since the last beta (or this is the first beta build)."
+ CHANGES="- No new commits since the last beta."
fi
cat > BETA_RELEASE_BODY.md << EOF
@@ -157,7 +154,7 @@ jobs:
docker:
needs: [prep, verify, create-release]
- if: ${{ always() && needs.prep.outputs.dev_branch != '' && (needs.create-release.result == 'success' || needs.create-release.result == 'skipped') }}
+ if: ${{ always() && needs.prep.outputs.dev_branch != '' && needs.verify.result == 'success' && (needs.create-release.result == 'success' || needs.create-release.result == 'skipped') }}
uses: ./.github/workflows/docker.yml
with:
version: ${{ needs.prep.outputs.beta_version }}
diff --git a/.github/workflows/crowdin-sync.yml b/.github/workflows/crowdin-sync.yml
new file mode 100644
index 0000000..2a63ea1
--- /dev/null
+++ b/.github/workflows/crowdin-sync.yml
@@ -0,0 +1,83 @@
+name: Crowdin Sync
+
+on:
+ schedule:
+ - cron: "0 6 * * *"
+ workflow_dispatch:
+ inputs:
+ branch:
+ description: "Branch to sync translations into"
+ required: false
+ type: string
+
+permissions:
+ contents: write
+
+jobs:
+ crowdin:
+ runs-on: blacksmith-2vcpu-ubuntu-2404
+ steps:
+ - name: Resolve target branch
+ id: branch
+ run: |
+ BRANCH="${{ inputs.branch }}"
+ if [ -z "$BRANCH" ]; then
+ BRANCH="${{ github.event.repository.default_branch }}"
+ fi
+ echo "name=$BRANCH" >> "$GITHUB_OUTPUT"
+
+ - name: Checkout branch
+ uses: actions/checkout@v7
+ with:
+ ref: ${{ steps.branch.outputs.name }}
+ fetch-depth: 0
+ token: ${{ secrets.GHCR_TOKEN }}
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v7
+ with:
+ node-version-file: ".nvmrc"
+
+ - name: Upload sources to Crowdin
+ uses: crowdin/github-action@v2
+ with:
+ upload_sources: true
+ upload_translations: false
+ download_translations: false
+ create_pull_request: false
+ push_translations: false
+ token: ${{ secrets.CROWDIN_API_KEY }}
+ project_id: "858252"
+ env:
+ CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_KEY }}
+
+ - name: Machine pre-translate untranslated strings
+ env:
+ CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
+ run: node scripts/crowdin-pretranslate.cjs
+
+ - name: Download translations from Crowdin
+ uses: crowdin/github-action@v2
+ with:
+ upload_sources: false
+ upload_translations: false
+ download_translations: true
+ create_pull_request: false
+ push_translations: false
+ token: ${{ secrets.CROWDIN_API_KEY }}
+ project_id: "858252"
+ env:
+ CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_KEY }}
+
+ - name: Commit translations
+ run: |
+ git config user.name "LukeGus"
+ git config user.email "bugattiguy527@gmail.com"
+
+ git add src/ui/locales/translated
+ if git diff --cached --quiet; then
+ echo "No translation changes to commit."
+ exit 0
+ fi
+ git commit -m "chore: sync Crowdin translations"
+ git push origin HEAD:"${{ steps.branch.outputs.name }}"
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 4b5ae3f..109e7a4 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -43,6 +43,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
+ timeout-minutes: 20
permissions:
contents: read
packages: write
diff --git a/.github/workflows/electron.yml b/.github/workflows/electron.yml
index 324cc50..27b1a4f 100644
--- a/.github/workflows/electron.yml
+++ b/.github/workflows/electron.yml
@@ -72,11 +72,48 @@ jobs:
fetch-depth: 1
- name: Setup Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
cache: "npm"
+ - name: Install Spectre-mitigated MSVC libraries
+ shell: pwsh
+ run: |
+ # node-pty's binding.gyp sets SpectreMitigation, so MSBuild refuses to
+ # build without these. They are not on the runner image by default.
+ $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
+ $installPath = & $vswhere -latest -products * -property installationPath
+ if (-not $installPath) { throw "Visual Studio installation not found" }
+
+ # Derive the toolset version from the installed MSVC so the component
+ # id keeps matching when the runner image bumps the compiler.
+ $toolsetDir = Get-ChildItem -Path "$installPath\VC\Tools\MSVC" -Directory |
+ Sort-Object Name -Descending | Select-Object -First 1
+ if (-not $toolsetDir) { throw "No MSVC toolset found under $installPath" }
+ $parts = $toolsetDir.Name.Split(".")
+ $shortVer = "$($parts[0]).$($parts[1].Substring(0,2))"
+ Write-Host "MSVC toolset $($toolsetDir.Name) -> component version $shortVer"
+
+ $installer = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe"
+ $components = @(
+ "Microsoft.VisualStudio.Component.VC.$shortVer.17.14.x86.x64.Spectre",
+ "Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre"
+ )
+ $args = @("modify", "--installPath", "`"$installPath`"", "--quiet", "--norestart", "--nocache")
+ foreach ($c in $components) { $args += @("--add", $c) }
+
+ Write-Host "Installing: $($components -join ', ')"
+ $proc = Start-Process -FilePath $installer -ArgumentList $args -Wait -PassThru -NoNewWindow
+ if ($proc.ExitCode -ne 0 -and $proc.ExitCode -ne 3010) {
+ Write-Host "vs_installer exited with $($proc.ExitCode); verifying libraries anyway"
+ }
+
+ $found = Get-ChildItem -Path "$installPath\VC\Tools\MSVC" -Recurse -Filter "*.lib" -ErrorAction SilentlyContinue |
+ Where-Object { $_.FullName -match "\\spectre\\" } | Select-Object -First 1
+ if (-not $found) { throw "Spectre-mitigated libraries still missing after install" }
+ Write-Host "Spectre libs present: $($found.FullName)"
+
- name: Install dependencies
run: npm ci
@@ -166,7 +203,7 @@ jobs:
fetch-depth: 1
- name: Setup Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
cache: "npm"
@@ -380,7 +417,7 @@ jobs:
fetch-depth: 1
- name: Setup Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
cache: "npm"
@@ -559,7 +596,7 @@ jobs:
CHECKSUM=$(shasum -a 256 "$DMG_PATH" | awk '{print $1}')
mkdir -p homebrew-generated
- cp packaging/Casks/termix.rb homebrew-generated/termix.rb
+ cp Casks/termix.rb homebrew-generated/termix.rb
sed -i '' "s/VERSION_PLACEHOLDER/$VERSION/g" homebrew-generated/termix.rb
sed -i '' "s/CHECKSUM_PLACEHOLDER/$CHECKSUM/g" homebrew-generated/termix.rb
@@ -894,7 +931,7 @@ jobs:
mkdir -p homebrew-submission/Casks/t
- cp packaging/Casks/termix.rb homebrew-submission/Casks/t/termix.rb
+ cp Casks/termix.rb homebrew-submission/Casks/t/termix.rb
sed -i '' "s/VERSION_PLACEHOLDER/$VERSION/g" homebrew-submission/Casks/t/termix.rb
sed -i '' "s/CHECKSUM_PLACEHOLDER/$CHECKSUM/g" homebrew-submission/Casks/t/termix.rb
@@ -966,7 +1003,7 @@ jobs:
fetch-depth: 1
- name: Setup Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
cache: "npm"
@@ -1075,13 +1112,21 @@ jobs:
default_platform(:mac)
lane :fetch_build_number do
- number = app_store_build_number(
- live: false,
+ live_number = app_store_build_number(
+ live: true,
+ platform: "osx",
api_key_path: "/tmp/asc_keys/api_key.json",
app_identifier: "com.karmaa.termix",
- version: "$APP_VERSION",
initial_build_number: 0,
)
+ pending_number = app_store_build_number(
+ live: false,
+ platform: "osx",
+ api_key_path: "/tmp/asc_keys/api_key.json",
+ app_identifier: "com.karmaa.termix",
+ initial_build_number: 0,
+ )
+ number = [live_number, pending_number].max
File.write("$OUT_FILE", number.to_s)
end
EOF
@@ -1109,6 +1154,18 @@ jobs:
BUILD_VERSION="${{ steps.build_number.outputs.build_version || github.run_number }}"
npm run build && npx electron-builder --mac mas --universal --config.buildVersion="$BUILD_VERSION"
+ - name: Generate App Store release notes
+ id: asc_notes
+ if: steps.check_certs.outputs.has_certs == 'true' && steps.check_asc_creds.outputs.has_credentials == 'true'
+ run: |
+ META_DIR="$RUNNER_TEMP/asc_metadata"
+ rm -rf "$META_DIR"
+ node scripts/generate-appstore-notes.cjs \
+ --notes RELEASE_NOTES.md \
+ --out-dir "$META_DIR" \
+ --locales "en-US"
+ echo "metadata_path=$META_DIR" >> "$GITHUB_OUTPUT"
+
- name: Upload and submit to Mac App Store
if: steps.check_certs.outputs.has_certs == 'true' && steps.check_asc_creds.outputs.has_credentials == 'true'
run: |
@@ -1125,10 +1182,16 @@ jobs:
--pkg "$PKG_FILE" \
--api_key_path "$API_KEY_JSON" \
--app_version "$VERSION" \
- --skip_metadata true \
+ --platform osx \
+ --app_identifier "com.karmaa.termix" \
+ --skip_metadata false \
+ --metadata_path "${{ steps.asc_notes.outputs.metadata_path }}" \
--skip_screenshots true \
+ --skip_app_version_update false \
--submit_for_review true \
--automatic_release true \
+ --precheck_include_in_app_purchases false \
+ --submission_information "{\"export_compliance_uses_encryption\": false}" \
--force true
- name: Clean up keychains
diff --git a/.github/workflows/openapi.yml b/.github/workflows/openapi.yml
index c76952d..54f1486 100644
--- a/.github/workflows/openapi.yml
+++ b/.github/workflows/openapi.yml
@@ -13,7 +13,7 @@ jobs:
uses: actions/checkout@v7
- name: Setup Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
cache: "npm"
diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml
index 2e48e16..727c51e 100644
--- a/.github/workflows/pr-check.yml
+++ b/.github/workflows/pr-check.yml
@@ -16,7 +16,7 @@ jobs:
uses: actions/checkout@v7
- name: Setup Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
cache: "npm"
@@ -24,14 +24,89 @@ jobs:
- name: Install dependencies
run: npm ci
- - name: Run ESLint
- run: npx eslint .
+ - name: Lint
+ # npm run lint, not npx eslint โ the script also checks that the
+ # generated dialect schemas match schema.ts, which eslint cannot see.
+ run: npm run lint
- name: Run Prettier check
run: npx prettier --check .
- name: Type check
- run: npx tsc --noEmit
+ run: npm run type-check
- name: Build
run: npm run build
+
+ database-dialects:
+ name: Postgres and MySQL
+ runs-on: blacksmith-2vcpu-ubuntu-2404
+
+ # The test suite only ever sees SQLite. Everything that differs per engine โ
+ # the RETURNING replacements, the read-then-write transactions, the
+ # migrations themselves โ is only covered here, against real servers.
+ services:
+ postgres:
+ image: postgres:16
+ env:
+ POSTGRES_USER: termix
+ POSTGRES_PASSWORD: termix
+ POSTGRES_DB: termix_test
+ ports:
+ - 5432:5432
+ options: >-
+ --health-cmd pg_isready
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 5
+
+ mysql:
+ image: mysql:8
+ env:
+ MYSQL_ROOT_PASSWORD: termix
+ MYSQL_DATABASE: termix_test
+ MYSQL_USER: termix
+ MYSQL_PASSWORD: termix
+ ports:
+ - 3306:3306
+ options: >-
+ --health-cmd "mysqladmin ping -h 127.0.0.1 -ptermix"
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 10
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v7
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v7
+ with:
+ node-version-file: ".nvmrc"
+ cache: "npm"
+
+ - name: Install dependencies
+ run: npm ci
+
+ # Each run applies the migrations to an empty database first, so a
+ # migration that does not apply cleanly fails the build.
+ - name: Verify Postgres
+ run: npm run verify:dialect -- postgres://termix:termix@127.0.0.1:5432/termix_test
+
+ - name: Verify MySQL
+ run: npm run verify:dialect -- mysql://termix:termix@127.0.0.1:3306/termix_test
+
+ # The same repository suite the SQLite run executes, pointed at each
+ # engine. This is where a dialect difference in a query shows up as a
+ # failing assertion rather than as a bug report.
+ - name: Repository tests on Postgres
+ env:
+ TEST_DIALECT: postgres
+ TEST_DATABASE_URL: postgres://termix:termix@127.0.0.1:5432/termix_test
+ run: npx vitest run src/backend/tests/database/repositories --no-file-parallelism
+
+ - name: Repository tests on MySQL
+ env:
+ TEST_DIALECT: mysql
+ TEST_DATABASE_URL: mysql://termix:termix@127.0.0.1:3306/termix_test
+ run: npx vitest run src/backend/tests/database/repositories --no-file-parallelism
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index cf89c5a..f59c5a9 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -44,7 +44,7 @@ jobs:
fetch-depth: 1
- name: Setup Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
@@ -92,7 +92,7 @@ jobs:
token: ${{ secrets.GHCR_TOKEN }}
- name: Setup Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
cache: "npm"
@@ -144,7 +144,7 @@ jobs:
token: ${{ secrets.GHCR_TOKEN }}
- name: Setup Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
@@ -225,7 +225,7 @@ jobs:
fetch-depth: 1
- name: Setup Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
@@ -304,7 +304,7 @@ jobs:
fetch-depth: 1
- name: Setup Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
@@ -395,10 +395,10 @@ jobs:
git fetch origin main
git checkout -B main origin/main
- sed -i "s|version \".*\"|version \"$VERSION\"|g" packaging/Casks/termix.rb
- sed -i "s|sha256 \".*\"|sha256 \"$DMG_SHA256\"|g" packaging/Casks/termix.rb
+ sed -i "s|version \".*\"|version \"$VERSION\"|g" Casks/termix.rb
+ sed -i "s|sha256 \".*\"|sha256 \"$DMG_SHA256\"|g" Casks/termix.rb
- git add packaging/Casks/termix.rb
+ git add Casks/termix.rb
if git diff --cached --quiet; then
echo "Cask already up to date."
exit 0
@@ -420,7 +420,7 @@ jobs:
path: termix
- name: Setup Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v7
with:
node-version-file: "termix/.nvmrc"
cache: "npm"
@@ -443,13 +443,21 @@ jobs:
- name: Create docs release branch
working-directory: docs-repo
- run: git checkout -B "dev-${{ needs.prep.outputs.version }}"
+ run: |
+ BRANCH="dev-${{ needs.prep.outputs.version }}"
+ if git ls-remote --exit-code origin "refs/heads/$BRANCH" >/dev/null 2>&1; then
+ echo "Reusing existing docs branch $BRANCH."
+ git checkout -B "$BRANCH" "origin/$BRANCH"
+ else
+ git checkout -B "$BRANCH"
+ fi
- name: Overwrite OpenAPI spec and regenerate API docs
working-directory: docs-repo
run: |
cp ../termix/openapi.json static/openapi.json
npm ci
+ npm run docusaurus clean-api-docs termix
npm run docusaurus gen-api-docs termix
- name: Commit and push docs branch
@@ -471,7 +479,7 @@ jobs:
git add -A
git commit -m "feat: update API docs for ${{ needs.prep.outputs.version }}"
- git push --force origin "dev-${{ needs.prep.outputs.version }}"
+ git push origin "dev-${{ needs.prep.outputs.version }}"
- name: Open and squash-merge docs PR
if: ${{ inputs.mode != 'Dry run' }}
@@ -513,7 +521,7 @@ jobs:
fetch-depth: 1
- name: Setup Node.js
- uses: actions/setup-node@v6
+ uses: actions/setup-node@v7
with:
node-version-file: ".nvmrc"
@@ -534,7 +542,7 @@ jobs:
docs,
publish-youtube,
]
- if: ${{ always() && (inputs.mode == 'Everything' || inputs.mode == 'Skip submit') && needs.merge-to-main.result == 'success' && needs.electron-release.result == 'success' }}
+ if: ${{ always() && (inputs.mode == 'Everything' || inputs.mode == 'Skip submit') && needs.merge-to-main.result == 'success' && needs.docs.result == 'success' }}
runs-on: blacksmith-2vcpu-ubuntu-2404
steps:
- name: Checkout repository
diff --git a/.gitignore b/.gitignore
index d9251b2..cfb1233 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,7 +13,8 @@ dist-ssr
coverage
*.local
-.vscode/
+.vscode/*
+!.vscode/settings.json
.idea
.DS_Store
*.suo
@@ -33,5 +34,7 @@ electron/build-info.cjs
/.mcp.json
/CLAUDE.md
/old_db/
-/scripts/fix-bugs.mjs
-/scripts/fix-features.mjs
+/scripts/auto-fix.mjs
+/scripts/auto-fix-blocklist.json
+/scripts/auto-fix-state.json
+/scripts/auto-fix-report-*.json
diff --git a/.husky/commit-msg b/.husky/commit-msg
index 0a4b97d..da99483 100644
--- a/.husky/commit-msg
+++ b/.husky/commit-msg
@@ -1 +1 @@
-npx --no -- commitlint --edit $1
+npx --no -- commitlint --edit "$1"
diff --git a/.prettierignore b/.prettierignore
index befe2e1..8cf32b0 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -17,3 +17,6 @@ db
*.min.js
*.min.css
openapi.json
+
+# Generated by drizzle-kit; formatting is the tool's own
+drizzle/
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..dff3ab4
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,22 @@
+{
+ "editor.formatOnSave": true,
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
+ "prettier.prettierPath": "./node_modules/prettier",
+ "editor.codeActionsOnSave": {
+ "source.fixAll.eslint": "explicit"
+ },
+ "eslint.validate": [
+ "javascript",
+ "javascriptreact",
+ "typescript",
+ "typescriptreact"
+ ],
+ "files.eol": "\n",
+ "files.insertFinalNewline": true,
+ "files.trimTrailingWhitespace": true,
+ "[markdown]": {
+ "files.trimTrailingWhitespace": false
+ },
+ "typescript.tsdk": "node_modules/typescript/lib",
+ "typescript.enablePromptUseWorkspaceTsdk": true
+}
diff --git a/packaging/Casks/termix.rb b/Casks/termix.rb
similarity index 87%
rename from packaging/Casks/termix.rb
rename to Casks/termix.rb
index 9e42e20..7458d04 100644
--- a/packaging/Casks/termix.rb
+++ b/Casks/termix.rb
@@ -1,6 +1,6 @@
cask "termix" do
- version "2.5.1"
- sha256 "39f88b6fb6f8841496fe689968decbbc4f4baa92ab5a3a41a738123cf7daeb3f"
+ version "2.7.0"
+ sha256 "8cdae5cf5ce2786e35a1a676dec51974cfca318a5595bc743981a4c373515059"
url "https://github.com/Termix-SSH/Termix/releases/download/release-#{version}-tag/termix_macos_universal_dmg.dmg"
name "Termix"
diff --git a/README.md b/README.md
index 6ec9996..95c175b 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
Termix
-Self-hosted SSH management and remote desktop access
+Self-hosted server management, from SSH and remote desktop to automations
English ยท
@@ -58,7 +58,7 @@ Termix is free and open source. If you find it useful, consider [donating](https
## Overview
-Termix is an open-source, forever-free, self-hosted all-in-one server management platform. It provides a multi-platform solution for managing your servers and infrastructure through a single, intuitive interface. Termix offers SSH terminal access, remote desktop control (RDP, VNC, Telnet), SSH tunneling capabilities, remote file management, and many other tools. Termix is the perfect free and self-hosted alternative to Termius available for all platforms.
+Termix is a free, open source, self-hosted platform for managing your servers. It puts SSH terminals, remote desktops (RDP, VNC, Telnet), file transfers, tunnels, Docker, metrics, and automations in one place, on web, desktop, and mobile. It is a self-hosted alternative to Termius that stays free forever.
@@ -68,42 +68,42 @@ Termix is an open-source, forever-free, self-hosted all-in-one server management
-**SSH Terminal Access:**
-Full-featured terminal with split-screen support (up to 4 panels) with a browser-like tab system. Includes support for customizing the terminal including common terminal themes, fonts, and other components.
+**SSH Terminal:**
+A full terminal with browser-like tabs and split screen, up to 6 panels at once. Pick your theme, font, and colors. A toolbar sits above each session with live CPU, memory, and disk, plus quick links to that host's files, Docker, tunnels, and metrics.
-**Remote Desktop Access:**
-RDP, VNC, and Telnet support over the browser with complete customization and split screening.
+**Remote Desktop:**
+RDP, VNC, and Telnet in the browser, in tabs and split screen like any other session. Includes a file browser for RDP drives and drag-and-drop upload. On Windows desktop you can also open a host in the native RDP client.
-**SSH Tunnel Management:**
-Create and manage server-to-server SSH tunnels with automatic reconnection, health monitoring, and local, remote, or dynamic SOCKS forwarding. Desktop client-to-server tunnel settings are stored locally per desktop install, optional C2S preset snapshots can be saved to the server, renamed, loaded, or deleted when you want to move a local tunnel configuration between clients.
+**SSH Tunnels:**
+Local, remote, and dynamic SOCKS forwarding with auto reconnect and health checks. Client-to-server tunnels on the desktop app are stored on that machine, and you can save presets to the server to move a setup to another client.
-**Remote File Manager:**
-Manage files directly on remote servers with support for viewing and editing code, images, audio, and video. Upload, download, rename, delete, and move files seamlessly with sudo support. Includes support for moving files from server to server.
+**File Manager:**
+Browse, edit, upload, download, rename, move, and delete files over SFTP, with sudo support. View and edit code, images, audio, and video. Copy files straight from one server to another, with the fastest route picked for you and transfers checked for integrity.
-**Docker and Podman Management:**
-Start, stop, pause, remove containers. View container stats. Control containers using a docker exec terminal. Supports both Docker and Podman as the container runtime. It was not made to replace Portainer or Dockge but rather to simply manage your containers compared to creating them.
+**Docker and Podman:**
+Start, stop, pause, and remove containers, watch their stats, and open a shell inside one. Works with both Docker and Podman. It is not meant to replace Portainer or Dockge, just to manage containers you already have.
-**SSH Host Manager:**
-Save, organize, and manage your SSH connections with tags and folders (folder customization and nested folder support), and easily save reusable login info while being able to automate the deployment of SSH keys.
+**Host Manager:**
+Save and organize hosts with tags and nested folders you can name and color. Reuse saved credentials across hosts, deploy SSH keys automatically, group hosts under a parent host, bulk edit and export, and use Quick Connect for one-off connections you do not want to save.
@@ -111,83 +111,139 @@ Save, organize, and manage your SSH connections with tags and folders (folder cu
**Host Metrics:**
-View CPU, memory, disk usage, network, uptime, system information, firewall, port monitor, log viewer, users/permissions, certificates, and many more which work on most Linux based servers. Includes time-series history graphs and threshold-based alerts with ntfy and webhook support.
+CPU, memory, disk, network, temperature, uptime, processes, ports, logins, and system info on most Linux servers, with history graphs. Manager cards let you handle services, cron jobs, packages, users, firewall rules, WireGuard, Tailscale, SSL certs, logs, and health checks without leaving Termix.
-**User Authentication:**
-Secure user management with admin controls (can edit other users information) and OIDC/LDAP/SSO (with access control), 2FA (TOTP), and passkey (WebAuthn) support. View active user sessions across all platforms and revoke permissions. Link your OIDC/Local accounts together. View audit log of all users actions.
+**Automations:**
+Pick a trigger, then say what should happen. Triggers include a metric crossing a threshold, a host going up or down, a health check changing, a schedule, a container event, or an incoming webhook. Steps can run commands and snippets, control containers and tunnels, wake a host, call a URL, wait, branch on a condition, run another automation, and notify you over ntfy, Discord, or a webhook. Test runs let you try it safely first.
-**Tailscale Integration:**
-List devices from your tailnet to quickly add them as hosts, and connect using Tailscale SSH as an authentication method, letting your tailnet ACLs handle authorization without storing credentials.
+**Fleets:**
+Group hosts into a fleet by picking them or with tag rules, so new hosts join on their own. Run one command on every host at once, push and pull files across all of them, install packages, and collect an inventory of OS, kernel, arch, and uptime.
-**RBAC/Sharing:**
-Create roles and share hosts across users/roles. Supports all auth types and all host protocols.
+**AI Assistant:**
+Optional, and off until you turn it on. Connect OpenAI, Anthropic, Gemini, Ollama, or any OpenAI compatible endpoint and ask about your setup. It reads hosts, fleets, snippets, and alerts, and proposes changes for you to approve instead of making them. It can never touch credentials, users, or settings. Admins can leave it off for the whole instance, and you can hide it during setup.
-**Serial Connections:**
-Connect to serial devices (routers, switches, microcontrollers, etc.) directly from the browser or desktop app. Configure baud rate, data bits, stop bits, and parity. Uses the Web Serial API in supported browsers or a native backend in the Electron app.
+**Login and Users:**
+Local accounts plus OIDC, LDAP, GitHub, and Google sign-in, with 2FA (TOTP), passkeys (WebAuthn), and trusted devices. Admins can manage users, map OIDC groups to roles, see every active session across platforms, and revoke them. Link your local and OIDC accounts together, and read the audit log of what everyone did.
+**Roles and Sharing:**
+Create roles and share hosts with users or roles at four levels: connect, view, edit, and manage. Works with every auth type and every protocol, and you can override the credentials used for a shared host.
+
+
+
+
+
+
**Alerts:**
-Set threshold-based alert rules on host metrics (CPU, memory, disk, etc.) and get notified via ntfy or webhooks when they fire. View firing and resolved alerts in a history log.
+Set rules on host metrics like CPU, memory, and disk, and get notified over ntfy, Discord, or a webhook when they fire. See firing and resolved alerts in a history log, and dismiss the ones you do not care about.
-
-
**Homepage:**
-A fully customizable homepage with a drag-and-drop widget grid. Add widgets for host status, service links, clocks, notes, RSS feeds, weather, Docker containers, host metrics charts, embedded terminals, iframes, and more.
-
-
-
-
-**Database Encryption:**
-Backend stored as encrypted SQLite database files. View [docs](https://docs.termix.site/security) for more.
+A drag-and-drop widget grid you build yourself. Widgets for host status, pings, service links, bookmarks, search, clocks, calendars, countdowns, notes, RSS, weather, images, iframes, Docker, tunnels, metrics charts, custom APIs, and even a live terminal.
-**Network Graph:**
-Customize your Dashboard to visualize your homelab based off your SSH connections with status support.
+**Snippets and Tools:**
+Save commands you run often and fire them off in one click, with variables for the host and your own inputs. Run a single command across every open terminal, and search your command history with autocomplete.
-**SSH Tools:**
-Create reusable command snippets that execute with a single click. Run one command simultaneously across multiple open terminals.
+**Session Sharing:**
+Share a live terminal, RDP, VNC, or Telnet session in real time. Send a link anyone can join without an account, or share with a specific Termix user, in read-only or read-write mode. Shares can expire on their own or be revoked, and can be turned off globally or per host.
-**Persistent Tabs:**
-SSH sessions and tabs stay open across devices/refreshes if enabled in user profile.
+**Session Recording and Logs:**
+Record terminal, RDP, and VNC sessions and play them back later. Download plain text logs of a session, and check the connection log to see exactly what happened during a connection.
+
+
+
+
+**Serial Connections:**
+Talk to serial devices like routers, switches, and microcontrollers from the browser or desktop app. Set baud rate, data bits, stop bits, and parity. Uses the Web Serial API in supported browsers, or a native backend in the desktop app.
+
+
+
+
+
+
+**Tailscale:**
+Pull devices from your tailnet to add them as hosts in a couple of clicks, and connect with Tailscale SSH so your tailnet ACLs handle access and no credentials are stored. Headscale and custom endpoints work too.
+
+
+
+
+**Proxmox:**
+Import hosts straight from a Proxmox instance, and watch node and guest stats, including CPU, memory, and storage, in their own tab.
+
+
+
+
+
+
+**Workspaces and Tabs:**
+Save a set of tabs with their split layout and reopen the whole thing in one click. Termix also remembers your last session, so your tabs come back across refreshes and devices.
+
+
+
+
+**Guided Setup:**
+A short setup walks you through picking an interface preset, your theme, the features you want, and your first host. Simple mode hides what you do not use, and you can rerun setup or switch presets any time.
+
+
+
+
+
+
+**Desktop Standalone and Sync:**
+The desktop app runs on its own with a local backend and database, no server needed. You can also connect it to a Termix server for two-way sync of hosts, credentials, snippets, and more, and choose whether connections start locally or through the server.
+
+
+
+
+**Command Line Interface:**
+A `termix` CLI for your shell and your scripts. Open terminals, run a command on one host or a whole fleet, move files over SFTP, and manage hosts, snippets, and credentials. Install with `npm install -g @termix-cli/cli` or grab a standalone binary. See the [CLI docs](https://docs.termix.site/cli).
+
+
+
+
+
+
+**Security:**
+Passwords, keys, and other secrets are encrypted per user, and the database files themselves can be encrypted on disk. See the [docs](https://docs.termix.site/security) for how it works.
**Languages:**
-Built-in support ~30 languages (managed by [Crowdin](https://docs.termix.site/translations)).
+Around 30 languages built in, managed through [Crowdin](https://docs.termix.site/translations).
@@ -199,17 +255,20 @@ Built-in support ~30 languages (managed by [Crowdin](https://docs.termix.site/tr
More features
-- **Dashboard** - View server information at a glance on your dashboard
-- **API Keys** - Create user-scoped API keys with expiration dates to be used for automation/CI
-- **Data Export/Import** - Export and import SSH hosts, credentials, and file manager data
-- **Automatic SSL Setup** - Built-in SSL certificate generation and management with HTTPS redirects
-- **Modern UI** - Clean desktop/mobile-friendly interface built with React, Tailwind CSS, and Shadcn. Choose between many different UI themes including light, dark, Dracula, etc. Use URL routes to open any connection in full-screen.
-- **Command History** - Auto-complete and view previously ran SSH commands
-- **Quick Connect** - Connect to a server without having to save the connection data
-- **Command Palette** - Double tap left shift to quickly access SSH connections with your keyboard
-- **Proxmox Integration** - Auto-add hosts into Termix from your Proxmox instance
-- **SSH Feature Rich** - Supports jump hosts, Warpgate, TOTP based connections, SOCKS5, host key verification, password autofill, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, port knocking, terminal logging, SSH agent forwarding, Bitwarden SSH agent, HashiCorp Vault SSH signing, and more.
-- **Termix ID** - A sshid.io equivalent built into Termix. Claim a handle, publish your public SSH keys at a resolver URL, and use a built-in CA to issue SSH certificates.
+- **Dashboard** - Your servers at a glance, with cards you arrange yourself
+- **Network Graph** - See your homelab drawn out from your hosts, with live status
+- **Tmux Monitor** - Browse tmux sessions, windows, and panes, with previews and search
+- **API Keys** - User-scoped keys with expiry dates for scripts and CI
+- **Export and Import** - Move hosts, credentials, and file manager data in and out
+- **Automatic SSL** - Certificates generated and renewed for you, with HTTPS redirects, or bring your own
+- **Databases** - SQLite by default, with PostgreSQL and MySQL supported too
+- **Modern UI** - Clean React interface that works on desktop and mobile, with themes like light, dark, and Dracula. Any connection can open full screen from a URL
+- **Command Palette** - Double tap left shift to jump to a host from the keyboard
+- **Keyboard Shortcuts** - Move between tabs, close tabs, and more, all rebindable
+- **Wake-on-LAN** - Wake a machine from Termix or from an automation step
+- **Trusted Proxy Auth** - Let a reverse proxy handle sign-in and pass the user through
+- **SSH Feature Rich** - Jump hosts, Warpgate, TOTP prompts, SOCKS5, host key verification, password autofill, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, port knocking, terminal logging, agent forwarding, Bitwarden SSH agent, HashiCorp Vault SSH signing, and more
+- **Termix ID** - A built-in take on sshid.io. Claim a handle, publish your public keys at a resolver URL, and issue SSH certificates from the built-in CA
@@ -291,6 +350,32 @@ networks:
driver: bridge
```
+### Command Line Interface
+
+Termix also has a CLI, so you can manage your servers from a terminal and use Termix in your own scripts.
+
+```bash
+npm install -g @termix-cli/cli
+termix login --url https://termix.example.com
+termix ssh 1
+```
+
+It can open terminals, run a command on one host or a whole fleet, move files over SFTP, and manage hosts, snippets and credentials. Full documentation is at [docs.termix.site/cli](https://docs.termix.site/cli).
+
+### Cloud Hosting
+
+You can run the Termix server on a VPS instead of inside your own network. If Termix runs on the network it manages, an outage takes Termix down with it, right when you need it to fix things. Running it elsewhere keeps it reachable, gives you a static IP, and lets you get in from anywhere without a VPN or port forward.
+
+[GINERNET](https://docs.termix.site/install/ginernet) sponsors Termix, and the docs have a step by step guide for deploying to their VPS platform.
+
+
+
+## Telemetry
+
+Termix sends a small anonymous ping once a day so I can see how many instances are running and which features get used. It contains a random instance ID, how many users and hosts you have, the app version, and which features (terminal, file manager, tunnels, docker, etc.) were used in the last 24 hours. It never contains usernames, hostnames, IP addresses, credentials, or anything else that identifies you or your servers.
+
+It is on by default. Turn it off in Admin Settings under General, or set `ENABLE_TELEMETRY=false` before you ever start Termix.
+
## Donate
@@ -325,10 +410,6 @@ Interested in a paid placement to support development? Email [mail@termix.site](
-
-
-
-
@@ -340,14 +421,17 @@ Interested in a paid placement to support development? Email [mail@termix.site](
-
+
+
+
+
## Support
-If you need help or want to request a feature with Termix, visit the [Issues](https://github.com/Termix-SSH/Support/issues) page, log in, and press `New Issue`. Please be as detailed as possible in your issue, preferably written in English. You can also join the [Discord](https://discord.gg/jVQGdvHDrf) server and visit the support channel, however, response times may be longer.
+Need help or want to request a feature? Open a [new issue](https://github.com/Termix-SSH/Support/issues) and add as much detail as you can, in English if possible. You can also ask in the support channel on [Discord](https://discord.gg/jVQGdvHDrf), though replies there can take longer.
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index e4ab722..6623010 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -1,70 +1,125 @@
-Revamped RBAC/sharing, session recording & replay, Vault auth for monitors, API key host enrollment, Proxmox guest auto sync, database refactor, plus 30+ bug fixes across terminal, file manager, RDP/VNC, and auth. DO NOT DOWNGRADE FROM THIS VERSION.
+Termix AI, automations, fleets, workspaces, subhosts, Proxmox metrics, a context aware terminal toolbar, split screen tabs, onboarding, PostgreSQL/MySQL support, and a large batch of fixes.
-https://youtu.be/c3UD4q2jW_8
+https://youtu.be/lngaePO96tM
-- Revamped RBAC/sharing system (new UI, all auth types and host protocols now supported)
-- Complete admin control over user information (manage all users hosts, credentials, and snippets)
-- Support Vault auth for monitors
-- API key host enrollment endpoint
-- Allow pinned hosts with name sorting
-- Session recording and replay
-- Terminal font size shortcuts (ctrl + / -)
-- Open File Manager to tab right-click menu
-- Proxmox guest auto sync
-- Complete database refactor
-- 30-day donation reminder and new donation milestones that support research: (donate.termix.site)
-- Improve site performance with cache and poll pauses
-- Save quick connect sessions as hosts
+- Added completely optional and disabled/removed by default Termix AI, an assistant that can work with your hosts and terminals
+ - This feature was added based off a 60% (yes) to 40% (no) Discord vote.
+ - The assistant cannot change anything on its own. It can only read a limited set of your Termix data and propose actions, and every change or command runs only after you approve it, using your own account and permissions.
+ - It has no access to credentials, SSH keys, vaults, users, roles, sessions, SSO, certificates, audit logs, or instance settings. Secrets are also stripped from anything sent to a model provider.
+ - Both an admin and each user must turn it on before it does anything, and it stays off after upgrading.
+- Added automations with events, channels, and steps
+- Added a fleet system with snippets, packages, files, and inventory
+- Added workspaces to save and restore your tab layout
+- Added subhosts so hosts can be organized under a parent host
+- Added Proxmox metrics integration
+- Added a context aware terminal toolbar with quick links, host info, image pasting, and a movable desktop layout
+- Added interactive terminal macros
+- Added first-class split screen tabs
+- Added a file manager trash instead of permanent deletes
+- Added a local terminal to the desktop app
+- Added inheritable connection defaults so hosts can share settings
+- Added an onboarding flow with an interface simplicity system
+- Added PostgreSQL and MySQL support alongside SQLite
+- Added a redesigned host and credential sidebar with synced preferences and drag-to-reorder
+- Added the option to open some app rail tabs as their own tab or in a right sidebar
+- Added folder select to host multi select
+- Added connection logs for RDP, VNC, and Telnet hosts
+- Added native RDP launching on Windows desktop
+- Added a drive file browser and drag-and-drop upload for RDP
+- Added terminal image handoff so images open on your local machine
+- Added custom terminal font selection
+- Added trusted proxy authentication
+- Added global touch input settings
+- Added adaptive transfers that pick the fastest route and verify integrity
+- Added adaptive polling and preloading that respond to activity and network cost
+- Added adaptive SSH local echo for high latency connections
+- Added custom disk and network metric options
+- Added the ability to exclude specific mounts from disk usage metrics
+- Added expanded snippet options
+- Added downloadable session logs as text files
+- Added keyboard shortcuts to move between open tabs
+- Added Discord webhook notification channels
+- Added paste support when not running over HTTPS
+- Added Headscale API key and custom API endpoint support
+- Added a Meta key option for terminals
+- Added BE-AZERTY keyboard layout for remote desktop
+- Added PKCE to the OIDC login flow
+- Added Proxmox VMID and Docker tags to discovered guests
+- Added custom SSL certificate support in admin settings
+- Greatly improved performance across metrics polling and host management for large setups
+
-- Syntax highlighting artifacts
-- Filter dashboard status hosts
-- Persist dashboard service link changes
-- Snippet text overflow
-- Persist remote desktop credential auth
-- Guard language switching failures
-- Resolve tunnel source credentials
-- Windows file delete command
-- Artifact release checkout ref
-- Command palette escape in fullscreen
-- Alerts and audit log normalization
-- macOS VNC protocol negotiation
-- Port knocking before SSH connect
-- Allow escape to close link confirmation
-- Prevent Electron modifier wheel zoom
-- Credential auth optional password
-- Retry transient terminal DNS lookups
-- OIDC redirect forwarded port handling
-- Preserve recent open tabs on startup
-- Terminal font selection
-- Poor font legibility in multiple places
-- File manager uploads failing
-- Tmux detection for non-POSTIX shells
-- OPKSSH js-yaml ESM import
-- Android Vietnamese IME input
-- Firefox RDP clipboard paste
-- Proxmox discovery over HTTPS
-- External editor actions in file preview
-- Firefox desktop OIDC callback
-- Status checks through jump hosts
-- Restore sudo password auto fill settings
-- Preserve file editor position on save
-- Sync cloud preference storage mode
-- Render RDP sessions at native pixel density
-- Restore database import in embedded desktop mode
-- Command autocomplete dropdown poor contrast
-- Allow clipboard paste in key recording field
-- Fix GitHub/google SSO "not defined" errors
+- Periodic SSH terminal stalls caused by SQLite telemetry writes
+- Missing OPKSSH binary breaking installs without internet access
+- Session recording writes slowing down terminals
+- SGR mouse tracking escape codes printing as text
+- Terminal display distortion with special characters
+- Windows Ctrl+W not closing the active tab
+- Tray Quit not terminating the desktop app
+- Mobile terminal scrollback not matching xterm wheel behavior
+- tmux breaking on UTF-8 paths
+- Sudo password auto-fill not persisting
+- SSH and sudo passwords not being saved or auto-filled
+- Switching SSH authentication away from Vault failing
+- Host edits being discarded without a warning
+- Quick-created credentials not being selected
+- Saved RDP connection settings not being preserved
+- RDP domain credentials not being prompted for
+- Windows key mapping in remote desktop sessions
+- VNC failing to connect to macOS screen sharing
+- Mouse input breaking on touch-capable devices in RDP and VNC
+- Docker runtime selection not persisting, plus Docker manager UI issues
+- Desktop Docker console WebSocket not being authenticated
+- Folders intermittently disappearing from duplicate requests
+- Folder deletion not refreshing the host list
+- Proxmox guest identity being lost on edit
+- Long host names shifting dashboard metrics
+- Host list rows resizing unexpectedly
+- Metrics collection all firing at once on startup
+- Session activity writes hitting the database too often
+- Reachable and available hosts being treated the same
+- SSH keepalives could not be disabled
+- OIDC group claims from multiple sources not being merged
+- OIDC discovery issuers with trailing slashes failing
+- LDAP logins not using preferred_username
+- Trusted MFA devices not being bound to a specific client install
+- 2FA could not be disabled with a single credential
+- Profile API keys not being shown after creation
+- SSH agent authentication being unclear in the host editor
+- Tunnel status stream not requiring authentication
+- SFTP and Docker console accepting a mismatched host id
+- SSH connections whose host id resolved elsewhere being accepted
+- User-managed CA certificates not being applied over SFTP
+- Already-shared hosts losing their SSH authentication
+- Real client IP not being captured for SSH login alerts behind a reverse proxy
+- Audit log IPs not using the real client IP
+- Homepage System Overview update indicator never firing
+- Webhook notification channels not working
+- Remote sync failing behind an nginx proxy
+- First server sync not refreshing the UI
+- Desktop app not showing update prompts and hiding the version badge
+- Desktop Tailscale configuration being lost
+- Command palette not loading new activity, plus Enter now opens the first result
+- Database connection failures during login not being reported clearly
+- audit_logs.user_id not being nullable on fresh SQLite installs
+- Sync upserts writing to the wrong row
+- Database migration failures on tables without an id column
+- ssh_credentials rebuilds not matching the live schema
+- Sidebar reset and fullscreen buttons sharing the same icon
+- Host list icons not matching the tab bar icons
+- Keep Linux credential storage working on unrecognized desktops
+
diff --git a/biome.json b/biome.json
deleted file mode 100644
index 68bf468..0000000
--- a/biome.json
+++ /dev/null
@@ -1,58 +0,0 @@
-{
- "$schema": "https://biomejs.dev/schemas/2.5.1/schema.json",
- "vcs": {
- "enabled": true,
- "clientKind": "git",
- "useIgnoreFile": true,
- "defaultBranch": "dev-2.5.0"
- },
- "files": {
- "ignoreUnknown": true,
- "includes": [
- "**",
- "!!build",
- "!!coverage",
- "!!dist",
- "!!dist-ssr",
- "!!release",
- "!!node_modules",
- "!!src/mcp-server/node_modules",
- "!!db",
- "!!.env",
- "!!**/*.min.js",
- "!!**/*.min.css",
- "!!openapi.json"
- ]
- },
- "formatter": {
- "enabled": true,
- "indentStyle": "space",
- "indentWidth": 2,
- "lineWidth": 80,
- "lineEnding": "lf"
- },
- "linter": {
- "enabled": false
- },
- "javascript": {
- "formatter": {
- "quoteStyle": "double",
- "semicolons": "always",
- "trailingCommas": "all",
- "arrowParentheses": "always"
- }
- },
- "json": {
- "formatter": {
- "trailingCommas": "none"
- }
- },
- "css": {
- "parser": {
- "tailwindDirectives": true
- }
- },
- "assist": {
- "enabled": false
- }
-}
diff --git a/docker/Dockerfile b/docker/Dockerfile
index f6ba5f5..8507124 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,5 +1,5 @@
# Stage 1: Install dependencies
-FROM node:26-slim AS deps
+FROM node:24-slim AS deps
WORKDIR /app
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*
@@ -35,8 +35,26 @@ RUN npm rebuild better-sqlite3
RUN npm run build:backend
-# Stage 4: Production dependencies only
-FROM node:26-slim AS production-deps
+# Stage 4: Download OPKSSH binary for the target platform so the image works offline
+FROM node:24-slim AS opkssh-downloader
+ARG TARGETARCH
+ARG OPKSSH_VERSION=v0.16.0
+WORKDIR /opkssh
+
+RUN apt-get update && apt-get install -y curl ca-certificates && rm -rf /var/lib/apt/lists/*
+
+RUN case "$TARGETARCH" in \
+ amd64) OPKSSH_ARCH=amd64 ;; \
+ arm64) OPKSSH_ARCH=arm64 ;; \
+ *) echo "Unsupported architecture: $TARGETARCH" && exit 1 ;; \
+ esac && \
+ curl -fSL -o "opkssh-linux-${OPKSSH_ARCH}" \
+ "https://github.com/openpubkey/opkssh/releases/download/${OPKSSH_VERSION}/opkssh-linux-${OPKSSH_ARCH}" && \
+ chmod 755 "opkssh-linux-${OPKSSH_ARCH}" && \
+ echo -n "$OPKSSH_VERSION" > version.txt
+
+# Stage 5: Production dependencies only
+FROM node:24-slim AS production-deps
WORKDIR /app
RUN apt-get update && apt-get install -y python3 make g++ && rm -rf /var/lib/apt/lists/*
@@ -52,13 +70,14 @@ RUN npm ci --omit=dev --ignore-scripts && \
npm rebuild better-sqlite3 bcryptjs ssh2 && \
npm cache clean --force
-# Stage 5: Final optimized image
-FROM node:26-slim
+# Stage 6: Final optimized image
+FROM node:24-slim
WORKDIR /app
ENV DATA_DIR=/app/data \
PORT=8080 \
- NODE_ENV=production
+ NODE_ENV=production \
+ POSTHOG_API_KEY=phc_xM8UznirsFxUkGE68gH4jzeqevf4kh76wGw7Ci7hH2dd
RUN apt-get update && apt-get install -y nginx gettext-base openssl ca-certificates gosu wget certbot python3-certbot-dns-cloudflare && \
update-ca-certificates && \
@@ -74,7 +93,11 @@ COPY --chown=node:node --from=frontend-builder /app/dist /app/html
COPY --chown=node:node --from=production-deps /app/node_modules /app/node_modules
COPY --chown=node:node --from=backend-builder /app/dist/backend ./dist/backend
+COPY --chown=node:node --from=opkssh-downloader /opkssh /app/opkssh-bundled
COPY --chown=node:node package.json ./
+# Schema for Postgres and MySQL. Unused by the default SQLite deployment, which
+# builds its tables at startup instead.
+COPY --chown=node:node drizzle ./drizzle
VOLUME ["/app/data"]
diff --git a/docker/compose-dev.yml b/docker/compose-dev.yml
index 14b703a..3ed7795 100644
--- a/docker/compose-dev.yml
+++ b/docker/compose-dev.yml
@@ -13,6 +13,7 @@ services:
PORT: "8080"
NODE_ENV: development
GUACD_HOST: "guacd-dev"
+ GUACD_TUNNEL_HOST: "termix-dev"
GUACD_RECORDING_PATH: "/termix-data/session_recordings/guacamole"
depends_on:
- guacd-dev
diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml
index eed4d17..033c6d8 100644
--- a/docker/docker-compose.yml
+++ b/docker/docker-compose.yml
@@ -10,7 +10,15 @@ services:
environment:
PORT: "8080"
GUACD_HOST: "guacd"
+ GUACD_TUNNEL_HOST: "termix"
GUACD_RECORDING_PATH: "/termix-data/session_recordings/guacamole"
+ # Trusted reverse-proxy authentication is disabled by default. When
+ # enabled, do not expose this container directly to untrusted clients.
+ # TRUSTED_PROXY_AUTH_ENABLED: "true"
+ # TRUSTED_PROXY_AUTH_TRUSTED_PROXIES: "172.16.0.0/12"
+ # TRUSTED_PROXY_AUTH_ROLE_MAP: '{"operators":["user"]}'
+ # TRUSTED_PROXY_AUTH_USERNAME_HEADER: "x-forwarded-username"
+ # TRUSTED_PROXY_AUTH_ROLE_HEADER: "x-forwarded-role"
depends_on:
- guacd
networks:
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 917ea60..02480b7 100644
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -22,6 +22,14 @@ if [ "$(id -u)" = "0" ]; then
fi
fi
+DATA_DIR=${DATA_DIR:-/app/data}
+if [ -f "$DATA_DIR/.env" ]; then
+ echo "Loading persisted SSL settings from $DATA_DIR/.env"
+ set -a
+ . "$DATA_DIR/.env"
+ set +a
+fi
+
export PORT=${PORT:-8080}
export ENABLE_SSL=${ENABLE_SSL:-false}
export SSL_PORT=${SSL_PORT:-8443}
@@ -60,8 +68,8 @@ fi
OPKSSH_DIR="${DATA_DIR:-/app/data}/opkssh"
if [ ! -d "$OPKSSH_DIR" ]; then
- echo "WARNING: OPKSSH binary directory not found at $OPKSSH_DIR"
- echo "OPKSSH will be downloaded automatically on first use."
+ echo "OPKSSH binary directory not found at $OPKSSH_DIR"
+ echo "OPKSSH will be installed from the bundled copy on first use (falls back to downloading if unavailable)."
else
echo "OPKSSH binary directory found at $OPKSSH_DIR"
fi
@@ -163,8 +171,4 @@ else
echo "Warning: package.json not found"
fi
-node dist/backend/backend/starter.js
-
-echo "All services started"
-
-tail -f /dev/null
+exec node dist/backend/backend/starter.js
diff --git a/docker/nginx-https.conf b/docker/nginx-https.conf
index 9449028..6245ce5 100644
--- a/docker/nginx-https.conf
+++ b/docker/nginx-https.conf
@@ -11,6 +11,8 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
+ server_tokens off;
+
access_log /tmp/nginx/access.log;
client_body_temp_path /tmp/nginx/client_body;
@@ -21,6 +23,22 @@ http {
sendfile on;
keepalive_timeout 65;
+
+ # Static assets only. API responses arrive already gzipped from the node
+ # backend, and gzip_proxied would otherwise have nginx decompress and
+ # recompress them for nothing.
+ gzip on;
+ gzip_vary on;
+ gzip_min_length 2048;
+ gzip_comp_level 5;
+ gzip_types
+ text/plain
+ text/css
+ text/javascript
+ application/javascript
+ application/json
+ application/wasm
+ image/svg+xml;
client_header_timeout 300s;
set_real_ip_from 127.0.0.1;
@@ -61,6 +79,7 @@ http {
server {
listen ${SSL_PORT} ssl;
server_name _;
+ client_max_body_size 50m;
absolute_redirect off;
@@ -69,7 +88,6 @@ http {
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Content-Type-Options nosniff always;
- add_header X-XSS-Protection "1; mode=block" always;
location ^~ /.well-known/acme-challenge/ {
root /app/data/acme-webroot;
@@ -80,6 +98,8 @@ http {
location = /sw.js {
root /app/html;
expires off;
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
+ add_header X-Content-Type-Options nosniff always;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
try_files $uri =404;
}
@@ -87,31 +107,64 @@ http {
location = /manifest.json {
root /app/html;
expires off;
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
+ add_header X-Content-Type-Options nosniff always;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
try_files $uri =404;
}
- location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
+ location ^~ /assets/ {
root /app/html;
expires 1y;
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
+ add_header X-Content-Type-Options nosniff always;
add_header Cache-Control "public, max-age=31536000, immutable" always;
try_files $uri =404;
}
+ location ^~ /fonts/ {
+ root /app/html;
+ expires 1y;
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
+ add_header X-Content-Type-Options nosniff always;
+ add_header Cache-Control "public, max-age=31536000, immutable" always;
+ try_files $uri =404;
+ }
+
+ location ^~ /icons/ {
+ root /app/html;
+ expires 30d;
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
+ add_header X-Content-Type-Options nosniff always;
+ add_header Cache-Control "public, max-age=2592000" always;
+ try_files $uri =404;
+ }
+
+ location ~* ^/[^/]+\.(js|css|png|jpe?g|gif|ico|svg|webp|woff2?|ttf|eot)$ {
+ root /app/html;
+ expires 30d;
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
+ add_header X-Content-Type-Options nosniff always;
+ add_header Cache-Control "public, max-age=2592000" always;
+ try_files $uri =404;
+ }
+
+ location ~* \.map$ {
+ access_log off;
+ log_not_found off;
+ return 404;
+ }
+
location / {
root /app/html;
index index.html index.htm;
expires off;
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
+ add_header X-Content-Type-Options nosniff always;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
try_files $uri $uri/ /index.html;
}
- location ~* \.map$ {
- return 404;
- access_log off;
- log_not_found off;
- }
-
location ~ ^/users/sessions(/.*)?$ {
proxy_pass http://127.0.0.1:30001;
proxy_http_version 1.1;
@@ -159,6 +212,30 @@ http {
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
}
+ location ~ ^/ai(/.*)?$ {
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+
+ # The chat endpoint streams server-sent events; buffering would
+ # hold tokens back until the whole reply finished.
+ proxy_read_timeout 600s;
+ proxy_buffering off;
+ proxy_cache off;
+ }
+
+ location ~ ^/automations(/.*)?$ {
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+ }
+
location ~ ^/alert-rules(/.*)?$ {
proxy_pass http://127.0.0.1:30001;
proxy_http_version 1.1;
@@ -217,6 +294,21 @@ http {
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
}
+ location ~ ^/fleets(/.*)?$ {
+ client_max_body_size 200m;
+
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+
+ proxy_connect_timeout 60s;
+ proxy_send_timeout 600s;
+ proxy_read_timeout 600s;
+ }
+
location ~ ^/vault(/.*)?$ {
proxy_pass http://127.0.0.1:30001;
proxy_http_version 1.1;
@@ -226,6 +318,15 @@ http {
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
}
+ location ~ ^/sync(/.*)?$ {
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+ }
+
location ~ ^/termix-id(/.*)?$ {
proxy_pass http://127.0.0.1:30001;
proxy_http_version 1.1;
@@ -283,6 +384,15 @@ http {
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
}
+ location ~ ^/workspaces(/.*)?$ {
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+ }
+
location ~ ^/user-preferences(/.*)?$ {
proxy_pass http://127.0.0.1:30001;
proxy_http_version 1.1;
@@ -292,6 +402,33 @@ http {
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
}
+ location ~ ^/host-sidebar(/.*)?$ {
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+ }
+
+ location ~ ^/credential-sidebar(/.*)?$ {
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+ }
+
+ location ~ ^/ui-preferences(/.*)?$ {
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+ }
+
location ~ ^/database(/.*)?$ {
client_max_body_size 5G;
client_body_timeout 300s;
@@ -363,7 +500,9 @@ http {
proxy_cache_bypass 1;
proxy_no_cache 1;
- add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
+ add_header X-Content-Type-Options nosniff always;
+ add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
}
location ~ ^/host/opkssh-callback(/.*)?$ {
@@ -378,7 +517,9 @@ http {
proxy_cache_bypass 1;
proxy_no_cache 1;
- add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
+ add_header X-Content-Type-Options nosniff always;
+ add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
}
location /host/ {
@@ -467,6 +608,15 @@ http {
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
}
+ location ~ ^/session-sharing(/.*)?$ {
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+ }
+
location /host/tunnel/ {
proxy_pass http://127.0.0.1:30003;
proxy_http_version 1.1;
@@ -531,6 +681,8 @@ http {
client_max_body_size 5G;
client_body_timeout 300s;
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
+ add_header X-Content-Type-Options nosniff always;
add_header Cache-Control "no-store, no-cache, must-revalidate" always;
proxy_pass http://127.0.0.1:30004;
@@ -552,6 +704,8 @@ http {
client_max_body_size 5G;
client_body_timeout 300s;
+ add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
+ add_header X-Content-Type-Options nosniff always;
add_header Cache-Control "no-store, no-cache, must-revalidate" always;
proxy_pass http://127.0.0.1:30004;
@@ -631,6 +785,19 @@ http {
proxy_read_timeout 600s;
}
+ location ~ ^/proxmox-stats(/.*)?$ {
+ proxy_pass http://127.0.0.1:30005;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+
+ proxy_connect_timeout 600s;
+ proxy_send_timeout 600s;
+ proxy_read_timeout 600s;
+ }
+
location ~ ^/global-settings(/.*)?$ {
proxy_pass http://127.0.0.1:30005;
proxy_http_version 1.1;
@@ -753,6 +920,7 @@ http {
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /app/html;
+ internal;
}
}
}
diff --git a/docker/nginx.conf b/docker/nginx.conf
index 68cff5a..9140ac3 100644
--- a/docker/nginx.conf
+++ b/docker/nginx.conf
@@ -11,6 +11,8 @@ http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
+ server_tokens off;
+
access_log /tmp/nginx/access.log;
client_body_temp_path /tmp/nginx/client_body;
@@ -21,6 +23,22 @@ http {
sendfile on;
keepalive_timeout 65;
+
+ # Static assets only. API responses arrive already gzipped from the node
+ # backend, and gzip_proxied would otherwise have nginx decompress and
+ # recompress them for nothing.
+ gzip on;
+ gzip_vary on;
+ gzip_min_length 2048;
+ gzip_comp_level 5;
+ gzip_types
+ text/plain
+ text/css
+ text/javascript
+ application/javascript
+ application/json
+ application/wasm
+ image/svg+xml;
client_header_timeout 300s;
set_real_ip_from 127.0.0.1;
@@ -54,11 +72,11 @@ http {
server {
listen ${PORT};
server_name _;
+ client_max_body_size 50m;
absolute_redirect off;
add_header X-Content-Type-Options nosniff always;
- add_header X-XSS-Protection "1; mode=block" always;
location ^~ /.well-known/acme-challenge/ {
root /app/data/acme-webroot;
@@ -69,6 +87,7 @@ http {
location = /sw.js {
root /app/html;
expires off;
+ add_header X-Content-Type-Options nosniff always;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
try_files $uri =404;
}
@@ -76,31 +95,58 @@ http {
location = /manifest.json {
root /app/html;
expires off;
+ add_header X-Content-Type-Options nosniff always;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
try_files $uri =404;
}
- location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
+ location ^~ /assets/ {
root /app/html;
expires 1y;
+ add_header X-Content-Type-Options nosniff always;
add_header Cache-Control "public, max-age=31536000, immutable" always;
try_files $uri =404;
}
+ location ^~ /fonts/ {
+ root /app/html;
+ expires 1y;
+ add_header X-Content-Type-Options nosniff always;
+ add_header Cache-Control "public, max-age=31536000, immutable" always;
+ try_files $uri =404;
+ }
+
+ location ^~ /icons/ {
+ root /app/html;
+ expires 30d;
+ add_header X-Content-Type-Options nosniff always;
+ add_header Cache-Control "public, max-age=2592000" always;
+ try_files $uri =404;
+ }
+
+ location ~* ^/[^/]+\.(js|css|png|jpe?g|gif|ico|svg|webp|woff2?|ttf|eot)$ {
+ root /app/html;
+ expires 30d;
+ add_header X-Content-Type-Options nosniff always;
+ add_header Cache-Control "public, max-age=2592000" always;
+ try_files $uri =404;
+ }
+
+ location ~* \.map$ {
+ access_log off;
+ log_not_found off;
+ return 404;
+ }
+
location / {
root /app/html;
index index.html index.htm;
expires off;
+ add_header X-Content-Type-Options nosniff always;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
try_files $uri $uri/ /index.html;
}
- location ~* \.map$ {
- return 404;
- access_log off;
- log_not_found off;
- }
-
location ~ ^/users/sessions(/.*)?$ {
proxy_pass http://127.0.0.1:30001;
proxy_http_version 1.1;
@@ -148,6 +194,30 @@ http {
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
}
+ location ~ ^/ai(/.*)?$ {
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+
+ # The chat endpoint streams server-sent events; buffering would
+ # hold tokens back until the whole reply finished.
+ proxy_read_timeout 600s;
+ proxy_buffering off;
+ proxy_cache off;
+ }
+
+ location ~ ^/automations(/.*)?$ {
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+ }
+
location ~ ^/alert-rules(/.*)?$ {
proxy_pass http://127.0.0.1:30001;
proxy_http_version 1.1;
@@ -206,6 +276,21 @@ http {
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
}
+ location ~ ^/fleets(/.*)?$ {
+ client_max_body_size 200m;
+
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+
+ proxy_connect_timeout 60s;
+ proxy_send_timeout 600s;
+ proxy_read_timeout 600s;
+ }
+
location ~ ^/vault(/.*)?$ {
proxy_pass http://127.0.0.1:30001;
proxy_http_version 1.1;
@@ -215,6 +300,15 @@ http {
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
}
+ location ~ ^/sync(/.*)?$ {
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+ }
+
location ~ ^/termix-id(/.*)?$ {
proxy_pass http://127.0.0.1:30001;
proxy_http_version 1.1;
@@ -272,6 +366,15 @@ http {
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
}
+ location ~ ^/workspaces(/.*)?$ {
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+ }
+
location ~ ^/user-preferences(/.*)?$ {
proxy_pass http://127.0.0.1:30001;
proxy_http_version 1.1;
@@ -281,6 +384,33 @@ http {
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
}
+ location ~ ^/host-sidebar(/.*)?$ {
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+ }
+
+ location ~ ^/credential-sidebar(/.*)?$ {
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+ }
+
+ location ~ ^/ui-preferences(/.*)?$ {
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+ }
+
location ~ ^/database(/.*)?$ {
client_max_body_size 5G;
client_body_timeout 300s;
@@ -352,7 +482,8 @@ http {
proxy_cache_bypass 1;
proxy_no_cache 1;
- add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
+ add_header X-Content-Type-Options nosniff always;
+ add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
}
location ~ ^/host/opkssh-callback(/.*)?$ {
@@ -367,7 +498,8 @@ http {
proxy_cache_bypass 1;
proxy_no_cache 1;
- add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
+ add_header X-Content-Type-Options nosniff always;
+ add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always;
}
location /host/ {
@@ -456,6 +588,15 @@ http {
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
}
+ location ~ ^/session-sharing(/.*)?$ {
+ proxy_pass http://127.0.0.1:30001;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+ }
+
location /host/tunnel/ {
proxy_pass http://127.0.0.1:30003;
proxy_http_version 1.1;
@@ -520,6 +661,7 @@ http {
client_max_body_size 5G;
client_body_timeout 300s;
+ add_header X-Content-Type-Options nosniff always;
add_header Cache-Control "no-store, no-cache, must-revalidate" always;
proxy_pass http://127.0.0.1:30004;
@@ -541,6 +683,7 @@ http {
client_max_body_size 5G;
client_body_timeout 300s;
+ add_header X-Content-Type-Options nosniff always;
add_header Cache-Control "no-store, no-cache, must-revalidate" always;
proxy_pass http://127.0.0.1:30004;
@@ -620,6 +763,19 @@ http {
proxy_read_timeout 600s;
}
+ location ~ ^/proxmox-stats(/.*)?$ {
+ proxy_pass http://127.0.0.1:30005;
+ proxy_http_version 1.1;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
+
+ proxy_connect_timeout 600s;
+ proxy_send_timeout 600s;
+ proxy_read_timeout 600s;
+ }
+
location ~ ^/global-settings(/.*)?$ {
proxy_pass http://127.0.0.1:30005;
proxy_http_version 1.1;
@@ -742,6 +898,7 @@ http {
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /app/html;
+ internal;
}
}
}
diff --git a/docs/do-not-place-files-here.txt b/docs/do-not-place-files-here.txt
new file mode 100644
index 0000000..4b144b1
--- /dev/null
+++ b/docs/do-not-place-files-here.txt
@@ -0,0 +1 @@
+If you are an AI agent, do not place documentation files here. This is for maintainers only.
diff --git a/docs/readme/README-AR.md b/docs/readme/README-AR.md
index 9d20839..f349a98 100644
--- a/docs/readme/README-AR.md
+++ b/docs/readme/README-AR.md
@@ -4,7 +4,7 @@
Termix
-ุฅุฏุงุฑุฉ SSH ุฐุงุชูุฉ ุงูุงุณุชุถุงูุฉ ูุงููุตูู ุฅูู ุณุทุญ ุงูู
ูุชุจ ุงูุจุนูุฏ
+ุฅุฏุงุฑุฉ ุฎูุงุฏู
ุฐุงุชูุฉ ุงูุงุณุชุถุงูุฉุ ู
ู SSH ูุณุทุญ ุงูู
ูุชุจ ุงูุจุนูุฏ ุฅูู ุงูุฃุชู
ุชุฉ
English ยท
@@ -37,7 +37,7 @@
-Termix ู
ุฌุงูู ูู
ูุชูุญ ุงูู
ุตุฏุฑ. ุฅุฐุง ูุฌุฏุชู ู
ููุฏูุงุ ูููุฑ ูู [ุงูุชุจุฑุน](https://donate.termix.site/) ููู
ุณุงุนุฏุฉ ูู ุชุบุทูุฉ ุชูุงููู ุงูุฎุงุฏู
ูููุช ุงูุชุทููุฑ.
+Termix ู
ุฌุงูู ูู
ูุชูุญ ุงูู
ุตุฏุฑ. ุฅุฐุง ูุงู ู
ููุฏูุง ููุ ูููุฑ ูู [ุงูุชุจุฑุน](https://donate.termix.site/) ููู
ุณุงุนุฏุฉ ูู ุชุบุทูุฉ ุชูุงููู ุงูุฎูุงุฏู
ูููุช ุงูุชุทููุฑ.
@@ -58,7 +58,7 @@ Termix ู
ุฌุงูู ูู
ูุชูุญ ุงูู
ุตุฏุฑ. ุฅุฐุง ูุฌุฏุชู ู
ููุฏูุงุ ู
## ูุธุฑุฉ ุนุงู
ุฉ
-Termix ูู ู
ูุตุฉ ู
ูุชูุญุฉ ุงูู
ุตุฏุฑ ูู
ุฌุงููุฉ ููุฃุจุฏ ูุฐุงุชูุฉ ุงูุงุณุชุถุงูุฉ ูุฅุฏุงุฑุฉ ุงูุฎูุงุฏู
ุจุดูู ุดุงู
ู. ุชููุฑ ุญูุงู ู
ุชุนุฏุฏ ุงูู
ูุตุงุช ูุฅุฏุงุฑุฉ ุฎูุงุฏู
ู ูุจููุชู ุงูุชุญุชูุฉ ู
ู ุฎูุงู ูุงุฌูุฉ ูุงุญุฏุฉ ูุณููุฉ ุงูุงุณุชุฎุฏุงู
. ูููุฑ Termix ุงููุตูู ุฅูู ุทุฑููุฉ SSHุ ูุงูุชุญูู
ูู ุณุทุญ ุงูู
ูุชุจ ุงูุจุนูุฏ (RDPุ VNCุ Telnet)ุ ููุฏุฑุงุช ุฅูุดุงุก ุฃููุงู SSHุ ูุฅุฏุงุฑุฉ ู
ููุงุช SSH ุนู ุจูุนุฏุ ูุงูุนุฏูุฏ ู
ู ุงูุฃุฏูุงุช ุงูุฃุฎุฑู. ููุนุฏ Termix ุงูุจุฏูู ุงูู
ุซุงูู ุงูู
ุฌุงูู ูุฐุงุชู ุงูุงุณุชุถุงูุฉ ูู Termius ุงูู
ุชุงุญ ูุฌู
ูุน ุงูู
ูุตุงุช.
+Termix ู
ูุตุฉ ู
ุฌุงููุฉ ูู
ูุชูุญุฉ ุงูู
ุตุฏุฑ ูุฐุงุชูุฉ ุงูุงุณุชุถุงูุฉ ูุฅุฏุงุฑุฉ ุฎูุงุฏู
ู. ุชุฌู
ุน ูู ู
ูุงู ูุงุญุฏ ุทุฑููุงุช SSH ูุฃุณุทุญ ุงูู
ูุชุจ ุงูุจุนูุฏุฉ (RDP ูVNC ูTelnet) ูููู ุงูู
ููุงุช ูุงูุฃููุงู ูDocker ูุงูู
ูุงููุณ ูุงูุฃุชู
ุชุฉุ ุนูู ุงูููุจ ูุณุทุญ ุงูู
ูุชุจ ูุงููุงุชู. ุฅูู ุจุฏูู ุฐุงุชู ุงูุงุณุชุถุงูุฉ ูู Termius ููุจูู ู
ุฌุงูููุง ุฅูู ุงูุฃุจุฏ.
@@ -68,42 +68,42 @@ Termix ูู ู
ูุตุฉ ู
ูุชูุญุฉ ุงูู
ุตุฏุฑ ูู
ุฌุงููุฉ ููุฃุจุฏ ูุฐุง
-**ุงููุตูู ุฅูู ุทุฑููุฉ SSH:**
-ุทุฑููุฉ ูุงู
ูุฉ ุงูู
ูุฒุงุช ู
ุน ุฏุนู
ุชูุณูู
ุงูุดุงุดุฉ (ุญุชู 4 ููุญุงุช) ู
ุน ูุธุงู
ุนูุงู
ุงุช ุชุจููุจ ุดุจูู ุจุงูู
ุชุตูุญ. ูุชุถู
ู ุฏุนู
ุชุฎุตูุต ุงูุทุฑููุฉ ุจู
ุง ูู ุฐูู ุณู
ุงุช ุงูุทุฑููุฉ ุงูุดุงุฆุนุฉ ูุงูุฎุทูุท ูุงูู
ูููุงุช ุงูุฃุฎุฑู.
+**ุทุฑููุฉ SSH:**
+ุทุฑููุฉ ูุงู
ูุฉ ุจุนูุงู
ุงุช ุชุจููุจ ู
ุซู ุงูู
ุชุตูุญ ูุชูุณูู
ููุดุงุดุฉุ ุญุชู 6 ููุญุงุช ูู ููุช ูุงุญุฏ. ุงุฎุชุฑ ุงูุณู
ุฉ ูุงูุฎุท ูุงูุฃููุงู. ููุฌุฏ ููู ูู ุฌูุณุฉ ุดุฑูุท ูุนุฑุถ ุงูู
ุนุงูุฌ ูุงูุฐุงูุฑุฉ ูุงููุฑุต ูุญุธููุงุ ู
ุน ุฑูุงุจุท ุณุฑูุนุฉ ุฅูู ู
ููุงุช ุฐูู ุงูู
ุถูู ูDocker ูุงูุฃููุงู ูุงูู
ูุงููุณ.
-**ุงููุตูู ุฅูู ุณุทุญ ุงูู
ูุชุจ ุงูุจุนูุฏ:**
-ุฏุนู
RDP ู VNC ู Telnet ุนุจุฑ ุงูู
ุชุตูุญ ู
ุน ุชุฎุตูุต ูุงู
ู ูุชูุณูู
ุงูุดุงุดุฉ.
+**ุณุทุญ ุงูู
ูุชุจ ุงูุจุนูุฏ:**
+RDP ูVNC ูTelnet ุฏุงุฎู ุงูู
ุชุตูุญุ ูู ุนูุงู
ุงุช ุชุจููุจ ูุดุงุดุฉ ู
ูุณูู
ุฉ ู
ุซู ุฃู ุฌูุณุฉ ุฃุฎุฑู. ูุชุถู
ู ู
ุชุตูุญ ู
ููุงุช ูุฃูุฑุงุต RDP ูุฑูุนูุง ุจุงูุณุญุจ ูุงูุฅููุงุช. ุนูู ุณุทุญ ู
ูุชุจ Windows ูู
ููู ุฃูุถูุง ูุชุญ ุงูู
ุถูู ูู ุนู
ูู RDP ุงูุฃุตูู.
-**ุฅุฏุงุฑุฉ ุฃููุงู SSH:**
-ุฅูุดุงุก ูุฅุฏุงุฑุฉ ุฃููุงู SSH ุจูู ุงูุฎูุงุฏู
ู
ุน ุฅุนุงุฏุฉ ุงูุงุชุตุงู ุงูุชููุงุฆู ูู
ุฑุงูุจุฉ ุงูุญุงูุฉ ูุฅุนุงุฏุฉ ุงูุชูุฌูู ุงูู
ุญูู ุฃู ุงูุจุนูุฏ ุฃู SOCKS ุงูุฏููุงู
ููู. ูุชู
ุชุฎุฒูู ุฅุนุฏุงุฏุงุช ููู ุงูุนู
ูู-ุงูู
ูุชุจู ุฅูู ุงูุณูุฑูุฑ ู
ุญููุงู ููู ุชุซุจูุช ู
ูุชุจูุ ููู
ูู ุญูุธ ููุทุงุช C2S ุงูุงุฎุชูุงุฑูุฉ ุนูู ุงูุฎุงุฏู
ูุฅุนุงุฏุฉ ุชุณู
ูุชูุง ูุชุญู
ูููุง ุฃู ุญุฐููุง ุนูุฏู
ุง ุชุฑูุฏ ููู ุชูููู ุงูููู ุงูู
ุญูู ุจูู ุงูุนู
ูุงุก.
+**ุฃููุงู SSH:**
+ุฅุนุงุฏุฉ ุชูุฌูู ู
ุญููุฉ ูุจุนูุฏุฉ ูSOCKS ุฏููุงู
ูููุฉุ ู
ุน ุฅุนุงุฏุฉ ุงุชุตุงู ุชููุงุฆูุฉ ููุญูุต ููุญุงูุฉ. ุชูุญูุธ ุฃููุงู ุงูุนู
ูู ุฅูู ุงูุฎุงุฏู
ูู ุชุทุจูู ุณุทุญ ุงูู
ูุชุจ ุนูู ุฐูู ุงูุฌูุงุฒุ ููู
ููู ุญูุธ ุฅุนุฏุงุฏุงุช ุฌุงูุฒุฉ ุนูู ุงูุฎุงุฏู
ูููู ุงูุชููุฆุฉ ุฅูู ุฌูุงุฒ ุขุฎุฑ.
-**ู
ุฏูุฑ ุงูู
ููุงุช ุนู ุจูุนุฏ:**
-ุฅุฏุงุฑุฉ ุงูู
ููุงุช ู
ุจุงุดุฑุฉ ุนูู ุงูุฎูุงุฏู
ุงูุจุนูุฏุฉ ู
ุน ุฏุนู
ุนุฑุถ ูุชุญุฑูุฑ ุงูููุฏ ูุงูุตูุฑ ูุงูุตูุช ูุงูููุฏูู. ุฑูุน ูุชูุฒูู ูุฅุนุงุฏุฉ ุชุณู
ูุฉ ูุญุฐู ูููู ุงูู
ููุงุช ุจุณูุงุณุฉ ู
ุน ุฏุนู
sudo. ูุชุถู
ู ุฏุนู
ููู ุงูู
ููุงุช ู
ู ุฎุงุฏู
ุฅูู ุขุฎุฑ.
+**ู
ุฏูุฑ ุงูู
ููุงุช:**
+ุชุตูุญ ุงูู
ููุงุช ูุญุฑูุฑูุง ูุงุฑูุนูุง ููุฒูููุง ูุฃุนุฏ ุชุณู
ูุชูุง ูุงููููุง ูุงุญุฐููุง ุนุจุฑ SFTPุ ู
ุน ุฏุนู
sudo. ุงุนุฑุถ ูุญุฑูุฑ ุงูุดููุฑุฉ ูุงูุตูุฑ ูุงูุตูุช ูุงูููุฏูู. ุงูุณุฎ ุงูู
ููุงุช ู
ุจุงุดุฑุฉ ู
ู ุฎุงุฏู
ุฅูู ุขุฎุฑุ ู
ุน ุงุฎุชูุงุฑ ุฃุณุฑุน ู
ุณุงุฑ ุชููุงุฆููุง ูุงูุชุญูู ู
ู ุณูุงู
ุฉ ุงูููู.
-**ุฅุฏุงุฑุฉ Docker ู Podman:**
-ุชุดุบูู ูุฅููุงู ูุชุนููู ูุญุฐู ุงูุญุงููุงุช. ุนุฑุถ ุฅุญุตุงุฆูุงุช ุงูุญุงููุงุช. ุงูุชุญูู
ูู ุงูุญุงููุฉ ุจุงุณุชุฎุฏุงู
ุทุฑููุฉ docker exec. ูุฏุนู
ููุงู ู
ู Docker ู Podman ูุจูุฆุฉ ุชุดุบูู ููุญุงููุงุช. ูู
ููุตู
ู
ููุญู ู
ุญู Portainer ุฃู Dockge ุจู ูุฅุฏุงุฑุฉ ุญุงููุงุชู ุจุจุณุงุทุฉ ู
ูุงุฑูุฉ ุจุฅูุดุงุฆูุง.
+**Docker ูPodman:**
+ุดุบูู ุงูุญุงููุงุช ูุฃููููุง ูุนููููุง ูุงุญุฐููุงุ ูุชุงุจุน ุฅุญุตุงุกุงุชูุงุ ูุงูุชุญ ุทุฑููุฉ ุฏุงุฎู ุฅุญุฏุงูุง. ูุนู
ู ู
ุน Docker ูPodman ู
ุนูุง. ููุณ ุจุฏููุงู ุนู Portainer ุฃู Dockgeุ ุจู ูุณููุฉ ูุฅุฏุงุฑุฉ ุงูุญุงููุงุช ุงูู
ูุฌูุฏุฉ ูุฏูู.
-**ู
ุฏูุฑ ู
ุถููุงุช SSH:**
-ุญูุธ ูุชูุธูู
ูุฅุฏุงุฑุฉ ุงุชุตุงูุงุช SSH ุงูุฎุงุตุฉ ุจู ุจุงุณุชุฎุฏุงู
ุงูุนูุงู
ุงุช ูุงูู
ุฌูุฏุงุช (ู
ุน ุฏุนู
ุชุฎุตูุต ุงูู
ุฌูุฏุงุช ูุงูู
ุฌูุฏุงุช ุงูู
ุชุฏุงุฎูุฉ)ุ ูุญูุธ ุจูุงูุงุช ุชุณุฌูู ุงูุฏุฎูู ุงููุงุจูุฉ ูุฅุนุงุฏุฉ ุงูุงุณุชุฎุฏุงู
ุจุณูููุฉ ู
ุน ุฅู
ูุงููุฉ ุฃุชู
ุชุฉ ูุดุฑ ู
ูุงุชูุญ SSH.
+**ู
ุฏูุฑ ุงูู
ุถููุงุช:**
+ุงุญูุธ ู
ุถููุงุชู ููุธูู
ูุง ุจุงููุณูู
ูู
ุฌูุฏุงุช ู
ุชุฏุงุฎูุฉ ูู
ููู ุชุณู
ูุชูุง ูุชูููููุง. ุฃุนุฏ ุงุณุชุฎุฏุงู
ุจูุงูุงุช ุงูุฏุฎูู ุงูู
ุญููุธุฉ ุนุจุฑ ุนุฏุฉ ู
ุถููุงุชุ ูุงูุดุฑ ู
ูุงุชูุญ SSH ุชููุงุฆููุงุ ูุงุฌู
ุน ุงูู
ุถููุงุช ุชุญุช ู
ุถูู ุฑุฆูุณูุ ูุญุฑูุฑ ูุตุฏูุฑ ุฏูุนุฉ ูุงุญุฏุฉุ ูุงุณุชุฎุฏู
ุงูุงุชุตุงู ุงูุณุฑูุน ููุงุชุตุงูุงุช ุงูุนุงุจุฑุฉ ุงูุชู ูุง ุชุฑูุฏ ุญูุธูุง.
@@ -111,83 +111,139 @@ Termix ูู ู
ูุตุฉ ู
ูุชูุญุฉ ุงูู
ุตุฏุฑ ูู
ุฌุงููุฉ ููุฃุจุฏ ูุฐุง
**ู
ูุงููุณ ุงูู
ุถูู:**
-ุนุฑุถ ุงุณุชุฎุฏุงู
ุงูู
ุนุงูุฌ ูุงูุฐุงูุฑุฉ ูุงููุฑุต ูุงูุดุจูุฉ ูููุช ุงูุชุดุบูู ูู
ุนููู
ุงุช ุงููุธุงู
ูุฌุฏุงุฑ ุงูุญู
ุงูุฉ ูู
ุฑุงูุจ ุงูู
ูุงูุฐ ูุนุงุฑุถ ุงูุณุฌูุงุช ูุงูู
ุณุชุฎุฏู
ูู/ุงูุตูุงุญูุงุช ูุงูุดูุงุฏุงุช ูุบูุฑูุง ุงููุซูุฑุ ุชุนู
ู ุนูู ู
ุนุธู
ุงูุฎูุงุฏู
ุงูู
ุจููุฉ ุนูู Linux. ูุชุถู
ู ุฑุณูู
ุจูุงููุฉ ุชุงุฑูุฎูุฉ ุฒู
ููุฉ ุงูุณูุณูุฉ ูุชูุจููุงุช ูุงุฆู
ุฉ ุนูู ุงูุญุฏูุฏ ู
ุน ุฏุนู
ntfy ูุงูู webhook.
+ุงูู
ุนุงูุฌ ูุงูุฐุงูุฑุฉ ูุงููุฑุต ูุงูุดุจูุฉ ูุงูุญุฑุงุฑุฉ ูู
ุฏุฉ ุงูุชุดุบูู ูุงูุนู
ููุงุช ูุงูู
ูุงูุฐ ูุชุณุฌููุงุช ุงูุฏุฎูู ูู
ุนููู
ุงุช ุงููุธุงู
ุนูู ู
ุนุธู
ุฎูุงุฏู
Linuxุ ู
ุน ุฑุณูู
ุจูุงููุฉ ููุณุฌู. ุชุชูุญ ูู ุจุทุงูุงุช ุงูุฅุฏุงุฑุฉ ุงูุชุนุงู
ู ู
ุน ุงูุฎุฏู
ุงุช ูู
ูุงู
cron ูุงูุญุฒู
ูุงูู
ุณุชุฎุฏู
ูู ูููุงุนุฏ ุงูุฌุฏุงุฑ ุงููุงุฑู ูWireGuard ูTailscale ูุดูุงุฏุงุช SSL ูุงูุณุฌูุงุช ููุญูุต ุงูุณูุงู
ุฉ ุฏูู ู
ุบุงุฏุฑุฉ Termix.
-**ู
ุตุงุฏูุฉ ุงูู
ุณุชุฎุฏู
ูู:**
-ุฅุฏุงุฑุฉ ุขู
ูุฉ ููู
ุณุชุฎุฏู
ูู ู
ุน ุถูุงุจุท ุฅุฏุงุฑูุฉ (ูู
ูู ุชุนุฏูู ู
ุนููู
ุงุช ุงูู
ุณุชุฎุฏู
ูู ุงูุขุฎุฑูู) ูุฏุนู
OIDC/LDAP/SSO (ู
ุน ุงูุชุญูู
ูู ุงููุตูู) ู 2FA (TOTP) ูุฏุนู
ู
ูุงุชูุญ ุงูู
ุฑูุฑ (WebAuthn). ุนุฑุถ ุฌูุณุงุช ุงูู
ุณุชุฎุฏู
ูู ุงููุดุทุฉ ุนุจุฑ ุฌู
ูุน ุงูู
ูุตุงุช ูุฅูุบุงุก ุงูุตูุงุญูุงุช. ุฑุจุท ุญุณุงุจุงุช OIDC/ุงูู
ุญููุฉ ู
ุนุงู. ุนุฑุถ ุณุฌู ุชุฏููู ูุฌู
ูุน ุฅุฌุฑุงุกุงุช ุงูู
ุณุชุฎุฏู
ูู.
+**ุงูุฃุชู
ุชุฉ:**
+ุงุฎุชุฑ ู
ูุดุบููููุง ุซู
ุญุฏูุฏ ู
ุง ููุจุบู ุฃู ูุญุฏุซ. ุชุดู
ู ุงูู
ุดุบููุงุช ุชุฌุงูุฒ ู
ููุงุณ ูุญุฏ ู
ุนููุ ุฃู ู
ุถูููุง ูุณูุท ุฃู ูุนูุฏุ ุฃู ุชุบููุฑ ูุญุต ุงูุณูุงู
ุฉุ ุฃู ุฌุฏูููุง ุฒู
ูููุงุ ุฃู ุญุฏุซ ุญุงููุฉุ ุฃู webhook ูุงุฑุฏูุง. ูู
ูู ููุฎุทูุงุช ุชุดุบูู ุฃูุงู
ุฑ ูู
ูุชุทูุงุชุ ูุงูุชุญูู
ูู ุงูุญุงููุงุช ูุงูุฃููุงูุ ูุฅููุงุธ ู
ุถููุ ูุงุณุชุฏุนุงุก ุฑุงุจุทุ ูุงูุงูุชุธุงุฑุ ูุงูุชูุฑุน ุญุณุจ ุดุฑุทุ ูุชุดุบูู ุฃุชู
ุชุฉ ุฃุฎุฑูุ ูุฅุดุนุงุฑู ุนุจุฑ ntfy ุฃู Discord ุฃู webhook. ุชุชูุญ ูู ุนู
ููุงุช ุงูุชุดุบูู ุงูุชุฌุฑูุจู ุงูุชุฌุฑุจุฉ ุจุฃู
ุงู ุฃูููุง.
-**ุชูุงู
ู Tailscale:**
-ุนุฑุถ ุฃุฌูุฒุฉ ุดุจูุชู ู
ู Tailscale ูุฅุถุงูุชูุง ุจุณุฑุนุฉ ูู
ุถููุงุชุ ูุงูุงุชุตุงู ุนุจุฑ Tailscale SSH ูุทุฑููุฉ ู
ุตุงุฏูุฉุ ู
ู
ุง ูุชูุญ ูููุงุฆู
ุชุญูู
ุงููุตูู ูู Tailscale ุงูุชุนุงู
ู ู
ุน ุงูุชูููุถ ุฏูู ุงูุญุงุฌุฉ ูุชุฎุฒูู ุจูุงูุงุช ุงุนุชู
ุงุฏ.
+**ุงูุฃุณุงุทูู:**
+ุงุฌู
ุน ุงูู
ุถููุงุช ูู ุฃุณุทูู ุจุงุฎุชูุงุฑูุง ูุฏูููุง ุฃู ุจููุงุนุฏ ุงููุณูู
ุ ูุชูุถู
ุงูู
ุถููุงุช ุงูุฌุฏูุฏุฉ ุชููุงุฆููุง. ุดุบูู ุฃู
ุฑูุง ูุงุญุฏูุง ุนูู ูู ุงูู
ุถููุงุช ุฏูุนุฉ ูุงุญุฏุฉุ ูุงุฏูุน ุงูู
ููุงุช ูุงุณุญุจูุง ู
ู ุฌู
ูุนูุงุ ูุซุจูุช ุงูุญุฒู
ุ ูุงุฌู
ุน ุฌุฑุฏูุง ุจูุธุงู
ุงูุชุดุบูู ูุงูููุงุฉ ูุงูู
ุนู
ุงุฑูุฉ ูู
ุฏุฉ ุงูุชุดุบูู.
-**RBAC/ุงูู
ุดุงุฑูุฉ:**
-ุฅูุดุงุก ุงูุฃุฏูุงุฑ ูู
ุดุงุฑูุฉ ุงูู
ุถููุงุช ุนุจุฑ ุงูู
ุณุชุฎุฏู
ูู/ุงูุฃุฏูุงุฑ. ูุฏุนู
ุฌู
ูุน ุฃููุงุน ุงูู
ุตุงุฏูุฉ ูุฌู
ูุน ุจุฑูุชููููุงุช ุงูู
ุถูู.
+**ู
ุณุงุนุฏ ุงูุฐูุงุก ุงูุงุตุทูุงุนู:**
+ู
ูุฒุฉ ุงุฎุชูุงุฑูุฉ ูู
ุนุทูุฉ ุญุชู ุชูุนูููุง ุจููุณู. ุงุฑุจุท OpenAI ุฃู Anthropic ุฃู Gemini ุฃู Ollama ุฃู ุฃู ููุทุฉ ูุตูู ู
ุชูุงููุฉ ู
ุน OpenAI ูุงุณุฃู ุนู ุฅุนุฏุงุฏุงุชู. ูู
ููู ูุฑุงุกุฉ ุงูู
ุถููุงุช ูุงูุฃุณุงุทูู ูุงูู
ูุชุทูุงุช ูุงูุชูุจููุงุชุ ูููุชุฑุญ ุงูุชุบููุฑุงุช ูุชูุงูู ุนูููุง ุจุฏููุง ู
ู ุชูููุฐูุง ุจููุณู. ูุง ูู
ููู ุฃุจุฏูุง ุงููุตูู ุฅูู ุจูุงูุงุช ุงูุฏุฎูู ุฃู ุงูู
ุณุชุฎุฏู
ูู ุฃู ุงูุฅุนุฏุงุฏุงุช. ูุณุชุทูุน ุงูู
ุณุคูููู ุชุนุทููู ูููุธุงู
ุจุงููุงู
ูุ ููู
ููู ุฅุฎูุงุคู ุฃุซูุงุก ุงูุฅุนุฏุงุฏ.
-**ุงูุงุชุตุงูุงุช ุงูุชุณูุณููุฉ:**
-ุงูุงุชุตุงู ุจุงูุฃุฌูุฒุฉ ุงูุชุณูุณููุฉ (ุฃุฌูุฒุฉ ุงูุชูุฌูู ูุงูู
ูุงุชูุญ ูุงูู
ุชุญูู
ุงุช ุงูุฏูููุฉ ูุบูุฑูุง) ู
ุจุงุดุฑุฉ ู
ู ุงูู
ุชุตูุญ ุฃู ุชุทุจูู ุณุทุญ ุงูู
ูุชุจ. ุถุจุท ู
ุนุฏู ููู ุงูุจูุงูุงุช ูุจุชุงุช ุงูุจูุงูุงุช ูุจุชุงุช ุงูุชููู ูุงูุชูุงูุค. ูุณุชุฎุฏู
Web Serial API ูู ุงูู
ุชุตูุญุงุช ุงูู
ุฏุนูู
ุฉ ุฃู ุฎูููุฉ ุฃุตููุฉ ูู ุชุทุจูู Electron.
+**ุชุณุฌูู ุงูุฏุฎูู ูุงูู
ุณุชุฎุฏู
ูู:**
+ุญุณุงุจุงุช ู
ุญููุฉ ุฅุถุงูุฉ ุฅูู ุชุณุฌูู ุงูุฏุฎูู ุนุจุฑ OIDC ูLDAP ูGitHub ูGoogleุ ู
ุน ุงูุชุญูู ุจุฎุทูุชูู (TOTP) ูู
ูุงุชูุญ ุงูู
ุฑูุฑ (WebAuthn) ูุงูุฃุฌูุฒุฉ ุงูู
ูุซููุฉ. ูุณุชุทูุน ุงูู
ุณุคูููู ุฅุฏุงุฑุฉ ุงูู
ุณุชุฎุฏู
ูู ูุฑุจุท ู
ุฌู
ูุนุงุช OIDC ุจุงูุฃุฏูุงุฑ ูุฑุคูุฉ ูู ุงูุฌูุณุงุช ุงููุดุทุฉ ุนูู ุฌู
ูุน ุงูู
ูุตุงุช ูุฅูุบุงุคูุง. ุงุฑุจุท ุญุณุงุจู ุงูู
ุญูู ุจุญุณุงุจ OIDCุ ูุงุทููุน ุนูู ุณุฌู ุงูุชุฏููู ูู
ุง ูุนูู ุงูุฌู
ูุน.
+**ุงูุฃุฏูุงุฑ ูุงูู
ุดุงุฑูุฉ:**
+ุฃูุดุฆ ุฃุฏูุงุฑูุง ูุดุงุฑู ุงูู
ุถููุงุช ู
ุน ุงูู
ุณุชุฎุฏู
ูู ุฃู ุงูุฃุฏูุงุฑ ุนูู ุฃุฑุจุนุฉ ู
ุณุชููุงุช: ุงูุงุชุตุงู ูุงูุนุฑุถ ูุงูุชุญุฑูุฑ ูุงูุฅุฏุงุฑุฉ. ูุนู
ู ู
ุน ุฌู
ูุน ุฃููุงุน ุงูู
ุตุงุฏูุฉ ูุฌู
ูุน ุงูุจุฑูุชููููุงุชุ ููู
ููู ุชุฌุงูุฒ ุจูุงูุงุช ุงูุฏุฎูู ุงูู
ุณุชุฎุฏู
ุฉ ูู
ุถูู ู
ุดุชุฑู.
+
+
+
+
+
+
**ุงูุชูุจููุงุช:**
-ุถุจุท ููุงุนุฏ ุชูุจูู ูุงุฆู
ุฉ ุนูู ุงูุญุฏูุฏ ูู
ูุงููุณ ุงูู
ุถูู (ุงูู
ุนุงูุฌ ูุงูุฐุงูุฑุฉ ูุงููุฑุต ูุบูุฑูุง) ูุงูุญุตูู ุนูู ุฅุดุนุงุฑุงุช ุนุจุฑ ntfy ุฃู webhooks ุนูุฏ ุฅุทูุงููุง. ุนุฑุถ ุงูุชูุจููุงุช ุงููุดุทุฉ ูุงูู
ุญูููุฉ ูู ุณุฌู ุงูุชุงุฑูุฎ.
+ุถุน ููุงุนุฏ ุนูู ู
ูุงููุณ ุงูู
ุถูู ู
ุซู ุงูู
ุนุงูุฌ ูุงูุฐุงูุฑุฉ ูุงููุฑุตุ ูุชูููู ุฅุดุนุงุฑูุง ุนุจุฑ ntfy ุฃู Discord ุฃู webhook ุนูุฏ ุชูุนูููุง. ุงุทููุน ุนูู ุงูุชูุจููุงุช ุงููุดุทุฉ ูุงูู
ูุชููุฉ ูู ุณุฌูุ ูุชุฌุงูู ู
ุง ูุง ููู
ู ู
ููุง.
-
-
**ุงูุตูุญุฉ ุงูุฑุฆูุณูุฉ:**
-ุตูุญุฉ ุฑุฆูุณูุฉ ูุงุจูุฉ ููุชุฎุตูุต ุจุงููุงู
ู ู
ุน ุดุจูุฉ ุฃุฏูุงุช ูุงุจูุฉ ููุณุญุจ ูุงูุฅููุงุช. ุฃุถู ุฃุฏูุงุช ูุญุงูุฉ ุงูู
ุถูู ูุฑูุงุจุท ุงูุฎุฏู
ุงุช ูุงูุณุงุนุงุช ูุงูู
ูุงุญุธุงุช ูุฎูุงุตุงุช RSS ูุงูุทูุณ ูุญุงููุงุช Docker ูู
ุฎุทุทุงุช ู
ูุงููุณ ุงูู
ุถูู ูุงูุทุฑููุงุช ุงูู
ุถู
ูุฉ ูุงูุฅุทุงุฑุงุช ุงูู
ุถู
ูุฉ ูุฃูุซุฑ.
-
-
-
-
-**ุชุดููุฑ ูุงุนุฏุฉ ุงูุจูุงูุงุช:**
-ููุฎุฒููู ุงูุฎุงุฏู
ุงูุฎููู ูู
ููุงุช ูุงุนุฏุฉ ุจูุงูุงุช SQLite ู
ุดูุฑุฉ. ุงุทูุน ุนูู [ุงููุซุงุฆู](https://docs.termix.site/security) ูู
ุฒูุฏ ู
ู ุงูู
ุนููู
ุงุช.
+ุดุจูุฉ ุนูุงุตุฑ ุชุจูููุง ุจููุณู ุจุงูุณุญุจ ูุงูุฅููุงุช. ููุงู ุนูุงุตุฑ ูุญุงูุฉ ุงูู
ุถููุงุช ูnping ูุฑูุงุจุท ุงูุฎุฏู
ุงุช ูุงูุฅุดุงุฑุงุช ุงูู
ุฑุฌุนูุฉ ูุงูุจุญุซ ูุงูุณุงุนุงุช ูุงูุชูููู
ุงุช ูุงูุนุฏ ุงูุชูุงุฒูู ูุงูู
ูุงุญุธุงุช ูRSS ูุงูุทูุณ ูุงูุตูุฑ ูุงูุฅุทุงุฑุงุช ุงูู
ุถู
ููุฉ ูDocker ูุงูุฃููุงู ูุฑุณูู
ุงูู
ูุงููุณ ููุงุฌูุงุช API ุงูุฎุงุตุฉ ุจูุ ูุญุชู ุทุฑููุฉ ุญูุฉ.
-**ุงูุฑุณู
ุงูุจูุงูู ููุดุจูุฉ:**
-ุชุฎุตูุต ููุญุฉ ุงูุชุญูู
ูุชุตูุฑ ู
ุฎุชุจุฑู ุงูู
ูุฒูู ุจูุงุกู ุนูู ุงุชุตุงูุงุช SSH ู
ุน ุฏุนู
ุงูุญุงูุฉ.
+**ุงูู
ูุชุทูุงุช ูุงูุฃุฏูุงุช:**
+ุงุญูุธ ุงูุฃูุงู
ุฑ ุงูุชู ุชุณุชุฎุฏู
ูุง ูุซูุฑูุง ูุดุบูููุง ุจููุฑุฉ ูุงุญุฏุฉุ ู
ุน ู
ุชุบูุฑุงุช ููู
ุถูู ููู
ุฏุฎูุงุชู ุงูุฎุงุตุฉ. ุดุบูู ุฃู
ุฑูุง ูุงุญุฏูุง ุนูู ูู ุงูุทุฑููุงุช ุงูู
ูุชูุญุฉุ ูุงุจุญุซ ูู ุณุฌู ุฃูุงู
ุฑู ู
ุน ุงูุฅูู
ุงู ุงูุชููุงุฆู.
-**ุฃุฏูุงุช SSH:**
-ุฅูุดุงุก ู
ูุชุทูุงุช ุฃูุงู
ุฑ ูุงุจูุฉ ูุฅุนุงุฏุฉ ุงูุงุณุชุฎุฏุงู
ุชูููููุฐ ุจููุฑุฉ ูุงุญุฏุฉ. ุชุดุบูู ุฃู
ุฑ ูุงุญุฏ ูู ููุช ูุงุญุฏ ุนุจุฑ ุนุฏุฉ ุทุฑููุงุช ู
ูุชูุญุฉ.
+**ู
ุดุงุฑูุฉ ุงูุฌูุณุฉ:**
+ุดุงุฑู ุฌูุณุฉ ุทุฑููุฉ ุฃู RDP ุฃู VNC ุฃู Telnet ู
ุจุงุดุฑุฉ. ุฃุฑุณู ุฑุงุจุทูุง ูู
ูู ูุฃู ุดุฎุต ุงูุงูุถู
ุงู
ุฅููู ุฏูู ุญุณุงุจุ ุฃู ุดุงุฑู ู
ุน ู
ุณุชุฎุฏู
Termix ู
ุญุฏุฏุ ูููุฑุงุกุฉ ููุท ุฃู ู
ุน ุตูุงุญูุฉ ุงููุชุงุจุฉ. ูู
ูู ุฃู ุชูุชูู ุงูู
ุดุงุฑูุงุช ุชููุงุฆููุง ุฃู ุชููุบู ูู ุฃู ููุชุ ููู
ูู ุฅููุงููุง ููููุง ุฃู ููู ู
ุถูู ุนูู ุญุฏุฉ.
-**ุนูุงู
ุงุช ุงูุชุจููุจ ุงูุฏุงุฆู
ุฉ:**
-ุชุจูู ุฌูุณุงุช SSH ูุนูุงู
ุงุช ุงูุชุจููุจ ู
ูุชูุญุฉ ุนุจุฑ ุงูุฃุฌูุฒุฉ/ุงูุชุญุฏูุซุงุช ุฅุฐุง ุชู
ุชูุนูููุง ูู ู
ูู ุชุนุฑูู ุงูู
ุณุชุฎุฏู
.
+**ุชุณุฌูู ุงูุฌูุณุงุช ูุงูุณุฌูุงุช:**
+ุณุฌูู ุฌูุณุงุช ุงูุทุฑููุฉ ูRDP ูVNC ูุดุงูุฏูุง ูุงุญููุง. ูุฒูู ุณุฌูุงุช ูุตูุฉ ููุฌูุณุฉุ ูุงุทููุน ุนูู ุณุฌู ุงูุงุชุตุงู ูุชุฑู ุจุงูุถุจุท ู
ุง ุฌุฑู ุฃุซูุงุก ุงูุงุชุตุงู.
+
+
+
+
+**ุงูุงุชุตุงูุงุช ุงูุชุณูุณููุฉ:**
+ุชูุงุตู ู
ุน ุงูุฃุฌูุฒุฉ ุงูุชุณูุณููุฉ ู
ุซู ุงูู
ูุฌููุงุช ูุงูู
ุจุฏููุงุช ูุงูู
ุชุญูู
ุงุช ุงูุฏูููุฉ ู
ู ุงูู
ุชุตูุญ ุฃู ุชุทุจูู ุณุทุญ ุงูู
ูุชุจ. ุงุถุจุท ู
ุนุฏู ุงูุจุงูุฏ ูุจุชุงุช ุงูุจูุงูุงุช ูุจุชุงุช ุงูุชููู ูุงูุชู
ุงุซู. ูุณุชุฎุฏู
ูุงุฌูุฉ Web Serial ูู ุงูู
ุชุตูุญุงุช ุงูู
ุฏุนูู
ุฉุ ุฃู ุฎูููุฉ ุฃุตููุฉ ูู ุชุทุจูู ุณุทุญ ุงูู
ูุชุจ.
+
+
+
+
+
+
+**Tailscale:**
+ุงุณุญุจ ุงูุฃุฌูุฒุฉ ู
ู ุดุจูุฉ tailnet ูุฅุถุงูุชูุง ูู
ุถููุงุช ุจุจุถุน ููุฑุงุชุ ูุงุชุตู ุนุจุฑ Tailscale SSH ูุชุชููู ููุงุฆู
ุตูุงุญูุงุช tailnet ุฃู
ุฑ ุงููุตูู ุฏูู ุชุฎุฒูู ุจูุงูุงุช ุฏุฎูู. ูุนู
ู ุฃูุถูุง ู
ุน Headscale ูููุงุท ุงููุตูู ุงูู
ุฎุตุตุฉ.
+
+
+
+
+**Proxmox:**
+ุงุณุชูุฑุฏ ุงูู
ุถููุงุช ู
ุจุงุดุฑุฉ ู
ู ูุณุฎุฉ Proxmoxุ ูุชุงุจุน ุฅุญุตุงุกุงุช ุงูุนูุฏ ูุงูุฃูุธู
ุฉ ุงูุถููุฉุ ุจู
ุง ูููุง ุงูู
ุนุงูุฌ ูุงูุฐุงูุฑุฉ ูุงูุชุฎุฒููุ ูู ุชุจููุจ ุฎุงุต ุจูุง.
+
+
+
+
+
+
+**ู
ุณุงุญุงุช ุงูุนู
ู ูุนูุงู
ุงุช ุงูุชุจููุจ:**
+ุงุญูุธ ู
ุฌู
ูุนุฉ ู
ู ุนูุงู
ุงุช ุงูุชุจููุจ ุจุชูุณูู
ูุงุ ูุฃุนุฏ ูุชุญูุง ูููุง ุจููุฑุฉ ูุงุญุฏุฉ. ูุชุฐูุฑ Termix ุฃูุถูุง ุฌูุณุชู ุงูุฃุฎูุฑุฉุ ูุชุนูุฏ ุนูุงู
ุงุช ุงูุชุจููุจ ุจุนุฏ ุงูุชุญุฏูุซ ูุนูู ุงูุฃุฌูุฒุฉ ุงูุฃุฎุฑู.
+
+
+
+
+**ุฅุนุฏุงุฏ ู
ูุฌููู:**
+ุฅุนุฏุงุฏ ูุตูุฑ ูุฑุดุฏู ุฅูู ุงุฎุชูุงุฑ ูู
ุท ุงููุงุฌูุฉ ูุงูุณู
ุฉ ูุงูู
ูุฒุงุช ุงูุชู ุชุฑูุฏูุง ูุฃูู ู
ุถูู ูู. ูุฎูู ุงููุถุน ุงูุจุณูุท ู
ุง ูุง ุชุณุชุฎุฏู
ูุ ููู
ููู ุฅุนุงุฏุฉ ุงูุฅุนุฏุงุฏ ุฃู ุชุบููุฑ ุงููู
ุท ูู ุฃู ููุช.
+
+
+
+
+
+
+**ุชุทุจูู ุณุทุญ ุงูู
ูุชุจ ุงูู
ุณุชูู ูุงูู
ุฒุงู
ูุฉ:**
+ูุนู
ู ุชุทุจูู ุณุทุญ ุงูู
ูุชุจ ุจู
ูุฑุฏู ุจุฎูููุฉ ููุงุนุฏุฉ ุจูุงูุงุช ู
ุญููุฉุ ุฏูู ุญุงุฌุฉ ุฅูู ุฎุงุฏู
. ูู
ููู ุฃูุถูุง ุฑุจุทู ุจุฎุงุฏู
Termix ูู
ุฒุงู
ูุฉ ุงูู
ุถููุงุช ูุจูุงูุงุช ุงูุฏุฎูู ูุงูู
ูุชุทูุงุช ูุบูุฑูุง ูู ุงูุงุชุฌุงูููุ ูุงุฎุชูุงุฑ ู
ุง ุฅุฐุง ูุงูุช ุงูุงุชุตุงูุงุช ุชุจุฏุฃ ู
ู ุฌูุงุฒู ุฃู
ุนุจุฑ ุงูุฎุงุฏู
.
+
+
+
+
+**ุณุทุฑ ุงูุฃูุงู
ุฑ:**
+ุฃุฏุงุฉ `termix` ูุณุทุฑ ุงูุฃูุงู
ุฑ ุชุนู
ู ูู ุงูุทุฑููุฉ ููู ุณูุฑุจุชุงุชู. ุงูุชุญ ุงูุทุฑููุงุชุ ููููุฐ ุฃู
ุฑูุง ุนูู ู
ุถูู ูุงุญุฏ ุฃู ุนูู ุฃุณุทูู ูุงู
ูุ ูุงููู ุงูู
ููุงุช ุนุจุฑ SFTPุ ูุฃุฏุฑ ุงูู
ุถููุงุช ูุงูู
ูุชุทูุงุช ูุจูุงูุงุช ุงูุฏุฎูู. ุซุจูุชูุง ุนุจุฑ `npm install -g @termix-cli/cli` ุฃู ุงุณุชุฎุฏู
ู
ูููุง ุชูููุฐููุง ู
ุณุชูููุง. ุฑุงุฌุน [ูุซุงุฆู ุณุทุฑ ุงูุฃูุงู
ุฑ](https://docs.termix.site/cli).
+
+
+
+
+
+
+**ุงูุฃู
ุงู:**
+ุชูุดูููุฑ ููู
ุงุช ุงูู
ุฑูุฑ ูุงูู
ูุงุชูุญ ูุงูุฃุณุฑุงุฑ ุงูุฃุฎุฑู ููู ู
ุณุชุฎุฏู
ุนูู ุญุฏุฉุ ููู
ูู ุชุดููุฑ ู
ููุงุช ูุงุนุฏุฉ ุงูุจูุงูุงุช ููุณูุง ุนูู ุงููุฑุต. ุฑุงุฌุน [ุงููุซุงุฆู](https://docs.termix.site/security) ูู
ุนุฑูุฉ ุขููุฉ ุงูุนู
ู.
**ุงููุบุงุช:**
-ุฏุนู
ู
ุฏู
ุฌ ูุญูุงูู 30 ูุบุฉ (ุชูุฏุงุฑ ุจูุงุณุทุฉ [Crowdin](https://docs.termix.site/translations)).
+ูุญู 30 ูุบุฉ ู
ุฏู
ุฌุฉุ ุชูุฏุงุฑ ุนุจุฑ [Crowdin](https://docs.termix.site/translations).
@@ -195,40 +251,43 @@ Termix ูู ู
ูุตุฉ ู
ูุชูุญุฉ ุงูู
ุตุฏุฑ ูู
ุฌุงููุฉ ููุฃุจุฏ ูุฐุง
-
-ุงูู
ุฒูุฏ ู
ู ุงูู
ูุฒุงุช
+
+ู
ูุฒุงุช ุฃุฎุฑู
-- **ููุญุฉ ุงูุชุญูู
** - ุนุฑุถ ู
ุนููู
ุงุช ุงูุฎุงุฏู
ุจูุธุฑุฉ ูุงุญุฏุฉ ุนูู ููุญุฉ ุงูุชุญูู
-- **ู
ูุงุชูุญ API** - ุฅูุดุงุก ู
ูุงุชูุญ API ู
ุญุฏุฏุฉ ุงููุทุงู ููู
ุณุชุฎุฏู
ู
ุน ุชูุงุฑูุฎ ุงูุชูุงุก ุตูุงุญูุฉ ููุงุณุชุฎุฏุงู
ูู ุงูุฃุชู
ุชุฉ/CI
-- **ุชุตุฏูุฑ/ุงุณุชูุฑุงุฏ ุงูุจูุงูุงุช** - ุชุตุฏูุฑ ูุงุณุชูุฑุงุฏ ู
ุถููุงุช SSH ูุจูุงูุงุช ุงูุงุนุชู
ุงุฏ ูุจูุงูุงุช ู
ุฏูุฑ ุงูู
ููุงุช
-- **ุฅุนุฏุงุฏ SSL ุชููุงุฆู** - ุฅูุดุงุก ูุฅุฏุงุฑุฉ ุดูุงุฏุงุช SSL ู
ุฏู
ุฌุฉ ู
ุน ุฅุนุงุฏุฉ ุงูุชูุฌูู ุฅูู HTTPS
-- **ูุงุฌูุฉ ู
ุณุชุฎุฏู
ุญุฏูุซุฉ** - ูุงุฌูุฉ ูุธููุฉ ู
ุชูุงููุฉ ู
ุน ุณุทุญ ุงูู
ูุชุจ ูุงููุงุชู ุงูู
ุญู
ูู ู
ุจููุฉ ุจู React ู Tailwind CSS ู Shadcn. ุงูุงุฎุชูุงุฑ ุจูู ุงูุนุฏูุฏ ู
ู ุณู
ุงุช ูุงุฌูุฉ ุงูู
ุณุชุฎุฏู
ุจู
ุง ูู ุฐูู ุงููุงุชุญ ูุงูุฏุงูู ู Dracula ูุบูุฑูุง. ุงุณุชุฎุฏุงู
ู
ุณุงุฑุงุช URL ููุชุญ ุฃู ุงุชุตุงู ูู ูุถุน ู
ูุก ุงูุดุงุดุฉ.
-- **ุณุฌู ุงูุฃูุงู
ุฑ** - ุงูุฅูู
ุงู ุงูุชููุงุฆู ูุนุฑุถ ุฃูุงู
ุฑ SSH ุงูุชู ุชู
ุชูููุฐูุง ุณุงุจูุงู
-- **ุงูุงุชุตุงู ุงูุณุฑูุน** - ุงูุงุชุตุงู ุจุฎุงุฏู
ุฏูู ุงูุญุงุฌุฉ ุฅูู ุญูุธ ุจูุงูุงุช ุงูุงุชุตุงู
-- **ููุญุฉ ุงูุฃูุงู
ุฑ** - ุงุถุบุท ู
ุฑุชูู ุนูู Shift ุงูุฃูุณุฑ ูููุตูู ุงูุณุฑูุน ุฅูู ุงุชุตุงูุงุช SSH ุจุงุณุชุฎุฏุงู
ููุญุฉ ุงูู
ูุงุชูุญ
-- **ุชูุงู
ู Proxmox** - ุฅุถุงูุฉ ุงูู
ุถููุงุช ุชููุงุฆูุงู ุฅูู Termix ู
ู ูุณุฎุฉ Proxmox ุงูุฎุงุตุฉ ุจู
-- **ู
ูุฒุงุช SSH ุงูุบููุฉ** - ุฏุนู
ู
ุถููุงุช ุงูููุฒุ Warpgateุ ุงูุงุชุตุงูุงุช ุงูู
ุจููุฉ ุนูู TOTPุ SOCKS5ุ ุงูุชุญูู ู
ู ู
ูุชุงุญ ุงูู
ุถููุ ุงูู
ูุก ุงูุชููุงุฆู ูููู
ุฉ ุงูู
ุฑูุฑุ [OPKSSH](https://github.com/openpubkey/opkssh)ุ tmuxุ port knockingุ ุชุณุฌูู ุงูุทุฑููุฉุ ุฅุนุงุฏุฉ ุชูุฌูู ูููู SSHุ ูููู Bitwarden SSHุ ุชูููุน SSH ุนุจุฑ HashiCorp Vaultุ ูุบูุฑูุง.
-- **Termix ID** - ู
ูุงูุฆ ูู sshid.io ู
ุฏู
ุฌ ูู Termix. ุงุญุตู ุนูู ุงุณู
ู
ุณุชุฎุฏู
ุ ุงูุดุฑ ู
ูุงุชูุญ SSH ุงูุนุงู
ุฉ ุงูุฎุงุตุฉ ุจู ุนูู ุฑุงุจุท ู
ุญูู (resolver URL)ุ ูุงุณุชุฎุฏู
ููุฆุฉ ุฅุตุฏุงุฑ ุดูุงุฏุงุช (CA) ู
ุฏู
ุฌุฉ ูุฅุตุฏุงุฑ ุดูุงุฏุงุช SSH.
+- **ููุญุฉ ุงูู
ุนููู
ุงุช** - ุฎูุงุฏู
ู ูู ูู
ุญุฉ ูุงุญุฏุฉุ ุจุจุทุงูุงุช ุชุฑุชูุจูุง ุจููุณู
+- **ุฑุณู
ุงูุดุจูุฉ** - ู
ุฎุชุจุฑู ุงูู
ูุฒูู ู
ุฑุณูู
ูุง ุงูุทูุงููุง ู
ู ู
ุถููุงุชูุ ู
ุน ุงูุญุงูุฉ ูุญุธููุง
+- **ู
ุฑุงูุจ tmux** - ุชุตูุญ ุฌูุณุงุช tmux ูููุงูุฐู ูููุญุงุชูุ ู
ุน ู
ุนุงููุฉ ูุจุญุซ
+- **ู
ูุงุชูุญ API** - ู
ูุงุชูุญ ุฎุงุตุฉ ุจูู ู
ุณุชุฎุฏู
ููุง ุชุงุฑูุฎ ุงูุชูุงุกุ ููุณูุฑุจุชุงุช ูุฃูุธู
ุฉ CI
+- **ุงูุชุตุฏูุฑ ูุงูุงุณุชูุฑุงุฏ** - ุงููู ุงูู
ุถููุงุช ูุจูุงูุงุช ุงูุฏุฎูู ูุจูุงูุงุช ู
ุฏูุฑ ุงูู
ููุงุช ุฅูู ุงูุฏุงุฎู ูุงูุฎุงุฑุฌ
+- **SSL ุชููุงุฆู** - ุชููุดุฃ ุงูุดูุงุฏุงุช ูุชูุฌุฏููุฏ ููุงุจุฉ ุนููุ ู
ุน ุฅุนุงุฏุฉ ุงูุชูุฌูู ุฅูู HTTPSุ ุฃู ุงุณุชุฎุฏู
ุดูุงุฏุงุชู ุงูุฎุงุตุฉ
+- **ููุงุนุฏ ุงูุจูุงูุงุช** - SQLite ุงูุชุฑุงุถููุงุ ู
ุน ุฏุนู
PostgreSQL ูMySQL ุฃูุถูุง
+- **ูุงุฌูุฉ ุญุฏูุซุฉ** - ูุงุฌูุฉ React ุฃูููุฉ ุชุนู
ู ุนูู ุณุทุญ ุงูู
ูุชุจ ูุงููุงุชูุ ุจุณู
ุงุช ู
ุซู ุงููุงุชุญ ูุงูุฏุงูู ูDracula. ูู
ูู ูุชุญ ุฃู ุงุชุตุงู ุจู
ูุก ุงูุดุงุดุฉ ู
ู ุฑุงุจุท
+- **ููุญุฉ ุงูุฃูุงู
ุฑ** - ุงุถุบุท ู
ูุชุงุญ Shift ุงูุฃูุณุฑ ู
ุฑุชูู ููุงูุชูุงู ุฅูู ู
ุถูู ู
ู ููุญุฉ ุงูู
ูุงุชูุญ
+- **ุงุฎุชุตุงุฑุงุช ููุญุฉ ุงูู
ูุงุชูุญ** - ุงูุชููู ุจูู ุนูุงู
ุงุช ุงูุชุจููุจ ูุฅุบูุงููุง ูุบูุฑ ุฐููุ ููููุง ูุงุจูุฉ ูุฅุนุงุฏุฉ ุงูุชุนููู
+- **Wake-on-LAN** - ุฃููุธ ุฌูุงุฒูุง ู
ู Termix ุฃู ู
ู ุฎุทูุฉ ูู ุงูุฃุชู
ุชุฉ
+- **ู
ุตุงุฏูุฉ ุงููููู ุงูู
ูุซูู** - ุฏุน ูููููุง ุนูุณููุง ูุชููู ุชุณุฌูู ุงูุฏุฎูู ููู
ุฑูุฑ ุงูู
ุณุชุฎุฏู
+- **SSH ุจุฅู
ูุงูุงุช ูุงุณุนุฉ** - ู
ุถููุงุช ูุณูุทุฉ ูWarpgate ูุทูุจุงุช TOTP ูSOCKS5 ูุงูุชุญูู ู
ู ู
ูุงุชูุญ ุงูู
ุถูู ูุงูุชุนุจุฆุฉ ุงูุชููุงุฆูุฉ ูููู
ุงุช ุงูู
ุฑูุฑ ู[OPKSSH](https://github.com/openpubkey/opkssh) ูtmux ูport knocking ูุณุฌูุงุช ุงูุทุฑููุฉ ูุชู
ุฑูุฑ ุงููููู ููููู SSH ู
ู Bitwarden ูุชูููุน SSH ุนุจุฑ HashiCorp Vault ูุบูุฑูุง
+- **Termix ID** - ูุณุฎุฉ ู
ุฏู
ุฌุฉ ุนูู ุบุฑุงุฑ sshid.io. ุงุญุฌุฒ ู
ุนุฑูููุงุ ูุงูุดุฑ ู
ูุงุชูุญู ุงูุนุงู
ุฉ ุนูู ุฑุงุจุท ู
ุญููููุ ูุฃุตุฏุฑ ุดูุงุฏุงุช SSH ู
ู ุณูุทุฉ ุงูุชุตุฏูู ุงูู
ุฏู
ุฌุฉ
-## ุฏุนู
ุงูู
ูุตุงุช
+## ุงูู
ูุตุงุช ุงูู
ุฏุนูู
ุฉ
ุงูู
ูุตุฉ
-ุงูุชูุฒูุน
+ุทุฑููุฉ ุงูุชูุฒูุน
Web
-ุฃู ู
ุชุตูุญ ุญุฏูุซ (Chromeุ Safariุ Firefox) ยท ุฏุนู
PWA
+ุฃู ู
ุชุตูุญ ุญุฏูุซ (Chrome ูSafari ูFirefox) ยท ูุฏุนู
PWA
Windows x64/ia32
-ูุณุฎุฉ ู
ุญู
ููุฉ ยท ู
ุซุจุช MSI ยท Chocolatey
+ูุณุฎุฉ ู
ุญู
ููุฉ ยท ู
ุซุจูุช MSI ยท Chocolatey
Linux x64/ia32
@@ -252,9 +311,9 @@ Termix ูู ู
ูุตุฉ ู
ูุชูุญุฉ ุงูู
ุตุฏุฑ ูู
ุฌุงููุฉ ููุฃุจุฏ ูุฐุง
## ุงูุชุซุจูุช
-ูู
ุจุฒูุงุฑุฉ [ูุซุงุฆู](https://docs.termix.site/install) Termix ููุญุตูู ุนูู ุชุนููู
ุงุช ุงูุชุซุจูุช ุงููุงู
ูุฉ ุนุจุฑ ุฌู
ูุน ุงูู
ูุตุงุช.
+ุฑุงุฌุน [ูุซุงุฆู Termix](https://docs.termix.site/install) ููุงุทูุงุน ุนูู ุชุนููู
ุงุช ุงูุชุซุจูุช ุงููุงู
ูุฉ ูุฌู
ูุน ุงูู
ูุตุงุช.
-ูู
ูุฐุฌ ู
ูู Docker Compose (ูู
ููู ุญุฐู `guacd` ูุงูุดุจูุฉ ุฅุฐุง ููุช ูุง ุชุฎุทุท ูุงุณุชุฎุฏุงู
ู
ูุฒุงุช ุณุทุญ ุงูู
ูุชุจ ุงูุจุนูุฏ):
+ู
ุซุงู ุนูู ู
ูู Docker Compose (ูู
ููู ุญุฐู `guacd` ูุงูุดุจูุฉ ุฅุฐุง ููุช ูุง ุชููู ุงุณุชุฎุฏุงู
ุณุทุญ ุงูู
ูุชุจ ุงูุจุนูุฏ):
```yaml
services:
@@ -291,19 +350,45 @@ networks:
driver: bridge
```
+### ุณุทุฑ ุงูุฃูุงู
ุฑ
+
+ูููุฑ Termix ุฃูุถูุง ุฃุฏุงุฉ ุณุทุฑ ุฃูุงู
ุฑุ ูุชุฏูุฑ ุฎูุงุฏู
ู ู
ู ุงูุทุฑููุฉ ูุชุณุชุฎุฏู
Termix ุฏุงุฎู ุณูุฑุจุชุงุชู.
+
+```bash
+npm install -g @termix-cli/cli
+termix login --url https://termix.example.com
+termix ssh 1
+```
+
+ุชุณุชุทูุน ูุชุญ ุงูุทุฑููุงุชุ ูุชูููุฐ ุฃู
ุฑ ุนูู ู
ุถูู ูุงุญุฏ ุฃู ุนูู ุฃุณุทูู ูุงู
ูุ ูููู ุงูู
ููุงุช ุนุจุฑ SFTPุ ูุฅุฏุงุฑุฉ ุงูู
ุถููุงุช ูุงูู
ูุชุทูุงุช ูุจูุงูุงุช ุงูุฏุฎูู. ุงููุซุงุฆู ุงููุงู
ูุฉ ุนูู [docs.termix.site/cli](https://docs.termix.site/cli).
+
+### ุงูุงุณุชุถุงูุฉ ุงูุณุญุงุจูุฉ
+
+ูู
ููู ุชุดุบูู ุฎุงุฏู
Termix ุนูู VPS ุจุฏููุง ู
ู ุฏุงุฎู ุดุจูุชู. ุฅุฐุง ูุงู Termix ูุนู
ู ุฏุงุฎู ุงูุดุจูุฉ ุงูุชู ูุฏูุฑูุงุ ูุฃู ุนุทู ุณูุฃุฎุฐู ู
ุนูุ ุชุญุฏูุฏูุง ุญูู ุชุญุชุงุฌ ุฅููู ูุฅุตูุงุญ ุงูุฃู
ูุฑ. ุชุดุบููู ูู ุงูุฎุงุฑุฌ ูุจููู ู
ุชุงุญูุงุ ููู
ูุญู ุนููุงู IP ุซุงุจุชูุงุ ููุชูุญ ูู ุงูุฏุฎูู ู
ู ุฃู ู
ูุงู ุฏูู VPN ุฃู ูุชุญ ู
ูุงูุฐ.
+
+ุชุฑุนู [GINERNET](https://docs.termix.site/install/ginernet) ู
ุดุฑูุน Termixุ ูุชุชุถู
ู ุงููุซุงุฆู ุฏููููุง ุฎุทูุฉ ุจุฎุทูุฉ ูููุดุฑ ุนูู ู
ูุตุฉ ุงูุฎูุงุฏู
ุงูุงูุชุฑุงุถูุฉ ุงูุฎุงุตุฉ ุจูู
.
+
+
+
+## ุจูุงูุงุช ุงูุงุณุชุฎุฏุงู
+
+ูุฑุณู Termix ุฅุดุงุฑุฉ ุตุบูุฑุฉ ู
ุฌูููุฉ ู
ุฑุฉ ูุงุญุฏุฉ ููู
ููุงุ ูุฃุนุฑู ุนุฏุฏ ุงููุณุฎ ุงูุนุงู
ูุฉ ูุงูู
ูุฒุงุช ุงูู
ุณุชุฎุฏู
ุฉ ูุนููุง. ุชุญุชูู ุนูู ู
ุนุฑูู ุนุดูุงุฆู ูููุณุฎุฉุ ูุนุฏุฏ ุงูู
ุณุชุฎุฏู
ูู ูุงูู
ุถููุงุช ูุฏููุ ูุฅุตุฏุงุฑ ุงูุชุทุจููุ ูุงูู
ูุฒุงุช ุงูุชู ุงุณุชูุฎุฏู
ุช ุฎูุงู ุขุฎุฑ 24 ุณุงุนุฉ (ุงูุทุฑููุฉ ูู
ุฏูุฑ ุงูู
ููุงุช ูุงูุฃููุงู ูdocker ูุบูุฑูุง). ููุง ุชุญุชูู ุฃุจุฏูุง ุนูู ุฃุณู
ุงุก ู
ุณุชุฎุฏู
ูู ุฃู ุฃุณู
ุงุก ู
ุถููุงุช ุฃู ุนูุงููู IP ุฃู ุจูุงูุงุช ุฏุฎูู ุฃู ุฃู ุดูุก ูุนุฑูู ุจู ุฃู ุจุฎูุงุฏู
ู.
+
+ููู ู
ูุนููุฉ ุงูุชุฑุงุถููุง. ูู
ููู ุฅููุงููุง ู
ู ุฅุนุฏุงุฏุงุช ุงูู
ุณุคูู ุถู
ู ูุณู
ุนุงู
ุ ุฃู ุถุจุท `ENABLE_TELEMETRY=false` ูุจู ุชุดุบูู Termix ุฃุตููุง.
+
## ุงูุชุจุฑุน
-Termix ู
ุฌุงูู ูู
ูุชูุญ ุงูู
ุตุฏุฑ ุจุฏูู ุงุดุชุฑุงูุงุช ุฃู ุฎุทุท ู
ุฏููุนุฉ. ุฅุฐุง ูุฌุฏุชู ู
ููุฏูุงุ ูููุฑ ูู ุงูุชุจุฑุน ููู
ุณุงุนุฏุฉ ูู ุชุบุทูุฉ ุชูุงููู ุงูุฎุงุฏู
ูุงููุทุงูุงุช ูููุช ุงูุชุทููุฑ. ุชุณุงุนุฏ ุงูุชุจุฑุนุงุช ุฃูุถุงู ูู ุชู
ููู ุงูููุช ุงููุงุฒู
ููุจุญุซ ูุชุนูู
ู
ุง ูู ู
ุทููุจ ูุจูุงุก ู
ูุฒุงุช ู
ุซู SAML ู Kubernetes ูุฏุนู
ุงููููุงุก (Agent). ุชุงุจุน ุงูุชูุฏู
ูุชุจุฑุน ุฃุฏูุงู.
+Termix ู
ุฌุงูู ูู
ูุชูุญ ุงูู
ุตุฏุฑุ ุจูุง ุงุดุชุฑุงูุงุช ููุง ุฎุทุท ู
ุฏููุนุฉ. ุฅุฐุง ูุงู ู
ููุฏูุง ููุ ูููุฑ ูู ุงูุชุจุฑุน ููู
ุณุงุนุฏุฉ ูู ุชุบุทูุฉ ุงูุฎูุงุฏู
ูุงููุทุงูุงุช ูููุช ุงูุชุทููุฑ. ุชู
ููู ุงูุชุจุฑุนุงุช ุฃูุถูุง ููุช ุงูุจุญุซ ูุงูุชุนููู
ุงููุงุฒู
ูุจูุงุก ู
ูุฒุงุช ู
ุซู SAML ูKubernetes ูุฏุนู
ุงููููุงุก. ุชุงุจุน ุงูุชูุฏู
ูุชุจุฑุน ู
ู ุงูุฑุงุจุท ุฃุฏูุงู.
-[ุชุจุฑุน](https://donate.termix.site/)
+[ุชุจุฑูุน](https://donate.termix.site/)
## ุงูุฑุนุงุฉ
-ูู ุชุฑูุฏ ุฅุนูุงูุงู ู
ุฏููุนุงู ูุฏุนู
ุงูุชุทููุฑุ ุฑุงุณููุง ุนุจุฑ ุงูุจุฑูุฏ ุงูุฅููุชุฑููู [mail@termix.site](mailto:mail@termix.site).
+ูู ุชูุชู
ุจู
ุณุงุญุฉ ุฅุนูุงููุฉ ู
ุฏููุนุฉ ูุฏุนู
ุงูุชุทููุฑุ ุฑุงุณููุง ุนูู [mail@termix.site](mailto:mail@termix.site).
@@ -325,10 +410,6 @@ Termix ู
ุฌุงูู ูู
ูุชูุญ ุงูู
ุตุฏุฑ ุจุฏูู ุงุดุชุฑุงูุงุช ุฃู ุฎุท
-
-
-
-
@@ -340,14 +421,17 @@ Termix ู
ุฌุงูู ูู
ูุชูุญ ุงูู
ุตุฏุฑ ุจุฏูู ุงุดุชุฑุงูุงุช ุฃู ุฎุท
-
+
+
+
+
## ุงูุฏุนู
-ุฅุฐุง ููุช ุจุญุงุฌุฉ ุฅูู ู
ุณุงุนุฏุฉ ุฃู ุชุฑุบุจ ูู ุทูุจ ู
ูุฒุฉ ูู Termixุ ูู
ุจุฒูุงุฑุฉ ุตูุญุฉ [ุงูู
ุดููุงุช](https://github.com/Termix-SSH/Support/issues)ุ ูุณุฌู ุงูุฏุฎููุ ูุงุถุบุท ุนูู `New Issue`. ูุฑุฌู ุฃู ุชููู ู
ูุตูุงู ูุฏุฑ ุงูุฅู
ูุงู ูู ู
ุดููุชูุ ููููุถููู ูุชุงุจุชูุง ุจุงููุบุฉ ุงูุฅูุฌููุฒูุฉ. ูู
ููู ุฃูุถุงู ุงูุงูุถู
ุงู
ุฅูู ุฎุงุฏู
[Discord](https://discord.gg/jVQGdvHDrf) ูุฒูุงุฑุฉ ููุงุฉ ุงูุฏุนู
ุ ูู
ุน ุฐูู ูุฏ ุชููู ุฃููุงุช ุงูุงุณุชุฌุงุจุฉ ุฃุทูู.
+ุชุญุชุงุฌ ู
ุณุงุนุฏุฉ ุฃู ุชุฑูุฏ ุทูุจ ู
ูุฒุฉุ ุงูุชุญ [ู
ุดููุฉ ุฌุฏูุฏุฉ](https://github.com/Termix-SSH/Support/issues) ูุงุฐูุฑ ุฃูุจุฑ ูุฏุฑ ู
ู
ูู ู
ู ุงูุชูุงุตููุ ุจุงูุฅูุฌููุฒูุฉ ุฅู ุฃู
ูู. ูู
ููู ุฃูุถูุง ุงูุณุคุงู ูู ููุงุฉ ุงูุฏุนู
ุนูู [Discord](https://discord.gg/jVQGdvHDrf)ุ ูุฅู ูุงูุช ุงูุฑุฏูุฏ ููุงู ูุฏ ุชุชุฃุฎุฑ.
@@ -359,7 +443,7 @@ Termix ู
ุฌุงูู ูู
ูุชูุญ ุงูู
ุตุฏุฑ ุจุฏูู ุงุดุชุฑุงูุงุช ุฃู ุฎุท
[](https://www.youtube.com/@TermixSSH/videos)
-ุดุงูุฏ ูุธุฑุฉ ุนุงู
ุฉ ุนูู ุงูุชุญุฏูุซุงุช ุนูู YouTube
+ุดุงูุฏ ุนุฑูุถ ุงูุชุญุฏูุซุงุช ุนูู YouTube
@@ -399,7 +483,7 @@ Termix ู
ุฌุงูู ูู
ูุชูุญ ุงูู
ุตุฏุฑ ุจุฏูู ุงุดุชุฑุงูุงุช ุฃู ุฎุท
-ูุฏ ุชููู ุจุนุถ ู
ูุงุทุน ุงูููุฏูู ูุงูุตูุฑ ูุฏูู
ุฉ ุฃู ูุฏ ูุง ุชุนุฑุถ ุงูู
ูุฒุงุช ุจุดูู ู
ุซุงูู.
+ูุฏ ุชููู ุจุนุถ ุงูู
ูุงุทุน ูุงูุตูุฑ ูุฏูู
ุฉ ุฃู ูุง ุชุนุฑุถ ุงูู
ูุฒุงุช ุนูู ุฃูุถู ูุฌู.
@@ -407,10 +491,10 @@ Termix ู
ุฌุงูู ูู
ูุชูุญ ุงูู
ุตุฏุฑ ุจุฏูู ุงุดุชุฑุงูุงุช ุฃู ุฎุท
## ุงูู
ูุฒุงุช ุงูู
ุฎุทุทุฉ
-ุฑุงุฌุน [ุงูู
ุดุงุฑูุน](https://github.com/orgs/Termix-SSH/projects/5) ูุนุฑุถ ุฌู
ูุน ุงูู
ูุฒุงุช ุงูู
ุฎุทุทุฉ. ุฅุฐุง ููุช ุชุชุทูุน ููู
ุณุงูู
ุฉุ ุฑุงุฌุน [ุงูู
ุณุงูู
ุฉ](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md).
+ุฌู
ูุน ุงูู
ูุฒุงุช ุงูู
ุฎุทุทุฉ ู
ูุฌูุฏุฉ ูู [Projects](https://github.com/orgs/Termix-SSH/projects/5). ุฅุฐุง ุฃุฑุฏุช ุงูู
ุณุงูู
ุฉุ ุฑุงุฌุน [Contributing](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md).
## ุงูุชุฑุฎูุต
-ู
ูุฒุน ุจู
ูุฌุจ ุฑุฎุตุฉ Apache License ุงูุฅุตุฏุงุฑ 2.0. ุฑุงุฌุน ู
ูู `LICENSE` ูู
ุฒูุฏ ู
ู ุงูู
ุนููู
ุงุช.
+ููุฒููุน ุจู
ูุฌุจ ุชุฑุฎูุต Apache ุงูุฅุตุฏุงุฑ 2.0. ุฑุงุฌุน ู
ูู `LICENSE` ูู
ุฒูุฏ ู
ู ุงูู
ุนููู
ุงุช.
diff --git a/docs/readme/README-CN.md b/docs/readme/README-CN.md
index 2290b99..b189343 100644
--- a/docs/readme/README-CN.md
+++ b/docs/readme/README-CN.md
@@ -4,7 +4,7 @@
Termix
-่ชๆ็ฎก SSH ็ฎก็ไธ่ฟ็จๆก้ข่ฎฟ้ฎๅนณๅฐ
+่ชๆ็ฎกๆๅกๅจ็ฎก็๏ผไป SSH ๅ่ฟ็จๆก้ขๅฐ่ชๅจๅ
English ยท
@@ -58,7 +58,7 @@ Termix ๅ
่ดนไธๅผๆบใๅฆๆๆจ่งๅพๅฎๆ็จ๏ผ่ฏท่่[ๆ่ต ](https://do
## ๆฆ่ง
-Termix ๆฏไธไธชๅผๆบใๆฐธไน
ๅ
่ดนใ่ชๆ็ฎก็ไธไฝๅๆๅกๅจ็ฎก็ๅนณๅฐใๅฎๆไพไบไธไธชๅคๅนณๅฐ่งฃๅณๆนๆก๏ผ้่ฟไธไธช็ด่ง็็้ข็ฎก็ไฝ ็ๆๅกๅจๅๅบ็ก่ฎพๆฝใTermix ๆไพ SSH ็ป็ซฏ่ฎฟ้ฎใ่ฟ็จๆก้ขๆงๅถ๏ผRDPใVNCใTelnet๏ผใSSH ้ง้ๅ่ฝใ่ฟ็จๆไปถ็ฎก็ไปฅๅ่ฎธๅคๅ
ถไปๅทฅๅ
ทใTermix ๆฏ้็จไบๆๆๅนณๅฐ็ๅฎ็พๅ
่ดน่ชๆ็ฎก Termius ๆฟไปฃๅใ
+Termix ๆฏไธไธชๅ
่ดนใๅผๆบใ่ชๆ็ฎก็ๆๅกๅจ็ฎก็ๅนณๅฐใๅฎๆ SSH ็ป็ซฏใ่ฟ็จๆก้ข๏ผRDPใVNCใTelnet๏ผใๆไปถไผ ่พใ้ง้ใDockerใๆๆ ๅ่ชๅจๅ้ไธญๅจไธไธชๅฐๆน๏ผๆฏๆ็ฝ้กต็ซฏใๆก้ข็ซฏๅ็งปๅจ็ซฏใๅฎๆฏ Termius ็่ชๆ็ฎกๆฟไปฃๅ๏ผๅนถไธๆฐธไน
ๅ
่ดนใ
@@ -68,42 +68,42 @@ Termix ๆฏไธไธชๅผๆบใๆฐธไน
ๅ
่ดนใ่ชๆ็ฎก็ไธไฝๅๆๅกๅจ็ฎก็ๅนณ
-**SSH ็ป็ซฏ่ฎฟ้ฎ:**
-ๅ่ฝ้ฝๅ
จ็็ป็ซฏ๏ผๆฏๆๅๅฑ๏ผๆๅค 4 ไธช้ขๆฟ๏ผ๏ผๅนถ้
ๆ็ฑปไผผๆต่งๅจ็ๆ ็ญพ็ณป็ปใๅ
ๆฌๅฏน่ชๅฎไน็ป็ซฏ็ๆฏๆ๏ผๅฆๅธธ็จ็็ป็ซฏไธป้ขใๅญไฝๅๅ
ถไป็ปไปถใ
+**SSH ็ป็ซฏ:**
+ๅ่ฝ้ฝๅ
จ็็ป็ซฏ๏ผ้
ๆ็ฑปไผผๆต่งๅจ็ๆ ็ญพ้กตๅๅๅฑ๏ผๆๅคๅๆถๆพ็คบ 6 ไธช้ขๆฟใๅฏไปฅ้ๆฉไธป้ขใๅญไฝๅ้
่ฒใๆฏไธชไผ่ฏไธๆน้ฝๆไธไธชๅทฅๅ
ทๆ ๏ผๆพ็คบๅฎๆถ็ CPUใๅ
ๅญๅ็ฃ็๏ผๅนถๆไพๆๅ่ฏฅไธปๆบๆไปถใDockerใ้ง้ๅๆๆ ็ๅฟซๆทๅ
ฅๅฃใ
-**่ฟ็จๆก้ข่ฎฟ้ฎ:**
-้่ฟๆต่งๅจๆฏๆ RDPใVNC ๅ Telnet๏ผๅ
ทๆๅฎๆด็่ชๅฎไนๅๅๅฑๅ่ฝใ
+**่ฟ็จๆก้ข:**
+ๅจๆต่งๅจไธญไฝฟ็จ RDPใVNC ๅ Telnet๏ผๅๅ
ถไปไผ่ฏไธๆ ทๆฏๆๆ ็ญพ้กตๅๅๅฑใๅ
ๅซ RDP ้ฉฑๅจๅจ็ๆไปถๆต่งๅจๅๆๆพไธไผ ใๅจ Windows ๆก้ข็ซฏ๏ผไฝ ่ฟๅฏไปฅ็จๅ็ RDP ๅฎขๆท็ซฏๆๅผไธปๆบใ
-**SSH ้ง้็ฎก็:**
-ๅๅปบๅ็ฎก็ๅ
ทๆ่ชๅจ้่ฟๅๅฅๅบท็ๆตๅ่ฝ็ๆๅกๅจ้ด SSH ้ง้๏ผๆฏๆๆฌๅฐใ่ฟ็จๆๅจๆ SOCKS ่ฝฌๅใๆก้ขๅฎขๆท็ซฏๅฐๆๅกๅจ็้ง้่ฎพ็ฝฎๆๆก้ขๅฎ่ฃ
ๆฌๅฐๅญๅจ๏ผๅฏ้็ C2S ้ข่ฎพๅฟซ็
งๅฏไฟๅญๅฐๆๅกๅจใ้ๅฝๅใๅ ่ฝฝๆๅ ้ค๏ผไปฅไพฟๅจๅฎขๆท็ซฏไน้ด่ฟ็งปๆฌๅฐ้ง้้
็ฝฎใ
+**SSH ้ง้:**
+ๆฏๆๆฌๅฐใ่ฟ็จๅๅจๆ SOCKS ่ฝฌๅ๏ผๅฏ่ชๅจ้่ฟๅนถ่ฟ่กๅฅๅบทๆฃๆฅใๆก้ข็ซฏ็ๅฎขๆท็ซฏๅฐๆๅกๅจ้ง้ไฟๅญๅจๆฌๆบ๏ผไฝ ไนๅฏไปฅๆ้ข่ฎพไฟๅญๅฐๆๅกๅจ๏ผไปฅไพฟ่ฟ็งปๅฐๅฆไธๅฐๅฎขๆท็ซฏใ
-**่ฟ็จๆไปถ็ฎก็ๅจ:**
-็ดๆฅๅจ่ฟ็จๆๅกๅจไธ็ฎก็ๆไปถ๏ผๆฏๆๆฅ็ๅ็ผ่พไปฃ็ ใๅพๅใ้ณ้ขๅ่ง้ขใๆฏๆ้่ฟ sudo ๆ ็ผไธไผ ใไธ่ฝฝใ้ๅฝๅใๅ ้คๅ็งปๅจๆไปถใๅ
ๆฌๆฏๆๅจๆๅกๅจไน้ด็งปๅจๆไปถใ
+**ๆไปถ็ฎก็ๅจ:**
+้่ฟ SFTP ๆต่งใ็ผ่พใไธไผ ใไธ่ฝฝใ้ๅฝๅใ็งปๅจๅๅ ้คๆไปถ๏ผๆฏๆ sudoใๅฏไปฅๆฅ็ๅ็ผ่พไปฃ็ ใๅพ็ใ้ณ้ขๅ่ง้ขใๆไปถๅฏไปฅ็ดๆฅไปไธๅฐๆๅกๅจๅคๅถๅฐๅฆไธๅฐ๏ผ็ณป็ปไผ่ชๅจ้ๆฉๆๅฟซ็่ทฏๅพๅนถๆ ก้ชไผ ่พๅฎๆดๆงใ
-**Docker ๅ Podman ็ฎก็:**
-ๅฏๅจใๅๆญขใๆๅใ็งป้คๅฎนๅจใๆฅ็ๅฎนๅจ็ป่ฎกไฟกๆฏใ้่ฟ docker exec ็ป็ซฏๆงๅถๅฎนๅจใๅๆถๆฏๆ Docker ๅ Podman ไฝไธบๅฎนๅจ่ฟ่กๆถใๅฎ็ๅ่กทไธๆฏๅไปฃ Portainer ๆ Dockge๏ผ่ๆฏไธบไบๆฏ็ดๆฅๅๅปบๅฎนๅจๆด็ฎๅๅฐ็ฎก็ๅฎไปฌใ
+**Docker ๅ Podman:**
+ๅฏๅจใๅๆญขใๆๅๅๅ ้คๅฎนๅจ๏ผๆฅ็ๅฎไปฌ็็ถๆ๏ผๅนถๅจๅฎนๅจๅ
ๆๅผไธไธช็ป็ซฏใๅๆถๆฏๆ Docker ๅ Podmanใๅฎไธๆฏ่ฆๅไปฃ Portainer ๆ Dockge๏ผๅชๆฏ็จๆฅ็ฎก็ไฝ ๅทฒๆ็ๅฎนๅจใ
-**SSH ไธปๆบ็ฎก็ๅจ:**
-้่ฟๆ ็ญพๅๆไปถๅคน๏ผๆฏๆๆไปถๅคน่ชๅฎไนๅๅตๅฅๆไปถๅคน๏ผไฟๅญใ็ป็ปๅ็ฎก็ๆจ็ SSH ่ฟๆฅ๏ผ่ฝปๆพไฟๅญๅฏ้็จ็็ปๅฝไฟกๆฏ๏ผๅนถ่ฝ่ชๅจๅ้จ็ฝฒ SSH ๅฏ้ฅใ
+**ไธปๆบ็ฎก็:**
+็จๆ ็ญพๅๅฏๅฝๅใๅฏ้
่ฒ็ๅตๅฅๆไปถๅคนๆฅๆด็ไธปๆบใๅจๅคๅฐไธปๆบไน้ดๅค็จๅทฒไฟๅญ็ๅญๆฎ๏ผ่ชๅจ้จ็ฝฒ SSH ๅฏ้ฅ๏ผๆไธปๆบๅฝๅฐ็ถไธปๆบไธ๏ผๆน้็ผ่พๅๅฏผๅบ๏ผ่ฟๅฏไปฅ็จๅฟซ้่ฟๆฅๅค็้ฃไบไธๆณไฟๅญ็ไธๆฌกๆง่ฟๆฅใ
@@ -111,83 +111,139 @@ Termix ๆฏไธไธชๅผๆบใๆฐธไน
ๅ
่ดนใ่ชๆ็ฎก็ไธไฝๅๆๅกๅจ็ฎก็ๅนณ
**ไธปๆบๆๆ :**
-ๅจๅคงๅคๆฐๅบไบ Linux ็ๆๅกๅจไธๆฅ็ CPUใๅ
ๅญใ็ฃ็ไฝฟ็จๆ
ๅตใ็ฝ็ปใ่ฟ่กๆถ้ดใ็ณป็ปไฟกๆฏใ้ฒ็ซๅขใ็ซฏๅฃ็ๆงใๆฅๅฟๆฅ็ๅจใ็จๆท/ๆ้ใ่ฏไนฆ็ญๆดๅคไฟกๆฏใๅ
ๆฌๆถ้ดๅบๅๅๅฒๅพ่กจๅๆฏๆ ntfy ไธ webhook ็้ๅผๅ่ญฆใ
+ๅจๅคงๅคๆฐ Linux ๆๅกๅจไธๆฅ็ CPUใๅ
ๅญใ็ฃ็ใ็ฝ็ปใๆธฉๅบฆใ่ฟ่กๆถ้ดใ่ฟ็จใ็ซฏๅฃใ็ปๅฝ่ฎฐๅฝๅ็ณป็ปไฟกๆฏ๏ผๅนถ้ๅธฆๅๅฒๆฒ็บฟๅพใ็ฎก็ๅก็่ฎฉไฝ ๆ ้็ฆปๅผ Termix ๅฐฑ่ฝๅค็ๆๅกใๅฎๆถไปปๅกใ่ฝฏไปถๅ
ใ็จๆทใ้ฒ็ซๅข่งๅใWireGuardใTailscaleใSSL ่ฏไนฆใๆฅๅฟๅๅฅๅบทๆฃๆฅใ
-**็จๆท่ฎค่ฏ:**
-ๅฎๅ
จ็็จๆท็ฎก็๏ผๅ
ทๆ็ฎก็ๅๆงๅถ๏ผๅฏ็ผ่พๅ
ถไป็จๆทไฟกๆฏ๏ผๅ OIDC/LDAP/SSO๏ผๅธฆ่ฎฟ้ฎๆงๅถ๏ผใ2FA (TOTP) ไปฅๅ้่กๅฏ้ฅ๏ผWebAuthn๏ผๆฏๆใๆฅ็ๆๆๅนณๅฐไธ็ๆดปๅจ็จๆทไผ่ฏๅนถๆค้ๆ้ใๅฐๆจ็ OIDC/ๆฌๅฐ่ดฆๆท้พๆฅๅจไธ่ตทใๆฅ็ๆๆ็จๆทๆไฝ็ๅฎก่ฎกๆฅๅฟใ
+**่ชๅจๅ:**
+ๅ
้ไธไธช่งฆๅๆกไปถ๏ผๅๅณๅฎ่ฆๅไปไนใ่งฆๅๆกไปถๅ
ๆฌๆๆ ่ถ
่ฟ้ๅผใไธปๆบไธ็บฟๆไธ็บฟใๅฅๅบทๆฃๆฅ็ถๆๅๅใๅฎๆถ่ฎกๅใๅฎนๅจไบไปถ๏ผๆ่
ไธไธชไผ ๅ
ฅ็ Webhookใๆญฅ้ชคๅฏไปฅๆง่กๅฝไปคๅไปฃ็ ็ๆฎตใๆงๅถๅฎนๅจๅ้ง้ใๅค้ไธปๆบใ่ฐ็จๆไธช็ฝๅใ็ญๅพ
ใๆๆกไปถๅๆฏใ่ฟ่กๅฆไธไธช่ชๅจๅ๏ผๅนถ้่ฟ ntfyใDiscord ๆ Webhook ้็ฅไฝ ใๆต่ฏ่ฟ่ก่ฎฉไฝ ๅ
ๅฎๅ
จๅฐ่ฏไธ้ใ
-**Tailscale ้ๆ:**
-ๅๅบๆจ Tailscale ็ฝ็ปไธญ็่ฎพๅคไปฅๅฟซ้ๆทปๅ ไธบไธปๆบ๏ผๅนถไฝฟ็จ Tailscale SSH ไฝไธบ่บซไปฝ้ช่ฏๆนๅผ๏ผ่ฎฉๆจ็ Tailscale ACL ๅค็ๆๆ่ๆ ้ๅญๅจๅญๆฎใ
+**ๆบ็พค:**
+้่ฟๆๅจๆ้ๆๆ ็ญพ่งๅๆไธปๆบ็ผๆไธไธชๆบ็พค๏ผๆฐไธปๆบๅฏไปฅ่ชๅจๅ ๅ
ฅใไธๆฌกๅจๆๆไธปๆบไธๆง่กๅไธๆกๅฝไปค๏ผๅๅ
จ้จไธปๆบๆจ้ๅๆๅๆไปถ๏ผๅฎ่ฃ
่ฝฏไปถๅ
๏ผๅนถๆถ้็ณป็ปใๅ
ๆ ธใๆถๆๅ่ฟ่กๆถ้ด็ๆธ
ๅใ
-**RBAC/ๅ
ฑไบซ:**
-ๅๅปบ่ง่ฒๅนถๅจ็จๆท/่ง่ฒไน้ดๅ
ฑไบซไธปๆบใๆฏๆๆๆ่ฎค่ฏ็ฑปๅๅๆๆไธปๆบๅ่ฎฎใ
+**AI ๅฉๆ:**
+ๅฏ้ๅ่ฝ๏ผ้ป่ฎคๅ
ณ้ญ๏ผ้่ฆไฝ ๆๅจๅผๅฏใๆฅๅ
ฅ OpenAIใAnthropicใGeminiใOllama ๆไปปไฝๅ
ผๅฎน OpenAI ็ๆฅๅฃ๏ผๅๅฎ่ฏข้ฎไฝ ็้
็ฝฎใๅฎๅฏไปฅ่ฏปๅไธปๆบใๆบ็พคใไปฃ็ ็ๆฎตๅๅ่ญฆ๏ผๅนถๆๆนๅจไฝไธบๅปบ่ฎฎๆไบค็ปไฝ ็กฎ่ฎค๏ผ่ไธไผ่ช่กไฟฎๆนใๅฎๆฐธ่ฟๆ ๆณๆฅ่งฆๅญๆฎใ็จๆทๅ่ฎพ็ฝฎใ็ฎก็ๅๅฏไปฅๅฏนๆดไธชๅฎไพๅ
ณ้ญๅฎ๏ผไฝ ไนๅฏไปฅๅจๅๅง่ฎพ็ฝฎๆถๆๅฎ้่ใ
-**ไธฒๅฃ่ฟๆฅ:**
-็ดๆฅไปๆต่งๅจๆๆก้ขๅบ็จ่ฟๆฅๅฐไธฒๅฃ่ฎพๅค๏ผ่ทฏ็ฑๅจใไบคๆขๆบใๅพฎๆงๅถๅจ็ญ๏ผใ้
็ฝฎๆณข็น็ใๆฐๆฎไฝใๅๆญขไฝๅๅฅๅถๆ ก้ชใๅจๆฏๆ็ๆต่งๅจไธญไฝฟ็จ Web Serial API๏ผๆๅจ Electron ๅบ็จไธญไฝฟ็จๅ็ๅ็ซฏใ
+**็ปๅฝไธ็จๆท:**
+ๆฏๆๆฌๅฐ่ดฆๆท๏ผไปฅๅ OIDCใLDAPใGitHub ๅ Google ็ปๅฝ๏ผ่ฟๆไธคๆญฅ้ช่ฏ๏ผTOTP๏ผใ้่กๅฏ้ฅ๏ผWebAuthn๏ผๅๅไฟกไปป่ฎพๅคใ็ฎก็ๅๅฏไปฅ็ฎก็็จๆทใๆ OIDC ็พค็ปๆ ๅฐๅฐ่ง่ฒใๆฅ็ๆๆๅนณๅฐไธ็ๆดปๅจไผ่ฏๅนถๅฐๅ
ถๅ้ใไฝ ๅฏไปฅๆๆฌๅฐ่ดฆๆทๅ OIDC ่ดฆๆทๅ
ณ่่ตทๆฅ๏ผๅนถๆฅ็่ฎฐๅฝๆๆไบบๆไฝ็ๅฎก่ฎกๆฅๅฟใ
+**่ง่ฒไธๅ
ฑไบซ:**
+ๅๅปบ่ง่ฒ๏ผๅนถๆๅไธช็บงๅซๆไธปๆบๅ
ฑไบซ็ป็จๆทๆ่ง่ฒ๏ผ่ฟๆฅใๆฅ็ใ็ผ่พๅ็ฎก็ใ้็จไบๆๆ่ฎค่ฏๆนๅผๅๆๆๅ่ฎฎ๏ผๅนถไธๅฏไปฅ่ฆ็ๅ
ฑไบซไธปๆบๆไฝฟ็จ็ๅญๆฎใ
+
+
+
+
+
+
**ๅ่ญฆ:**
-ไธบไธปๆบๆๆ ๏ผCPUใๅ
ๅญใ็ฃ็็ญ๏ผ่ฎพ็ฝฎๅบไบ้ๅผ็ๅ่ญฆ่งๅ๏ผๅนถ้่ฟ ntfy ๆ webhook ๆฅๆถ่งฆๅ้็ฅใๅจๅๅฒๆฅๅฟไธญๆฅ็่งฆๅๅๅทฒ่งฃๅณ็ๅ่ญฆใ
+ไธบ CPUใๅ
ๅญใ็ฃ็็ญไธปๆบๆๆ ่ฎพ็ฝฎ่งๅ๏ผ่งฆๅๆถ้่ฟ ntfyใDiscord ๆ Webhook ้็ฅไฝ ใๅจๅๅฒ่ฎฐๅฝไธญๆฅ็ๆญฃๅจ่งฆๅๅๅทฒๆขๅค็ๅ่ญฆ๏ผๅนถๅฟฝ็ฅไฝ ไธๅ
ณๅฟ็้ฃไบใ
-
-
**ไธป้กต:**
-ๅ
ทๆๆๆพๅฐ็ปไปถ็ฝๆ ผ็ๅฎๅ
จๅฏๅฎๅถไธป้กตใๆทปๅ ไธปๆบ็ถๆใๆๅก้พๆฅใๆถ้ใ็ฌ่ฎฐใRSS ่ฎข้
ใๅคฉๆฐใDocker ๅฎนๅจใไธปๆบๆๆ ๅพ่กจใๅตๅ
ฅๅผ็ป็ซฏใiframe ็ญๅฐ็ปไปถใ
-
-
-
-
-**ๆฐๆฎๅบๅ ๅฏ:**
-ๅ็ซฏๅญๅจไธบๅ ๅฏ็ SQLite ๆฐๆฎๅบๆไปถใๆฅ็[ๆๆกฃ](https://docs.termix.site/security)ไบ่งฃๆดๅคใ
+ไธไธช็ฑไฝ ่ชๅทฑๆญๅปบ็ๆๆพๅฐ็ปไปถ็ฝๆ ผใๅฐ็ปไปถๅ
ๆฌไธปๆบ็ถๆใPingใๆๅก้พๆฅใไนฆ็ญพใๆ็ดขใๆถ้ใๆฅๅใๅ่ฎกๆถใไพฟ็ญพใRSSใๅคฉๆฐใๅพ็ใๅ
ๅต็ฝ้กตใDockerใ้ง้ใๆๆ ๅพ่กจใ่ชๅฎไน API๏ผ็่ณ่ฟๆไธไธชๅฎๆถ็ป็ซฏใ
-**็ฝ็ปๅพ:**
-่ชๅฎไนๆจ็ไปช่กจๆฟ๏ผๆ นๆฎๆจ็ SSH ่ฟๆฅๅฏ่งๅๆจ็ๅฎถๅบญๅฎ้ชๅฎค๏ผๅนถๆฏๆ็ถๆ็ๆตใ
+**ไปฃ็ ็ๆฎตไธๅทฅๅ
ท:**
+ไฟๅญๅธธ็จๅฝไปค๏ผไธ้ฎๆง่ก๏ผๅนถๆฏๆไธปๆบๅ้ๅ่ชๅฎไน่พๅ
ฅใๅฏไปฅๅจๆๆๅทฒๆๅผ็็ป็ซฏไธญๅๆถ่ฟ่กไธๆกๅฝไปค๏ผไนๅฏไปฅๅธฆ่ชๅจ่กฅๅ
จๅฐๆ็ดขๅฝไปคๅๅฒใ
-**SSH ๅทฅๅ
ท:**
-ๅๅปบๅฏ้็จ็ๅฝไปค็ๆฎต๏ผๅช้็นๅปไธไธๅณๅฏๆง่กใๅจๅคไธชๆๅผ็็ป็ซฏไธญๅๆถ่ฟ่กไธไธชๅฝไปคใ
+**ไผ่ฏๅ
ฑไบซ:**
+ๅฎๆถๅ
ฑไบซ็ป็ซฏใRDPใVNC ๆ Telnet ไผ่ฏใๅฏไปฅๅ้ไธไธชๆ ้่ดฆๆทๅณๅฏๅ ๅ
ฅ็้พๆฅ๏ผไนๅฏไปฅๅ
ฑไบซ็ปๆๅฎ็ Termix ็จๆท๏ผๅนถ้ๆฉๅช่ฏปๆๅฏ่ฏปๅใๅ
ฑไบซๅฏไปฅ่ชๅจ่ฟๆๆ้ๆถๆค้๏ผไนๅฏไปฅๅ
จๅฑๆๆไธปๆบๅ
ณ้ญใ
-**ๆไน
ๆ ็ญพ้กต:**
-ๅฆๆๅจ็จๆทไธชไบบ่ตๆไธญๅฏ็จ๏ผSSH ไผ่ฏๅๆ ็ญพ้กตๅฐๅจ่ฎพๅค/ๅทๆฐๅไฟๆๆๅผ็ถๆใ
+**ไผ่ฏๅฝๅถไธๆฅๅฟ:**
+ๅฝๅถ็ป็ซฏใRDP ๅ VNC ไผ่ฏ๏ผไนๅๅฏไปฅๅๆพใๅฏไปฅไธ่ฝฝไผ่ฏ็็บฏๆๆฌๆฅๅฟ๏ผไนๅฏไปฅๆฅ็่ฟๆฅๆฅๅฟ๏ผไบ่งฃ่ฟๆฅ่ฟ็จไธญ็ฉถ็ซๅ็ไบไปไนใ
-**่ฏญ่จ:**
-ๅ
็ฝฎๆฏๆ็บฆ 30 ็ง่ฏญ่จ๏ผ็ฑ [Crowdin](https://docs.termix.site/translations) ็ฎก็๏ผใ
+**ไธฒๅฃ่ฟๆฅ:**
+ไปๆต่งๅจๆๆก้ขๅบ็จ่ฟๆฅ่ทฏ็ฑๅจใไบคๆขๆบๅๅ็ๆบ็ญไธฒๅฃ่ฎพๅคใๅฏ่ฎพ็ฝฎๆณข็น็ใๆฐๆฎไฝใๅๆญขไฝๅๆ ก้ชไฝใๅจๆฏๆ็ๆต่งๅจไธญไฝฟ็จ Web Serial API๏ผๅจๆก้ขๅบ็จไธญไฝฟ็จๅ็ๅ็ซฏใ
+
+
+
+
+
+
+**Tailscale:**
+ไปไฝ ็ tailnet ไธญๆๅ่ฎพๅค๏ผ็นๅ ไธๅฐฑ่ฝๆๅฎไปฌๆทปๅ ไธบไธปๆบ๏ผๅนถไฝฟ็จ Tailscale SSH ่ฟๆฅ๏ผ็ฑ tailnet ACL ่ด่ดฃ่ฎฟ้ฎๆงๅถ๏ผๆ ้ไฟๅญไปปไฝๅญๆฎใไนๆฏๆ Headscale ๅ่ชๅฎไนๆฅๅฃๅฐๅใ
+
+
+
+
+**Proxmox:**
+็ดๆฅไป Proxmox ๅฎไพๅฏผๅ
ฅไธปๆบ๏ผๅนถๅจไธๅฑๆ ็ญพ้กตไธญๆฅ็่็นๅ่ๆๆบ็็ถๆ๏ผๅ
ๆฌ CPUใๅ
ๅญๅๅญๅจใ
+
+
+
+
+
+
+**ๅทฅไฝๅบไธๆ ็ญพ้กต:**
+ไฟๅญไธ็ปๆ ็ญพ้กตๅๅ
ถๅๅฑๅธๅฑ๏ผไธ้ฎๅฐฑ่ฝๆๆดๅฅ้ๆฐๆๅผใTermix ่ฟไผ่ฎฐไฝไฝ ไธๆฌก็ไผ่ฏ๏ผๆไปฅๅทๆฐ้กต้ขๆๆข่ฎพๅคๅๆ ็ญพ้กต้ฝไผๅๆฅใ
+
+
+
+
+**ๅผๅฏผ่ฎพ็ฝฎ:**
+ไธไธช็ฎ็ญ็ๅผๅฏผๆต็จไผๅธฆไฝ ้ๆฉ็้ข้ข่ฎพใไธป้ขใ้่ฆ็ๅ่ฝ๏ผไปฅๅ็ฌฌไธๅฐไธปๆบใ็ฎๆดๆจกๅผไผ้่ไฝ ็จไธๅฐ็ไธ่ฅฟ๏ผไฝ ้ๆถๅฏไปฅ้ๆฐ่ฟ่กๅผๅฏผๆๅๆข้ข่ฎพใ
+
+
+
+
+
+
+**ๆก้ข็ฌ็ซ่ฟ่กไธๅๆญฅ:**
+ๆก้ขๅบ็จๅฏไปฅๅฎๅ
จ็ฌ็ซ่ฟ่ก๏ผ่ชๅธฆๆฌๅฐๅ็ซฏๅๆฐๆฎๅบ๏ผไธ้่ฆๆๅกๅจใไฝ ไนๅฏไปฅๆๅฎ่ฟๅฐ Termix ๆๅกๅจ๏ผๅๅๅๆญฅไธปๆบใๅญๆฎใไปฃ็ ็ๆฎต็ญๅ
ๅฎน๏ผๅนถ้ๆฉ่ฟๆฅๆฏๅจๆฌๅฐๅ่ตท่ฟๆฏ้่ฟๆๅกๅจๅ่ตทใ
+
+
+
+
+**ๅฝไปค่กๅทฅๅ
ท:**
+`termix` ๅฝไปค่กๅทฅๅ
ท๏ผๅฏ็จไบไฝ ็็ป็ซฏๅ่ๆฌใๆๅผ็ป็ซฏใๅจๅๅฐไธปๆบๆๆดไธชๆบ็พคไธๆง่กๅฝไปคใ้่ฟ SFTP ไผ ่พๆไปถ๏ผไปฅๅ็ฎก็ไธปๆบใไปฃ็ ็ๆฎตๅๅญๆฎใ็จ `npm install -g @termix-cli/cli` ๅฎ่ฃ
๏ผๆ่
็ดๆฅไธ่ฝฝ็ฌ็ซ็ๅฏๆง่กๆไปถใ่ฏฆ่ง [CLI ๆๆกฃ](https://docs.termix.site/cli)ใ
+
+
+
+
+
+
+**ๅฎๅ
จ:**
+ๅฏ็ ใๅฏ้ฅๅๅ
ถไปๆบๅฏๆ็จๆทๅ ๅฏ๏ผๆฐๆฎๅบๆไปถๆฌ่บซไนๅฏไปฅๅจ็ฃ็ไธๅ ๅฏใๅ
ทไฝๅ็่ฏทๆฅ็[ๆๆกฃ](https://docs.termix.site/security)ใ
+
+
+
+
+**ๅค่ฏญ่จ:**
+ๅ
็ฝฎ็บฆ 30 ็ง่ฏญ่จ๏ผ้่ฟ [Crowdin](https://docs.termix.site/translations) ็ฎก็ใ
@@ -199,17 +255,20 @@ Termix ๆฏไธไธชๅผๆบใๆฐธไน
ๅ
่ดนใ่ชๆ็ฎก็ไธไฝๅๆๅกๅจ็ฎก็ๅนณ
ๆดๅคๅ่ฝ
-- **ไปช่กจๆฟ** - ๅจไปช่กจๆฟไธไธ็ฎไบ็ถๅฐๆฅ็ๆๅกๅจไฟกๆฏ
-- **API ๅฏ้ฅ** - ๅๅปบๅธฆๆๅฐๆๆฅๆ็็จๆท่ๅด API ๅฏ้ฅ๏ผ็จไบ่ชๅจๅ/CI
-- **ๆฐๆฎๅฏผๅบ/ๅฏผๅ
ฅ** - ๅฏผๅบๅๅฏผๅ
ฅ SSH ไธปๆบใๅญๆฎๅๆไปถ็ฎก็ๅจๆฐๆฎ
-- **่ชๅจ SSL ่ฎพ็ฝฎ** - ๅ
็ฝฎ SSL ่ฏไนฆ็ๆๅ็ฎก็๏ผๆฏๆ HTTPS ้ๅฎๅ
-- **็ฐไปฃ UI** - ไฝฟ็จ ReactใTailwind CSS ๅ Shadcn ๆๅปบ็ๆดๆด็ๆก้ข/็งปๅจๅๅฅฝ็้ขใๆๅค็ง UI ไธป้ขๅฏ้๏ผๅ
ๆฌๆต
่ฒใๆทฑ่ฒใDracula ็ญใไฝฟ็จ URL ่ทฏ็ฑๅ
จๅฑๆๅผไปปไฝ่ฟๆฅใ
-- **ๅฝไปคๅๅฒ** - ่ชๅจๅฎๆๅนถๆฅ็ไนๅ่ฟ่ก่ฟ็ SSH ๅฝไปค
-- **ๅฟซ้่ฟๆฅ** - ๆ ้ไฟๅญ่ฟๆฅๆฐๆฎๅณๅฏ่ฟๆฅๅฐๆๅกๅจ
-- **ๅฝไปค้ขๆฟ** - ๅๅปๅทฆ Shift ้ฎๅณๅฏ้่ฟ้ฎ็ๅฟซ้่ฎฟ้ฎ SSH ่ฟๆฅ
-- **Proxmox ้ๆ** - ไปๆจ็ Proxmox ๅฎไพ่ชๅจๅฐไธปๆบๆทปๅ ๅฐ Termix
-- **ไธฐๅฏ็ SSH ๅ่ฝ** - ๆฏๆ่ทณ่ฝฌไธปๆบใWarpgateใๅบไบ TOTP ็่ฟๆฅใSOCKS5ใไธปๆบๅฏ้ฅ้ช่ฏใๅฏ็ ่ชๅจๅกซๅ
ใ[OPKSSH](https://github.com/openpubkey/opkssh)ใtmuxใ็ซฏๅฃๆฒๅปใ็ป็ซฏๆฅๅฟ่ฎฐๅฝใSSH ไปฃ็่ฝฌๅใBitwarden SSH ไปฃ็ใHashiCorp Vault SSH ็ญพๅ็ญ
-- **Termix ID** - ๅ
็ฝฎไบ Termix ไธญ็ sshid.io ็ญๆๅ่ฝใ่ฎค้ขไธไธช็จๆทๅ๏ผๅจ่งฃๆ URL ไธๅๅธๆจ็ๅ
ฌๅผ SSH ๅฏ้ฅ๏ผๅนถไฝฟ็จๅ
็ฝฎ CA ็ญพๅ SSH ่ฏไนฆใ
+- **ไปช่กจ็** - ไธ็ผ็ๆธ
ไฝ ็ๆๅกๅจ๏ผๅก็็ฑไฝ ่ชๅทฑๆๅธ
+- **็ฝ็ปๆๆๅพ** - ๆ นๆฎไฝ ็ไธปๆบ็ปๅถๅบไฝ ็ๅฎถๅบญๅฎ้ชๅฎค๏ผๅนถๆพ็คบๅฎๆถ็ถๆ
+- **Tmux ็่งๅจ** - ๆต่ง tmux ็ไผ่ฏใ็ชๅฃๅ้ขๆฟ๏ผๆฏๆ้ข่งๅๆ็ดข
+- **API ๅฏ้ฅ** - ้ขๅ็จๆท็ๅฏ้ฅ๏ผๅธฆๆๆๆ๏ผๅฏ็จไบ่ๆฌๅ CI
+- **ๅฏผๅบไธๅฏผๅ
ฅ** - ๆไธปๆบใๅญๆฎๅๆไปถ็ฎก็ๅจๆฐๆฎๅฏผๅ
ฅๅฏผๅบ
+- **่ชๅจ SSL** - ่ชๅจ็ญพๅๅ็ปญๆ่ฏไนฆ๏ผๅนถ้
็ฝฎ HTTPS ่ทณ่ฝฌ๏ผไนๅฏไปฅไฝฟ็จไฝ ่ชๅทฑ็่ฏไนฆ
+- **ๆฐๆฎๅบ** - ้ป่ฎคไฝฟ็จ SQLite๏ผๅๆถๆฏๆ PostgreSQL ๅ MySQL
+- **็ฐไปฃ็้ข** - ็ฎๆด็ React ็้ข๏ผๆก้ขๅ็งปๅจ็ซฏ้ฝ้็จ๏ผๆไพๆต
่ฒใๆทฑ่ฒๅ Dracula ็ญไธป้ขใไปปไฝ่ฟๆฅ้ฝ่ฝ้่ฟ็ฝๅๅ
จๅฑๆๅผ
+- **ๅฝไปค้ขๆฟ** - ๅๅปๅทฆ Shift๏ผ็จ้ฎ็็ดๆฅ่ทณๅฐๆๅฐไธปๆบ
+- **้ฎ็ๅฟซๆท้ฎ** - ๅจๆ ็ญพ้กตไน้ดๅๆขใๅ
ณ้ญๆ ็ญพ้กต็ญ๏ผๅ
จ้จๅฏไปฅ้ๆฐ็ปๅฎ
+- **็ฝ็ปๅค้** - ไป Termix ๆ่ชๅจๅๆญฅ้ชคไธญๅค้ไธๅฐๆบๅจ
+- **ๅไฟกไปปไปฃ็่ฎค่ฏ** - ็ฑๅๅไปฃ็ๅฎๆ็ปๅฝ๏ผๅนถๆ็จๆทไฟกๆฏไผ ้่ฟๆฅ
+- **ไธฐๅฏ็ SSH ๅ่ฝ** - ่ทณๆฟๆบใWarpgateใTOTP ้ช่ฏใSOCKS5ใไธปๆบๅฏ้ฅ้ช่ฏใๅฏ็ ่ชๅจๅกซๅ
ใ[OPKSSH](https://github.com/openpubkey/opkssh)ใtmuxใ็ซฏๅฃๆฒ้จใ็ป็ซฏๆฅๅฟใไปฃ็่ฝฌๅใBitwarden SSH ไปฃ็ใHashiCorp Vault SSH ็ญพๅ็ญ็ญ
+- **Termix ID** - ๅ
็ฝฎ็ sshid.io ๅผๅ่ฝใ่ฎค้ขไธไธช็จๆทๅ๏ผๅจ่งฃๆๅฐๅไธๅๅธไฝ ็ๅ
ฌ้ฅ๏ผๅนถ็จๅ
็ฝฎ CA ็ญพๅ SSH ่ฏไนฆ
@@ -220,11 +279,11 @@ Termix ๆฏไธไธชๅผๆบใๆฐธไน
ๅ
่ดนใ่ชๆ็ฎก็ไธไฝๅๆๅกๅจ็ฎก็ๅนณ
ๅนณๅฐ
-ๅ่ก็
+ๅ่กๆนๅผ
Web
-ไปปไฝ็ฐไปฃๆต่งๅจ๏ผChromeใSafariใFirefox๏ผยท PWA ๆฏๆ
+ไปปไฝ็ฐไปฃๆต่งๅจ๏ผChromeใSafariใFirefox๏ผยท ๆฏๆ PWA
Windows x64/ia32
@@ -252,9 +311,9 @@ Termix ๆฏไธไธชๅผๆบใๆฐธไน
ๅ
่ดนใ่ชๆ็ฎก็ไธไฝๅๆๅกๅจ็ฎก็ๅนณ
## ๅฎ่ฃ
-่ฎฟ้ฎ [Termix ๆๆกฃ](https://docs.termix.site/install) ไบ่งฃๆๅ
ณๅฆไฝๅจๆๆๅนณๅฐไธๅฎ่ฃ
Termix ็ๅฎๆด่ฏดๆใ
+่ฎฟ้ฎ [Termix ๆๆกฃ](https://docs.termix.site/install) ๆฅ็ๆๆๅนณๅฐ็ๅฎๆดๅฎ่ฃ
่ฏดๆใ
-็คบไพ Docker Compose ๆไปถ๏ผๅฆๆๆจไธๆ็ฎไฝฟ็จ่ฟ็จๆก้ขๅ่ฝ๏ผๅฏไปฅ็็ฅ `guacd` ๅ็ฝ็ป้จๅ๏ผ๏ผ
+Docker Compose ็คบไพ๏ผๅฆๆไฝ ไธๆ็ฎไฝฟ็จ่ฟ็จๆก้ขๅ่ฝ๏ผๅฏไปฅ็็ฅ `guacd` ๅ็ธๅ
ณ็ฝ็ป้
็ฝฎ๏ผ๏ผ
```yaml
services:
@@ -291,11 +350,37 @@ networks:
driver: bridge
```
+### ๅฝไปค่กๅทฅๅ
ท
+
+Termix ่ฟๆไพๅฝไปค่กๅทฅๅ
ท๏ผไฝ ๅฏไปฅๅจ็ป็ซฏ้็ฎก็ๆๅกๅจ๏ผไนๅฏไปฅๆ Termix ็จๅจ่ชๅทฑ็่ๆฌไธญใ
+
+```bash
+npm install -g @termix-cli/cli
+termix login --url https://termix.example.com
+termix ssh 1
+```
+
+ๅฎๅฏไปฅๆๅผ็ป็ซฏใๅจๅๅฐไธปๆบๆๆดไธชๆบ็พคไธๆง่กๅฝไปคใ้่ฟ SFTP ไผ ่พๆไปถ๏ผไปฅๅ็ฎก็ไธปๆบใไปฃ็ ็ๆฎตๅๅญๆฎใๅฎๆดๆๆกฃ่ง [docs.termix.site/cli](https://docs.termix.site/cli)ใ
+
+### ไบ็ซฏ้จ็ฝฒ
+
+ไฝ ไนๅฏไปฅๆ Termix ๆๅก็ซฏ่ทๅจ VPS ไธ๏ผ่ไธๆฏ่ชๅทฑ็ๅ
็ฝ้ใๅฆๆ Termix ๅฐฑ่ฟ่กๅจๅฎๆ็ฎก็็็ฝ็ปไธญ๏ผไธๆฆ็ฝ็ปๅบ้ฎ้ข๏ผTermix ไนไผ่ท็ไธ่ตทๆๆ๏ผ่่ฟๆฐๆฐๆฏไฝ ๆ้่ฆๅฎ็ๆถๅใๆพๅจๅค้ข่ฟ่กๅฏไปฅไฟ่ฏๅฎๅง็ปๅฏ่พพ๏ผ่ฟ่ฝ่ทๅพๅบๅฎ IP๏ผไธ็จ VPN ๆ็ซฏๅฃ่ฝฌๅๅฐฑ่ฝไปไปปไฝๅฐๆนๆฅๅ
ฅใ
+
+[GINERNET](https://docs.termix.site/install/ginernet) ๆฏ Termix ็่ตๅฉๅ๏ผๆๆกฃ้ๆ้จ็ฝฒๅฐไปไปฌ VPS ๅนณๅฐ็ๅๆญฅๆๅใ
+
+
+
+## ้ฅๆต
+
+Termix ๆฏๅคฉไผๅ้ไธๆฌกๅฟๅ็ๅฐๅ็ป่ฎกไฟกๆฏ๏ผ่ฎฉๆไบ่งฃๆๅคๅฐๅฎไพๅจ่ฟ่กใๅชไบๅ่ฝ่ขซ็จๅฐใๅ
ๅฎนๅ
ๆฌไธไธช้ๆบ็ๅฎไพ IDใไฝ ๆๅคๅฐ็จๆทๅไธปๆบใๅบ็จ็ๆฌ๏ผไปฅๅ่ฟๅป 24 ๅฐๆถๅ
ไฝฟ็จไบๅชไบๅ่ฝ๏ผ็ป็ซฏใๆไปถ็ฎก็ๅจใ้ง้ใDocker ็ญ๏ผใๅฎ็ปไธๅ
ๅซ็จๆทๅใไธปๆบๅใIP ๅฐๅใๅญๆฎ๏ผๆไปปไฝ่ฝ่ฏๅซไฝ ๅไฝ ๆๅกๅจ็ไฟกๆฏใ
+
+่ฏฅๅ่ฝ้ป่ฎคๅผๅฏใไฝ ๅฏไปฅๅจ็ฎก็่ฎพ็ฝฎ็โ้็จโไธญๅ
ณ้ญๅฎ๏ผๆ่
ๅจๅฏๅจ Termix ไนๅ่ฎพ็ฝฎ `ENABLE_TELEMETRY=false`ใ
+
## ๆ่ต
-Termix ๅ
่ดนไธๅผๆบ๏ผๆฒกๆ่ฎข้
ๆไป่ดนๆนๆกใๅฆๆๆจ่งๅพๅฎๆ็จ๏ผ่ฏท่่ๆ่ต ไปฅๅธฎๅฉๆฏไปๆๅกๅจ่ดน็จใๅๅๅๅผๅๆถ้ดใๆ่ต ่ฟๆๅฉไบ่ตๅฉ็ ็ฉถๅๅญฆไน ๆๅปบ SAMLใKubernetes ๅ Agent ๆฏๆ็ญๅ่ฝๆ้็ๆถ้ดใๅจไธๆน่ฟฝ่ธช่ฟๅบฆๅนถ่ฟ่กๆ่ต ใ
+Termix ๅ
่ดนไธๅผๆบ๏ผๆฒกๆ่ฎข้
ไนๆฒกๆไป่ดนๆนๆกใๅฆๆไฝ ่งๅพๅฎๆ็จ๏ผๅฏไปฅ่่ๆ่ต ๏ผๅธฎๅฟๅๆ
ๆๅกๅจใๅๅๅๅผๅๆถ้ด็ๆๆฌใๆ่ต ่ฟ่ฝๆฏๆ็ ็ฉถๅๅญฆไน SAMLใKubernetesใAgent ็ญๅ่ฝๆ้็ๆถ้ดใๅฏไปฅๅจไธๆนๆฅ็่ฟๅฑๅนถๆ่ต ใ
[ๆ่ต ](https://donate.termix.site/)
@@ -303,7 +388,7 @@ Termix ๅ
่ดนไธๅผๆบ๏ผๆฒกๆ่ฎข้
ๆไป่ดนๆนๆกใๅฆๆๆจ่งๅพๅฎๆ็จ
## ่ตๅฉๅ
-ๆๆ้่ฟไป่ดนๅฑ็คบไฝ็ฝฎๆฏๆๅผๅๅ๏ผ่ฏทๅ้้ฎไปถ่ณ [mail@termix.site](mailto:mail@termix.site)ใ
+ๆๆ้่ฟไป่ดนๅฑ็คบไฝๆฏๆๅผๅๅ๏ผ่ฏทๅ้ฎไปถๅฐ [mail@termix.site](mailto:mail@termix.site)ใ
@@ -325,10 +410,6 @@ Termix ๅ
่ดนไธๅผๆบ๏ผๆฒกๆ่ฎข้
ๆไป่ดนๆนๆกใๅฆๆๆจ่งๅพๅฎๆ็จ
-
-
-
-
@@ -340,14 +421,17 @@ Termix ๅ
่ดนไธๅผๆบ๏ผๆฒกๆ่ฎข้
ๆไป่ดนๆนๆกใๅฆๆๆจ่งๅพๅฎๆ็จ
-
+
+
+
+
## ๆฏๆ
-ๅฆๆๆจ้่ฆ Termix ็ๅธฎๅฉๆๆณ่ฆ่ฏทๆฑๅ่ฝ๏ผ่ฏท่ฎฟ้ฎ [Issues](https://github.com/Termix-SSH/Support/issues) ้กต้ข๏ผ็ปๅฝๅนถ็นๅป `New Issue`ใ่ฏทๅฐฝๅฏ่ฝ่ฏฆ็ปๅฐๆ่ฟฐๆจ็้ฎ้ข๏ผๅปบ่ฎฎไฝฟ็จ่ฑ่ฏญใๆจไนๅฏไปฅๅ ๅ
ฅ [Discord](https://discord.gg/jVQGdvHDrf) ๆๅกๅจๅนถ่ฎฟ้ฎๆฏๆ้ข้๏ผไฝๅๅบๆถ้ดๅฏ่ฝ่พ้ฟใ
+้่ฆๅธฎๅฉๆๆณๆๅ่ฝๅปบ่ฎฎ๏ผๅฏไปฅ[ๆฐๅปบไธไธช issue](https://github.com/Termix-SSH/Support/issues)๏ผๅฐฝ้ๅๆธ
ๆฅ็ป่๏ผๅฆๆๆนไพฟ่ฏท็จ่ฑๆใไฝ ไนๅฏไปฅๅจ [Discord](https://discord.gg/jVQGdvHDrf) ็ๆฏๆ้ข้ๆ้ฎ๏ผไธ่ฟ้ฃ่พนๅๅคๅฏ่ฝไผๆ
ขไธไบใ
@@ -359,7 +443,7 @@ Termix ๅ
่ดนไธๅผๆบ๏ผๆฒกๆ่ฎข้
ๆไป่ดนๆนๆกใๅฆๆๆจ่งๅพๅฎๆ็จ
[](https://www.youtube.com/@TermixSSH/videos)
-ๅจ YouTube ไธ่ง็ๆดๆฐๆฆ่ง
+ๅจ YouTube ไธ่ง็็ๆฌๆดๆฐไป็ป
@@ -399,7 +483,7 @@ Termix ๅ
่ดนไธๅผๆบ๏ผๆฒกๆ่ฎข้
ๆไป่ดนๆนๆกใๅฆๆๆจ่งๅพๅฎๆ็จ
-ๆไบ่ง้ขๅๅพๅๅฏ่ฝๅทฒ่ฟๆถ๏ผๆ่
ๅฏ่ฝๆ ๆณๅฎ็พๅฑ็คบๅ่ฝใ
+้จๅ่ง้ขๅๅพ็ๅฏ่ฝๅทฒ็ป่ฟๆถ๏ผๆ่
ไธ่ฝๅฎๆดๅฑ็คบๅ่ฝใ
@@ -407,10 +491,10 @@ Termix ๅ
่ดนไธๅผๆบ๏ผๆฒกๆ่ฎข้
ๆไป่ดนๆนๆกใๅฆๆๆจ่งๅพๅฎๆ็จ
## ่ฎกๅๅ่ฝ
-ๆฅ็ [Projects](https://github.com/orgs/Termix-SSH/projects/5) ไบ่งฃๆๆ่ฎกๅๅ่ฝใๅฆๆๆจๆณ่ดก็ฎไปฃ็ ๏ผ่ฏทๅ้
[Contributing](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md)ใ
+ๆๆ่ฎกๅไธญ็ๅ่ฝ้ฝๅจ [Projects](https://github.com/orgs/Termix-SSH/projects/5) ้ใๅฆๆไฝ ๆณๅไธ่ดก็ฎ๏ผ่ฏทๆฅ็[่ดก็ฎๆๅ](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md)ใ
## ่ฎธๅฏ่ฏ
-ๆ นๆฎ Apache License Version 2.0 ๅๅธใๆดๅคไฟกๆฏ่ฏทๅ่ง `LICENSE`ใ
+ๅบไบ Apache License 2.0 ๅๅธใ่ฏฆ่ง `LICENSE`ใ
diff --git a/docs/readme/README-DE.md b/docs/readme/README-DE.md
index 6ca2f9a..9ac5ff6 100644
--- a/docs/readme/README-DE.md
+++ b/docs/readme/README-DE.md
@@ -4,7 +4,7 @@
Termix
-Selbst gehostete SSH-Verwaltung und Remote-Desktop-Zugriff
+Selbst gehostete Serververwaltung, von SSH und Remotedesktop bis zu Automatisierungen
English ยท
@@ -37,7 +37,7 @@
-Termix ist kostenlos und Open Source. Wenn Sie es nรผtzlich finden, erwรคgen Sie eine [Spende](https://donate.termix.site/), um Serverkosten und Entwicklungszeit zu decken.
+Termix ist kostenlos und quelloffen. Wenn es dir hilft, denk รผber eine [Spende](https://donate.termix.site/) nach, um Serverkosten und Entwicklungszeit zu decken.
@@ -56,9 +56,9 @@ Termix ist kostenlos und Open Source. Wenn Sie es nรผtzlich finden, erwรคgen Sie
-## Uberblick
+## รberblick
-Termix ist eine quelloffene, dauerhaft kostenlose, selbst gehostete All-in-One-Serververwaltungsplattform. Sie bietet eine plattformubergreifende Losung zur Verwaltung Ihrer Server und Infrastruktur uber eine einzige, intuitive Oberflache. Termix bietet SSH-Terminalzugriff, Remote-Desktop-Steuerung (RDP, VNC, Telnet), SSH-Tunneling-Funktionen, Remote-Dateiverwaltung und viele weitere Werkzeuge. Termix ist die perfekte kostenlose und selbst gehostete Alternative zu Termius, verfugbar fur alle Plattformen.
+Termix ist eine kostenlose, quelloffene und selbst gehostete Plattform zur Verwaltung deiner Server. Sie bringt SSH-Terminals, Remotedesktops (RDP, VNC, Telnet), Dateiรผbertragungen, Tunnel, Docker, Metriken und Automatisierungen an einem Ort zusammen, im Browser, auf dem Desktop und auf dem Handy. Eine selbst gehostete Alternative zu Termius, die dauerhaft kostenlos bleibt.
@@ -68,42 +68,42 @@ Termix ist eine quelloffene, dauerhaft kostenlose, selbst gehostete All-in-One-S
-**SSH-Terminalzugriff:**
-Voll ausgestattetes Terminal mit Split-Screen-Unterstutzung (bis zu 4 Panels) mit einem browserahnlichen Tab-System. Enthalt Unterstutzung fur die Anpassung des Terminals einschliesslich gangiger Terminal-Themes, Schriftarten und anderer Komponenten.
+**SSH-Terminal:**
+Ein vollwertiges Terminal mit Tabs wie im Browser und geteiltem Bildschirm, bis zu 6 Bereiche gleichzeitig. Thema, Schrift und Farben wรคhlst du selbst. รber jeder Sitzung sitzt eine Leiste mit CPU, Speicher und Festplatte in Echtzeit sowie Verknรผpfungen zu Dateien, Docker, Tunneln und Metriken dieses Hosts.
-**Remote-Desktop-Zugriff:**
-RDP-, VNC- und Telnet-Unterstutzung uber den Browser mit vollstandiger Anpassung und Split-Screen.
+**Remotedesktop:**
+RDP, VNC und Telnet im Browser, in Tabs und geteiltem Bildschirm wie jede andere Sitzung. Mit Dateibrowser fรผr RDP-Laufwerke und Hochladen per Drag-and-drop. Auf dem Windows-Desktop kannst du einen Host auch im nativen RDP-Client รถffnen.
-**SSH-Tunnelverwaltung:**
-Erstellen und verwalten Sie Server-zu-Server-SSH-Tunnel mit automatischer Wiederverbindung, Gesundheitsuberwachung sowie lokaler, entfernter oder dynamischer SOCKS-Weiterleitung. Desktop-Client-zu-Server-Tunneleinstellungen werden lokal pro Desktop-Installation gespeichert, optionale C2S-Preset-Snapshots konnen auf dem Server gespeichert, umbenannt, geladen oder geloscht werden, wenn Sie eine lokale Tunnelkonfiguration zwischen Clients ubertragen mochten.
+**SSH-Tunnel:**
+Lokale, entfernte und dynamische SOCKS-Weiterleitung mit automatischem Neuverbinden und Statusprรผfungen. Client-zu-Server-Tunnel der Desktop-App bleiben auf diesem Rechner, und du kannst Voreinstellungen auf dem Server speichern, um eine Konfiguration auf einen anderen Rechner zu รผbernehmen.
-**Remote-Dateimanager:**
-Verwalten Sie Dateien direkt auf Remote-Servern mit Unterstutzung fur das Anzeigen und Bearbeiten von Code, Bildern, Audio und Video. Laden Sie Dateien hoch, herunter, benennen Sie sie um, loschen oder verschieben Sie sie nahtlos mit Sudo-Unterstutzung. Enthalt Unterstutzung fur das Verschieben von Dateien von Server zu Server.
+**Dateimanager:**
+Dateien รผber SFTP durchsuchen, bearbeiten, hochladen, herunterladen, umbenennen, verschieben und lรถschen, auch mit sudo. Code, Bilder, Audio und Video ansehen und bearbeiten. Dateien direkt von einem Server zum anderen kopieren, wobei der schnellste Weg fรผr dich gewรคhlt und die รbertragung auf Fehler geprรผft wird.
-**Docker- und Podman-Verwaltung:**
-Container starten, stoppen, pausieren, entfernen. Container-Statistiken anzeigen. Container uber Docker-Exec-Terminal steuern. Unterstutzt sowohl Docker als auch Podman als Container-Laufzeitumgebung. Es wurde nicht entwickelt, um Portainer oder Dockge zu ersetzen, sondern um Ihre Container einfach zu verwalten, anstatt sie zu erstellen.
+**Docker und Podman:**
+Container starten, stoppen, pausieren und entfernen, ihre Auslastung ansehen und eine Shell darin รถffnen. Funktioniert mit Docker und mit Podman. Es soll Portainer oder Dockge nicht ersetzen, sondern nur die Container verwalten, die du schon hast.
-**SSH-Host-Manager:**
-Speichern, organisieren und verwalten Sie Ihre SSH-Verbindungen mit Tags und Ordnern (Ordneranpassung und verschachtelte Ordner werden unterstutzt) und speichern Sie einfach wiederverwendbare Anmeldeinformationen mit der Moglichkeit, die Bereitstellung von SSH-Schlusseln zu automatisieren.
+**Hostverwaltung:**
+Hosts mit Tags und verschachtelten Ordnern ordnen, die du benennen und einfรคrben kannst. Gespeicherte Zugangsdaten fรผr mehrere Hosts wiederverwenden, SSH-Schlรผssel automatisch verteilen, Hosts unter einem รผbergeordneten Host gruppieren, in groรen Mengen bearbeiten und exportieren. Fรผr einmalige Verbindungen, die du nicht speichern willst, gibt es Schnellverbindung.
@@ -111,83 +111,139 @@ Speichern, organisieren und verwalten Sie Ihre SSH-Verbindungen mit Tags und Ord
**Host-Metriken:**
-CPU-, Arbeitsspeicher- und Festplattenauslastung, Netzwerk, Betriebszeit, Systeminformationen, Firewall, Port-Monitor, Log-Viewer, Benutzer/Berechtigungen, Zertifikate und vieles mehr anzeigen, was auf den meisten Linux-basierten Servern funktioniert. Enthalt Zeitreihen-Verlaufsdiagramme und schwellenwertbasierte Warnmeldungen mit ntfy- und Webhook-Unterstutzung.
+CPU, Speicher, Festplatte, Netzwerk, Temperatur, Laufzeit, Prozesse, Ports, Anmeldungen und Systeminfos auf den meisten Linux-Servern, mit Verlaufsgrafiken. รber Verwaltungskarten kรผmmerst du dich um Dienste, Cronjobs, Pakete, Benutzer, Firewallregeln, WireGuard, Tailscale, SSL-Zertifikate, Logs und Statusprรผfungen, ohne Termix zu verlassen.
-**Benutzerauthentifizierung:**
-Sichere Benutzerverwaltung mit Admin-Kontrollen (kann Informationen anderer Benutzer bearbeiten) und OIDC-/LDAP-/SSO-Unterstutzung (mit Zugriffskontrolle), 2FA (TOTP) und Passkey (WebAuthn)-Unterstutzung. Aktive Benutzersitzungen uber alle Plattformen anzeigen und Berechtigungen widerrufen. OIDC-/Lokale Konten miteinander verknupfen. Audit-Protokoll aller Benutzeraktionen anzeigen.
+**Automatisierungen:**
+Wรคhle einen Auslรถser und lege fest, was passieren soll. Auslรถser sind unter anderem eine Metrik รผber einem Schwellwert, ein Host der hoch- oder runtergeht, eine geรคnderte Statusprรผfung, ein Zeitplan, ein Container-Ereignis oder ein eingehender Webhook. Schritte kรถnnen Befehle und Snippets ausfรผhren, Container und Tunnel steuern, einen Host aufwecken, eine URL aufrufen, warten, sich nach einer Bedingung verzweigen, eine andere Automatisierung starten und dich รผber ntfy, Discord oder einen Webhook benachrichtigen. Mit Testlรคufen probierst du alles gefahrlos aus.
-**Tailscale-Integration:**
-Gerate aus Ihrem Tailnet auflisten, um sie schnell als Hosts hinzuzufugen, und mit Tailscale SSH als Authentifizierungsmethode verbinden, sodass Ihre Tailnet-ACLs die Autorisierung ubernehmen, ohne Anmeldedaten speichern zu mussen.
+**Flotten:**
+Fasse Hosts zu einer Flotte zusammen, entweder von Hand oder รผber Tag-Regeln, damit neue Hosts von selbst dazukommen. Fรผhre einen Befehl auf allen Hosts gleichzeitig aus, schiebe und hole Dateien auf allen, installiere Pakete und sammle eine รbersicht รผber Betriebssystem, Kernel, Architektur und Laufzeit.
-**RBAC/Freigabe:**
-Erstellen Sie Rollen und teilen Sie Hosts uber Benutzer/Rollen hinweg. Unterstutzt alle Authentifizierungstypen und alle Host-Protokolle.
+**KI-Assistent:**
+Optional und aus, bis du ihn einschaltest. Verbinde OpenAI, Anthropic, Gemini, Ollama oder einen beliebigen OpenAI-kompatiblen Endpunkt und frag ihn zu deiner Umgebung. Er liest Hosts, Flotten, Snippets und Warnungen und schlรคgt รnderungen vor, die du bestรคtigst, statt sie selbst vorzunehmen. An Zugangsdaten, Benutzer und Einstellungen kommt er nie heran. Administratoren kรถnnen ihn fรผr die ganze Instanz auslassen, und du kannst ihn schon bei der Einrichtung ausblenden.
-**Serielle Verbindungen:**
-Verbinden Sie sich direkt vom Browser oder der Desktop-App aus mit seriellen Geraten (Router, Switches, Mikrocontroller usw.). Konfigurieren Sie Baudrate, Datenbits, Stoppbits und Paritat. Verwendet die Web Serial API in unterstutzten Browsern oder ein natives Backend in der Electron-App.
+**Anmeldung und Benutzer:**
+Lokale Konten sowie Anmeldung รผber OIDC, LDAP, GitHub und Google, dazu Zwei-Faktor-Authentifizierung (TOTP), Passkeys (WebAuthn) und vertrauenswรผrdige Gerรคte. Administratoren kรถnnen Benutzer verwalten, OIDC-Gruppen auf Rollen abbilden, alle aktiven Sitzungen รผber alle Plattformen hinweg sehen und beenden. Verknรผpfe dein lokales Konto mit deinem OIDC-Konto und lies im Prรผfprotokoll nach, wer was gemacht hat.
-**Warnmeldungen:**
-Legen Sie schwellenwertbasierte Warnregeln fur Host-Metriken (CPU, Arbeitsspeicher, Festplatte usw.) fest und erhalten Sie Benachrichtigungen uber ntfy oder Webhooks, wenn diese ausgelost werden. Zeigen Sie ausgeloste und aufgeloste Warnmeldungen in einem Verlaufsprotokoll an.
+**Rollen und Freigaben:**
+Lege Rollen an und teile Hosts mit Benutzern oder Rollen auf vier Stufen: Verbinden, Ansehen, Bearbeiten und Verwalten. Das funktioniert mit jeder Authentifizierungsart und jedem Protokoll, und du kannst die Zugangsdaten fรผr einen geteilten Host รผberschreiben.
+**Warnungen:**
+Lege Regeln fรผr Host-Metriken wie CPU, Speicher und Festplatte fest und lass dich รผber ntfy, Discord oder einen Webhook benachrichtigen, wenn sie greifen. Sieh dir aktive und wieder behobene Warnungen im Verlauf an und blende aus, was dich nicht interessiert.
+
+
+
+
**Startseite:**
-Eine vollstandig anpassbare Startseite mit einem Drag-and-Drop-Widget-Raster. Fugen Sie Widgets fur Hoststatus, Service-Links, Uhren, Notizen, RSS-Feeds, Wetter, Docker-Container, Host-Metrik-Diagramme, eingebettete Terminals, iFrames und mehr hinzu.
-
-
-
-
-**Datenbankverschlusselung:**
-Backend gespeichert als verschlusselte SQLite-Datenbankdateien. Weitere Informationen in der [Dokumentation](https://docs.termix.site/security).
+Ein Raster aus Widgets, das du selbst per Drag-and-drop zusammenstellst. Widgets fรผr Hoststatus, Pings, Dienstlinks, Lesezeichen, Suche, Uhren, Kalender, Countdowns, Notizen, RSS, Wetter, Bilder, Iframes, Docker, Tunnel, Metrikdiagramme, eigene APIs und sogar ein laufendes Terminal.
-**Netzwerkgraph:**
-Passen Sie Ihr Dashboard an, um Ihr Homelab basierend auf Ihren SSH-Verbindungen mit Statusunterstutzung zu visualisieren.
+**Snippets und Werkzeuge:**
+Speichere Befehle, die du oft brauchst, und starte sie mit einem Klick, mit Variablen fรผr den Host und eigene Eingaben. Fรผhre einen Befehl in allen offenen Terminals zugleich aus und durchsuche deinen Befehlsverlauf mit Autovervollstรคndigung.
-**SSH-Werkzeuge:**
-Erstellen Sie wiederverwendbare Befehlsvorlagen, die mit einem einzigen Klick ausgefuhrt werden. Fuhren Sie einen Befehl gleichzeitig in mehreren geoffneten Terminals aus.
+**Sitzungsfreigabe:**
+Teile eine laufende Terminal-, RDP-, VNC- oder Telnet-Sitzung in Echtzeit. Verschicke einen Link, dem jeder ohne Konto beitreten kann, oder teile mit einem bestimmten Termix-Benutzer, nur lesend oder mit Schreibrechten. Freigaben kรถnnen von selbst ablaufen oder zurรผckgezogen werden und lassen sich global oder pro Host abschalten.
-**Persistente Tabs:**
-SSH-Sitzungen und Tabs bleiben uber Gerate/Aktualisierungen hinweg offen, wenn im Benutzerprofil aktiviert.
+**Sitzungsaufzeichnung und Protokolle:**
+Zeichne Terminal-, RDP- und VNC-Sitzungen auf und spiel sie spรคter ab. Lade einfache Textprotokolle einer Sitzung herunter und sieh im Verbindungsprotokoll nach, was wรคhrend einer Verbindung genau passiert ist.
+
+
+
+
+**Serielle Verbindungen:**
+Sprich mit seriellen Gerรคten wie Routern, Switches und Mikrocontrollern, aus dem Browser oder der Desktop-App. Stelle Baudrate, Datenbits, Stoppbits und Paritรคt ein. Nutzt die Web-Serial-API in passenden Browsern oder ein natives Backend in der Desktop-App.
+
+
+
+
+
+
+**Tailscale:**
+Hol Gerรคte aus deinem Tailnet, um sie mit ein paar Klicks als Hosts anzulegen, und verbinde dich per Tailscale SSH, damit deine Tailnet-ACLs den Zugriff regeln und keine Zugangsdaten gespeichert werden. Headscale und eigene Endpunkte gehen auch.
+
+
+
+
+**Proxmox:**
+Importiere Hosts direkt aus einer Proxmox-Instanz und beobachte Knoten- und Gastwerte wie CPU, Speicher und Storage in einem eigenen Tab.
+
+
+
+
+
+
+**Arbeitsbereiche und Tabs:**
+Speichere eine Reihe von Tabs samt Aufteilung und รถffne alles mit einem Klick wieder. Termix merkt sich auch deine letzte Sitzung, sodass deine Tabs nach einem Neuladen und auf anderen Gerรคten wieder da sind.
+
+
+
+
+**Gefรผhrte Einrichtung:**
+Eine kurze Einrichtung fรผhrt dich durch die Wahl einer Oberflรคchenvorlage, deines Themas, der gewรผnschten Funktionen und deines ersten Hosts. Der einfache Modus blendet aus, was du nicht nutzt, und du kannst die Einrichtung jederzeit erneut starten oder die Vorlage wechseln.
+
+
+
+
+
+
+**Desktop eigenstรคndig und Synchronisierung:**
+Die Desktop-App lรคuft eigenstรคndig mit lokalem Backend und eigener Datenbank, ganz ohne Server. Du kannst sie auch mit einem Termix-Server verbinden, um Hosts, Zugangsdaten, Snippets und mehr in beide Richtungen abzugleichen, und wรคhlen, ob Verbindungen lokal oder รผber den Server aufgebaut werden.
+
+
+
+
+**Kommandozeile:**
+Ein `termix`-CLI fรผr deine Shell und deine Skripte. Terminals รถffnen, einen Befehl auf einem Host oder einer ganzen Flotte ausfรผhren, Dateien per SFTP verschieben und Hosts, Snippets und Zugangsdaten verwalten. Installiere es mit `npm install -g @termix-cli/cli` oder nimm eine eigenstรคndige Binรคrdatei. Siehe die [CLI-Dokumentation](https://docs.termix.site/cli).
+
+
+
+
+
+
+**Sicherheit:**
+Passwรถrter, Schlรผssel und andere Geheimnisse werden pro Benutzer verschlรผsselt, und die Datenbankdateien selbst lassen sich auf der Festplatte verschlรผsseln. Wie das funktioniert, steht in der [Dokumentation](https://docs.termix.site/security).
**Sprachen:**
-Integrierte Unterstutzung fur ca. 30 Sprachen (verwaltet uber [Crowdin](https://docs.termix.site/translations)).
+Rund 30 Sprachen sind eingebaut, verwaltet รผber [Crowdin](https://docs.termix.site/translations).
@@ -199,36 +255,39 @@ Integrierte Unterstutzung fur ca. 30 Sprachen (verwaltet uber [Crowdin](https://
Weitere Funktionen
-- **Dashboard** - Serverinformationen auf einen Blick auf Ihrem Dashboard anzeigen
-- **API-Schlussel** - Erstellen Sie benutzerbezogene API-Schlussel mit Ablaufdaten zur Verwendung fur Automatisierung/CI
-- **Datenexport/-import** - SSH-Hosts, Anmeldeinformationen und Dateimanager-Daten exportieren und importieren
-- **Automatische SSL-Einrichtung** - Integrierte SSL-Zertifikatsgenerierung und -verwaltung mit HTTPS-Weiterleitungen
-- **Moderne Benutzeroberflache** - Saubere desktop-/mobilfreundliche Oberflache, erstellt mit React, Tailwind CSS und Shadcn. Wahlen Sie zwischen vielen verschiedenen UI-Themes einschliesslich Hell, Dunkel, Dracula usw. Verwenden Sie URL-Routen, um jede Verbindung im Vollbildmodus zu offnen.
-- **Befehlsverlauf** - Autovervollstandigung und Anzeige zuvor ausgefuhrter SSH-Befehle
-- **Schnellverbindung** - Verbinden Sie sich mit einem Server, ohne die Verbindungsdaten speichern zu mussen
-- **Befehlspalette** - Doppeltippen Sie die linke Umschalttaste, um schnell auf SSH-Verbindungen mit Ihrer Tastatur zuzugreifen
-- **Proxmox-Integration** - Automatisches Hinzufugen von Hosts zu Termix aus Ihrer Proxmox-Instanz
-- **SSH-Funktionsreich** - Unterstutzt Jump-Hosts, Warpgate, TOTP-basierte Verbindungen, SOCKS5, Host-Key-Verifizierung, automatisches Ausfullen von Passwortern, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, Port Knocking, Terminal-Protokollierung, SSH-Agent-Forwarding, Bitwarden SSH-Agent, HashiCorp Vault SSH-Signierung und mehr.
-- **Termix ID** - Ein sshid.io-Aquivalent, integriert in Termix. Beanspruchen Sie einen Handle, veroffentlichen Sie Ihre offentlichen SSH-Schlussel unter einer Resolver-URL und nutzen Sie eine integrierte CA zur Ausstellung von SSH-Zertifikaten.
+- **Dashboard** - Deine Server auf einen Blick, mit Karten, die du selbst anordnest
+- **Netzwerkgrafik** - Dein Homelab aus deinen Hosts gezeichnet, mit Live-Status
+- **Tmux-Monitor** - tmux-Sitzungen, Fenster und Bereiche durchsehen, mit Vorschau und Suche
+- **API-Schlรผssel** - Benutzerbezogene Schlรผssel mit Ablaufdatum fรผr Skripte und CI
+- **Export und Import** - Hosts, Zugangsdaten und Dateimanager-Daten rein- und rausholen
+- **Automatisches SSL** - Zertifikate werden fรผr dich erstellt und erneuert, samt HTTPS-Weiterleitung, oder du bringst eigene mit
+- **Datenbanken** - Standardmรครig SQLite, dazu PostgreSQL und MySQL
+- **Moderne Oberflรคche** - Aufgerรคumte React-Oberflรคche fรผr Desktop und Handy, mit Themen wie Hell, Dunkel und Dracula. Jede Verbindung lรคsst sich รผber eine URL im Vollbild รถffnen
+- **Befehlspalette** - Zweimal linke Umschalttaste, um per Tastatur zu einem Host zu springen
+- **Tastenkรผrzel** - Zwischen Tabs wechseln, Tabs schlieรen und mehr, alles neu belegbar
+- **Wake-on-LAN** - Einen Rechner aus Termix heraus oder aus einem Automatisierungsschritt aufwecken
+- **Vertrauenswรผrdiger Proxy** - Einen Reverse Proxy die Anmeldung erledigen und den Benutzer durchreichen lassen
+- **Viele SSH-Funktionen** - Sprunghosts, Warpgate, TOTP-Abfragen, SOCKS5, Prรผfung von Hostschlรผsseln, automatisches Ausfรผllen von Passwรถrtern, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, Port Knocking, Terminalprotokolle, Agent-Weiterleitung, Bitwarden SSH-Agent, SSH-Signierung รผber HashiCorp Vault und mehr
+- **Termix ID** - Eine eingebaute Variante von sshid.io. Sichere dir einen Namen, verรถffentliche deine รถffentlichen Schlรผssel unter einer Resolver-URL und stelle SSH-Zertifikate รผber die eingebaute CA aus
-## Plattformunterstutzung
+## Unterstรผtzte Plattformen
Plattform
-Distribution
+Bezugsquelle
Web
-Jeder moderne Browser (Chrome, Safari, Firefox) ยท PWA-Unterstutzung
+Jeder moderne Browser (Chrome, Safari, Firefox) ยท PWA-fรคhig
Windows x64/ia32
-Portabel ยท MSI-Installationsprogramm ยท Chocolatey
+Portabel ยท MSI-Installer ยท Chocolatey
Linux x64/ia32
@@ -252,9 +311,9 @@ Integrierte Unterstutzung fur ca. 30 Sprachen (verwaltet uber [Crowdin](https://
## Installation
-Besuchen Sie die [Termix-Dokumentation](https://docs.termix.site/install) fur vollstandige Installationsanleitungen fur alle Plattformen.
+In der [Termix-Dokumentation](https://docs.termix.site/install) findest du die vollstรคndigen Installationsanleitungen fรผr alle Plattformen.
-Beispiel einer Docker-Compose-Datei (Sie konnen `guacd` und das Netzwerk weglassen, wenn Sie keine Remote-Desktop-Funktionen nutzen mochten):
+Beispiel fรผr eine Docker-Compose-Datei (`guacd` und das Netzwerk kannst du weglassen, wenn du keinen Remotedesktop brauchst):
```yaml
services:
@@ -291,11 +350,37 @@ networks:
driver: bridge
```
+### Kommandozeile
+
+Termix hat auch ein CLI, damit du deine Server vom Terminal aus verwalten und Termix in eigenen Skripten nutzen kannst.
+
+```bash
+npm install -g @termix-cli/cli
+termix login --url https://termix.example.com
+termix ssh 1
+```
+
+Es kann Terminals รถffnen, einen Befehl auf einem Host oder einer ganzen Flotte ausfรผhren, Dateien per SFTP verschieben und Hosts, Snippets und Zugangsdaten verwalten. Die vollstรคndige Dokumentation steht auf [docs.termix.site/cli](https://docs.termix.site/cli).
+
+### Cloud-Hosting
+
+Du kannst den Termix-Server auf einem VPS laufen lassen statt im eigenen Netz. Lรคuft Termix in dem Netz, das es verwaltet, reiรt eine Stรถrung es mit sich, und zwar genau dann, wenn du es zum Reparieren brรคuchtest. Woanders bleibt es erreichbar, du bekommst eine feste IP und kommst von รผberall heran, ohne VPN und ohne Portfreigabe.
+
+[GINERNET](https://docs.termix.site/install/ginernet) sponsert Termix, und in der Dokumentation steht eine Schritt-fรผr-Schritt-Anleitung fรผr die Bereitstellung auf deren VPS-Plattform.
+
+
+
+## Telemetrie
+
+Termix schickt einmal am Tag ein kleines anonymes Signal, damit ich sehen kann, wie viele Instanzen laufen und welche Funktionen genutzt werden. Enthalten sind eine zufรคllige Instanz-ID, wie viele Benutzer und Hosts du hast, die App-Version und welche Funktionen (Terminal, Dateimanager, Tunnel, Docker usw.) in den letzten 24 Stunden benutzt wurden. Niemals enthalten sind Benutzernamen, Hostnamen, IP-Adressen, Zugangsdaten oder irgendetwas anderes, das dich oder deine Server identifiziert.
+
+Es ist standardmรครig an. Schalte es in den Administrationseinstellungen unter Allgemein aus oder setze `ENABLE_TELEMETRY=false`, bevor du Termix รผberhaupt startest.
+
## Spenden
-Termix ist kostenlos und Open Source, ohne Abonnements oder kostenpflichtige Plane. Wenn Sie es nutzlich finden, erwagen Sie eine Spende, um Serverkosten, Domains und Entwicklungszeit zu decken. Spenden helfen auch dabei, die Zeit zu finanzieren, die benotigt wird, um zu erforschen und zu lernen, was fur Funktionen wie SAML-, Kubernetes- und Agent-Unterstutzung erforderlich ist. Verfolgen Sie den Fortschritt und spenden Sie unten.
+Termix ist kostenlos und quelloffen, ohne Abo und ohne Bezahlmodell. Wenn es dir hilft, denk รผber eine Spende nach, um Server, Domains und Entwicklungszeit zu decken. Spenden finanzieren auch die Zeit, um Funktionen wie SAML, Kubernetes und Agent-Unterstรผtzung zu erarbeiten. Unten kannst du den Fortschritt verfolgen und spenden.
[Spenden](https://donate.termix.site/)
@@ -303,7 +388,7 @@ Termix ist kostenlos und Open Source, ohne Abonnements oder kostenpflichtige Pla
## Sponsoren
-Interessiert an einer bezahlten Platzierung zur Unterstutzung der Entwicklung? Schreiben Sie eine E-Mail an [mail@termix.site](mailto:mail@termix.site).
+Interesse an einer bezahlten Platzierung zur Unterstรผtzung der Entwicklung? Schreib an [mail@termix.site](mailto:mail@termix.site).
@@ -325,10 +410,6 @@ Interessiert an einer bezahlten Platzierung zur Unterstutzung der Entwicklung? S
-
-
-
-
@@ -340,14 +421,17 @@ Interessiert an einer bezahlten Platzierung zur Unterstutzung der Entwicklung? S
-
+
+
+
+
## Support
-Wenn Sie Hilfe benotigen oder eine Funktion fur Termix anfragen mochten, besuchen Sie die [Issues](https://github.com/Termix-SSH/Support/issues)-Seite, melden Sie sich an und klicken Sie auf `New Issue`. Bitte beschreiben Sie Ihr Anliegen so detailliert wie moglich, vorzugsweise auf Englisch. Sie konnen auch dem [Discord](https://discord.gg/jVQGdvHDrf)-Server beitreten und den Support-Kanal besuchen, allerdings konnen die Antwortzeiten dort langer sein.
+Brauchst du Hilfe oder mรถchtest du eine Funktion vorschlagen? Erstelle ein [neues Issue](https://github.com/Termix-SSH/Support/issues) und beschreibe es so genau wie mรถglich, nach Mรถglichkeit auf Englisch. Du kannst auch im Support-Kanal auf [Discord](https://discord.gg/jVQGdvHDrf) fragen, dort dauern Antworten aber manchmal lรคnger.
@@ -359,7 +443,7 @@ Wenn Sie Hilfe benotigen oder eine Funktion fur Termix anfragen mochten, besuche
[](https://www.youtube.com/@TermixSSH/videos)
-Update-Ubersichten auf YouTube ansehen
+รbersichten zu Updates auf YouTube ansehen
@@ -399,7 +483,7 @@ Wenn Sie Hilfe benotigen oder eine Funktion fur Termix anfragen mochten, besuche
-Einige Videos und Bilder konnen veraltet sein oder Funktionen moglicherweise nicht perfekt darstellen.
+Manche Videos und Bilder sind vielleicht veraltet oder zeigen die Funktionen nicht perfekt.
@@ -407,10 +491,10 @@ Wenn Sie Hilfe benotigen oder eine Funktion fur Termix anfragen mochten, besuche
## Geplante Funktionen
-Siehe [Projekte](https://github.com/orgs/Termix-SSH/projects/5) fur alle geplanten Funktionen. Wenn Sie beitragen mochten, siehe [Mitwirken](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md).
+Alle geplanten Funktionen stehen unter [Projects](https://github.com/orgs/Termix-SSH/projects/5). Wenn du mitarbeiten mรถchtest, sieh dir [Contributing](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md) an.
## Lizenz
-Verteilt unter der Apache License Version 2.0. Siehe `LICENSE` fur weitere Informationen.
+Verรถffentlicht unter der Apache-Lizenz Version 2.0. Mehr dazu in `LICENSE`.
diff --git a/docs/readme/README-ES.md b/docs/readme/README-ES.md
index b268940..a090af6 100644
--- a/docs/readme/README-ES.md
+++ b/docs/readme/README-ES.md
@@ -4,7 +4,7 @@
Termix
-Gestiรณn SSH autoalojada y acceso a escritorio remoto
+Gestiรณn de servidores autoalojada, desde SSH y escritorio remoto hasta automatizaciones
English ยท
@@ -37,7 +37,7 @@
-Termix es gratuito y de cรณdigo abierto. Si lo encuentras รบtil, considera [donar](https://donate.termix.site/) para ayudar a cubrir los costos del servidor y el tiempo de desarrollo.
+Termix es gratuito y de cรณdigo abierto. Si te resulta รบtil, considera [donar](https://donate.termix.site/) para ayudar a cubrir los costes de servidor y el tiempo de desarrollo.
@@ -49,145 +49,201 @@ Termix es gratuito y de cรณdigo abierto. Si lo encuentras รบtil, considera [dona
- Logrado el 1 de septiembre de 2025
+ Conseguido el 1 de septiembre de 2025
-## Descripcion General
+## Descripciรณn general
-Termix es una plataforma de gestion de servidores todo en uno, de codigo abierto, siempre gratuita y autoalojada. Proporciona una solucion multiplataforma para gestionar sus servidores e infraestructura a traves de una interfaz unica e intuitiva. Termix ofrece acceso a terminal SSH, control de escritorio remoto (RDP, VNC, Telnet), capacidades de tuneles SSH, gestion remota de archivos y muchas otras herramientas. Termix es la alternativa perfecta, gratuita y autoalojada a Termius, disponible para todas las plataformas.
+Termix es una plataforma gratuita, de cรณdigo abierto y autoalojada para gestionar tus servidores. Reรบne en un solo sitio terminales SSH, escritorios remotos (RDP, VNC, Telnet), transferencias de archivos, tรบneles, Docker, mรฉtricas y automatizaciones, en web, escritorio y mรณvil. Es una alternativa autoalojada a Termius que seguirรก siendo gratuita.
-## Caracteristicas
+## Caracterรญsticas
-**Acceso a Terminal SSH:**
-Terminal completo con soporte de pantalla dividida (hasta 4 paneles) con un sistema de pestanas similar al navegador. Incluye soporte para personalizar el terminal incluyendo temas comunes de terminal, fuentes y otros componentes.
+**Terminal SSH:**
+Un terminal completo con pestaรฑas como las del navegador y pantalla dividida, hasta 6 paneles a la vez. Elige tu tema, tu fuente y tus colores. Sobre cada sesiรณn hay una barra con CPU, memoria y disco en vivo, ademรกs de accesos rรกpidos a los archivos, Docker, tรบneles y mรฉtricas de ese host.
-**Acceso a Escritorio Remoto:**
-Soporte RDP, VNC y Telnet a traves del navegador con personalizacion completa y pantalla dividida.
+**Escritorio remoto:**
+RDP, VNC y Telnet en el navegador, en pestaรฑas y pantalla dividida como cualquier otra sesiรณn. Incluye un explorador de archivos para las unidades RDP y subida arrastrando y soltando. En el escritorio de Windows tambiรฉn puedes abrir un host en el cliente RDP nativo.
-**Gestion de Tuneles SSH:**
-Cree y gestione tuneles SSH de servidor a servidor con reconexion automatica, monitoreo de estado y reenvio local, remoto o dinamico SOCKS. La configuracion de tuneles de cliente de escritorio a servidor se almacena localmente por instalacion de escritorio, los snapshots de presets C2S opcionales pueden guardarse en el servidor, renombrarse, cargarse o eliminarse cuando desee mover una configuracion de tunel local entre clientes.
+**Tรบneles SSH:**
+Reenvรญo local, remoto y SOCKS dinรกmico, con reconexiรณn automรกtica y comprobaciones de estado. Los tรบneles de cliente a servidor de la aplicaciรณn de escritorio se guardan en ese equipo, y puedes guardar ajustes en el servidor para llevarte una configuraciรณn a otro equipo.
-**Gestor Remoto de Archivos:**
-Gestione archivos directamente en servidores remotos con soporte para visualizar y editar codigo, imagenes, audio y video. Suba, descargue, renombre, elimine y mueva archivos sin problemas con soporte sudo. Incluye soporte para mover archivos de servidor a servidor.
+**Gestor de archivos:**
+Navega, edita, sube, descarga, renombra, mueve y borra archivos por SFTP, con soporte para sudo. Mira y edita cรณdigo, imรกgenes, audio y vรญdeo. Copia archivos directamente de un servidor a otro, con la ruta mรกs rรกpida elegida por ti y las transferencias verificadas.
-**Gestion de Docker y Podman:**
-Inicie, detenga, pause, elimine contenedores. Vea estadisticas de contenedores. Controle contenedores usando el terminal docker exec. Compatible con Docker y Podman como entorno de ejecucion de contenedores. No fue creado para reemplazar Portainer o Dockge, sino para simplemente gestionar sus contenedores en lugar de crearlos.
+**Docker y Podman:**
+Arranca, para, pausa y elimina contenedores, mira sus estadรญsticas y abre una consola dentro de uno. Funciona con Docker y con Podman. No pretende sustituir a Portainer ni a Dockge, solo gestionar los contenedores que ya tienes.
-**Gestor de Hosts SSH:**
-Guarde, organice y gestione sus conexiones SSH con etiquetas y carpetas (con personalizacion de carpetas y soporte de carpetas anidadas), y guarde facilmente informacion de inicio de sesion reutilizable con la capacidad de automatizar el despliegue de claves SSH.
+**Gestor de hosts:**
+Guarda y organiza hosts con etiquetas y carpetas anidadas que puedes nombrar y colorear. Reutiliza credenciales guardadas entre hosts, despliega claves SSH automรกticamente, agrupa hosts bajo un host padre, edita y exporta en lote, y usa la conexiรณn rรกpida para conexiones puntuales que no quieres guardar.
-**Metricas del Host:**
-Vea el uso de CPU, memoria y disco, red, tiempo de actividad, informacion del sistema, firewall, monitor de puertos, visor de registros, usuarios/permisos, certificados y muchos mas, que funcionan en la mayoria de los servidores basados en Linux. Incluye graficos de historial de series temporales y alertas basadas en umbrales con soporte para ntfy y webhooks.
+**Mรฉtricas de host:**
+CPU, memoria, disco, red, temperatura, tiempo encendido, procesos, puertos, inicios de sesiรณn e informaciรณn del sistema en la mayorรญa de servidores Linux, con grรกficas de histรณrico. Las tarjetas de gestiรณn te dejan manejar servicios, tareas cron, paquetes, usuarios, reglas del cortafuegos, WireGuard, Tailscale, certificados SSL, registros y comprobaciones de estado sin salir de Termix.
-**Autenticacion de Usuarios:**
-Gestion segura de usuarios con controles de administrador (puede editar la informacion de otros usuarios) y soporte para OIDC/LDAP/SSO (con control de acceso), 2FA (TOTP) y soporte para passkeys (WebAuthn). Vea sesiones activas de usuarios en todas las plataformas y revoque permisos. Vincule sus cuentas OIDC/Locales entre si. Vea el registro de auditoria de las acciones de todos los usuarios.
+**Automatizaciones:**
+Elige un disparador y luego di quรฉ debe pasar. Los disparadores incluyen una mรฉtrica que supera un umbral, un host que se cae o vuelve, una comprobaciรณn de estado que cambia, una programaciรณn, un evento de contenedor o un webhook entrante. Los pasos pueden ejecutar comandos y fragmentos, controlar contenedores y tรบneles, despertar un host, llamar a una URL, esperar, ramificarse segรบn una condiciรณn, ejecutar otra automatizaciรณn y avisarte por ntfy, Discord o un webhook. Las ejecuciones de prueba te dejan probarlo sin riesgo.
-**Integracion con Tailscale:**
-Liste dispositivos de su red Tailscale para agregarlos rapidamente como hosts y conectese usando Tailscale SSH como metodo de autenticacion, permitiendo que las ACL de Tailscale gestionen la autorizacion sin almacenar credenciales.
+**Flotas:**
+Agrupa hosts en una flota eligiรฉndolos o con reglas de etiquetas, para que los nuevos entren solos. Ejecuta un comando en todos los hosts a la vez, envรญa y recoge archivos de todos ellos, instala paquetes y reรบne un inventario del sistema, el kernel, la arquitectura y el tiempo encendido.
-**RBAC/Compartir:**
-Cree roles y comparta hosts entre usuarios/roles. Compatible con todos los tipos de autenticacion y todos los protocolos de host.
+**Asistente de IA:**
+Es opcional y estรก apagado hasta que tรบ lo enciendas. Conecta OpenAI, Anthropic, Gemini, Ollama o cualquier punto de acceso compatible con OpenAI y pregรบntale sobre tu instalaciรณn. Puede leer hosts, flotas, fragmentos y alertas, y propone cambios para que los apruebes en lugar de hacerlos รฉl. Nunca puede tocar credenciales, usuarios ni ajustes. Los administradores pueden dejarlo apagado para toda la instancia, y tรบ puedes ocultarlo durante la configuraciรณn.
-**Conexiones Serie:**
-Conectese a dispositivos serie (routers, switches, microcontroladores, etc.) directamente desde el navegador o la aplicacion de escritorio. Configure la tasa de baudios, bits de datos, bits de parada y paridad. Utiliza la Web Serial API en navegadores compatibles o un backend nativo en la aplicacion Electron.
+**Acceso y usuarios:**
+Cuentas locales mรกs inicio de sesiรณn con OIDC, LDAP, GitHub y Google, con doble factor (TOTP), llaves de acceso (WebAuthn) y dispositivos de confianza. Los administradores pueden gestionar usuarios, asignar grupos de OIDC a roles, ver todas las sesiones activas en cualquier plataforma y revocarlas. Enlaza tu cuenta local con la de OIDC y consulta el registro de auditorรญa de lo que ha hecho cada uno.
+**Roles y comparticiรณn:**
+Crea roles y comparte hosts con usuarios o roles en cuatro niveles: conectar, ver, editar y gestionar. Funciona con todos los tipos de autenticaciรณn y todos los protocolos, y puedes cambiar las credenciales que se usan en un host compartido.
+
+
+
+
+
+
**Alertas:**
-Configure reglas de alerta basadas en umbrales para metricas del host (CPU, memoria, disco, etc.) y reciba notificaciones a traves de ntfy o webhooks cuando se activen. Vea las alertas activas y resueltas en un historial de registros.
+Pon reglas sobre mรฉtricas de host como CPU, memoria y disco, y recibe avisos por ntfy, Discord o un webhook cuando salten. Consulta las alertas activas y resueltas en un histรณrico y descarta las que no te importan.
+
+
+
+
+**Pรกgina de inicio:**
+Una rejilla de widgets que montas tรบ mismo arrastrando y soltando. Hay widgets para el estado de los hosts, pings, enlaces a servicios, marcadores, bรบsqueda, relojes, calendarios, cuentas atrรกs, notas, RSS, tiempo, imรกgenes, iframes, Docker, tรบneles, grรกficas de mรฉtricas, APIs propias e incluso un terminal en vivo.
-**Pagina de Inicio:**
-Una pagina de inicio completamente personalizable con una cuadricula de widgets de arrastrar y soltar. Agregue widgets para estado del host, enlaces de servicios, relojes, notas, feeds RSS, clima, contenedores Docker, graficos de metricas del host, terminales integrados, iframes y mas.
+**Fragmentos y herramientas:**
+Guarda los comandos que usas a menudo y lรกnzalos con un clic, con variables para el host y para lo que tรบ escribas. Ejecuta un mismo comando en todos los terminales abiertos y busca en tu historial con autocompletado.
-**Cifrado de Base de Datos:**
-Backend almacenado como archivos de base de datos SQLite cifrados. Consulte la [documentacion](https://docs.termix.site/security) para mas informacion.
+**Compartir sesiรณn:**
+Comparte en directo una sesiรณn de terminal, RDP, VNC o Telnet. Manda un enlace al que cualquiera puede entrar sin cuenta, o compรกrtela con un usuario concreto de Termix, en solo lectura o con escritura. Las comparticiones pueden caducar solas o revocarse, y se pueden desactivar globalmente o por host.
-**Grafico de Red:**
-Personalice su Dashboard para visualizar su homelab basado en sus conexiones SSH con soporte de estado.
+**Grabaciรณn y registros de sesiรณn:**
+Graba sesiones de terminal, RDP y VNC y reprodรบcelas despuรฉs. Descarga registros de texto de una sesiรณn y mira el registro de conexiรณn para ver exactamente quรฉ pasรณ durante ella.
-**Herramientas SSH:**
-Cree fragmentos de comandos reutilizables que se ejecutan con un solo clic. Ejecute un comando simultaneamente en multiples terminales abiertos.
+**Conexiones serie:**
+Habla con dispositivos serie como routers, switches y microcontroladores desde el navegador o la aplicaciรณn de escritorio. Ajusta velocidad, bits de datos, bits de parada y paridad. Usa la API Web Serial en los navegadores compatibles, o un backend nativo en la aplicaciรณn de escritorio.
-**Pestanas Persistentes:**
-Las sesiones SSH y pestanas permanecen abiertas entre dispositivos/actualizaciones si esta habilitado en el perfil de usuario.
+**Tailscale:**
+Trae dispositivos de tu tailnet para aรฑadirlos como hosts en un par de clics, y conรฉctate con Tailscale SSH para que las ACL de tu tailnet controlen el acceso sin guardar credenciales. Tambiรฉn funcionan Headscale y los puntos de acceso personalizados.
+
+
+
+
+**Proxmox:**
+Importa hosts directamente desde una instancia de Proxmox y observa las estadรญsticas de nodos e invitados, incluidas CPU, memoria y almacenamiento, en su propia pestaรฑa.
+
+
+
+
+
+
+**Espacios de trabajo y pestaรฑas:**
+Guarda un conjunto de pestaรฑas con su distribuciรณn dividida y reรกbrelo entero con un clic. Termix tambiรฉn recuerda tu รบltima sesiรณn, asรญ que tus pestaรฑas vuelven tras recargar y en otros dispositivos.
+
+
+
+
+**Configuraciรณn guiada:**
+Una configuraciรณn corta te lleva por elegir un preajuste de interfaz, tu tema, las funciones que quieres y tu primer host. El modo sencillo esconde lo que no usas, y puedes repetir la configuraciรณn o cambiar de preajuste cuando quieras.
+
+
+
+
+
+
+**Escritorio independiente y sincronizaciรณn:**
+La aplicaciรณn de escritorio funciona sola, con su backend y su base de datos locales, sin necesidad de servidor. Tambiรฉn puedes conectarla a un servidor Termix para sincronizar en ambos sentidos hosts, credenciales, fragmentos y mรกs, y decidir si las conexiones salen de tu equipo o pasan por el servidor.
+
+
+
+
+**Lรญnea de comandos:**
+Un CLI `termix` para tu shell y tus scripts. Abre terminales, ejecuta un comando en un host o en una flota entera, mueve archivos por SFTP y gestiona hosts, fragmentos y credenciales. Instรกlalo con `npm install -g @termix-cli/cli` o coge un binario independiente. Consulta la [documentaciรณn del CLI](https://docs.termix.site/cli).
+
+
+
+
+
+
+**Seguridad:**
+Las contraseรฑas, las claves y otros secretos se cifran por usuario, y los propios archivos de la base de datos se pueden cifrar en disco. Mira la [documentaciรณn](https://docs.termix.site/security) para saber cรณmo funciona.
**Idiomas:**
-Soporte integrado para aproximadamente 30 idiomas (gestionado por [Crowdin](https://docs.termix.site/translations)).
+Unos 30 idiomas incluidos, gestionados a travรฉs de [Crowdin](https://docs.termix.site/translations).
@@ -196,35 +252,38 @@ Soporte integrado para aproximadamente 30 idiomas (gestionado por [Crowdin](http
-Mas caracteristicas
+Mรกs caracterรญsticas
-- **Dashboard** - Vea la informacion del servidor de un vistazo en su dashboard
-- **Claves API** - Cree claves API con ambito de usuario y fechas de vencimiento para usar en automatizacion/CI
-- **Exportacion/Importacion de Datos** - Exporte e importe hosts SSH, credenciales y datos del gestor de archivos
-- **Configuracion Automatica de SSL** - Generacion y gestion integrada de certificados SSL con redirecciones HTTPS
-- **Interfaz Moderna** - Interfaz limpia compatible con escritorio/movil construida con React, Tailwind CSS y Shadcn. Elija entre muchos temas de UI diferentes, incluyendo claro, oscuro, Dracula, etc. Use rutas URL para abrir cualquier conexion en pantalla completa.
-- **Historial de Comandos** - Autocompletado y visualizacion de comandos SSH ejecutados anteriormente
-- **Conexion Rapida** - Conectese a un servidor sin necesidad de guardar los datos de conexion
-- **Paleta de Comandos** - Pulse dos veces la tecla Shift izquierda para acceder rapidamente a las conexiones SSH con su teclado
-- **Integracion con Proxmox** - Agregue automaticamente hosts a Termix desde su instancia de Proxmox
-- **SSH Rico en Funciones** - Soporta jump hosts, Warpgate, conexiones basadas en TOTP, SOCKS5, verificacion de clave de host, autocompletado de contrasenas, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, port knocking, registro de terminal, reenvio de agente SSH, agente SSH de Bitwarden, firma SSH con HashiCorp Vault y mas.
-- **Termix ID** - Un equivalente a sshid.io integrado en Termix. Reclame un identificador, publique sus claves publicas SSH en una URL de resolucion y use una CA integrada para emitir certificados SSH.
+- **Panel** - Tus servidores de un vistazo, con tarjetas que colocas tรบ
+- **Grรกfico de red** - Tu homelab dibujado a partir de tus hosts, con estado en vivo
+- **Monitor de tmux** - Revisa sesiones, ventanas y paneles de tmux, con vista previa y bรบsqueda
+- **Claves de API** - Claves por usuario con fecha de caducidad para scripts y CI
+- **Exportar e importar** - Mueve hosts, credenciales y datos del gestor de archivos
+- **SSL automรกtico** - Certificados generados y renovados por ti, con redirecciรณn a HTTPS, o usa los tuyos
+- **Bases de datos** - SQLite por defecto, y tambiรฉn PostgreSQL y MySQL
+- **Interfaz moderna** - Una interfaz React limpia que funciona en escritorio y mรณvil, con temas como claro, oscuro y Dracula. Cualquier conexiรณn se puede abrir a pantalla completa desde una URL
+- **Paleta de comandos** - Pulsa dos veces Mayรบs izquierda para ir a un host desde el teclado
+- **Atajos de teclado** - Moverte entre pestaรฑas, cerrarlas y mรกs, todo reasignable
+- **Wake-on-LAN** - Enciende una mรกquina desde Termix o desde un paso de automatizaciรณn
+- **Proxy de confianza** - Deja que un proxy inverso gestione el acceso y pase al usuario
+- **SSH muy completo** - Hosts de salto, Warpgate, peticiones TOTP, SOCKS5, verificaciรณn de claves de host, autorrelleno de contraseรฑas, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, port knocking, registro del terminal, reenvรญo de agente, agente SSH de Bitwarden, firma SSH con HashiCorp Vault y mรกs
+- **Termix ID** - Una versiรณn integrada de sshid.io. Reserva un identificador, publica tus claves pรบblicas en una URL de resoluciรณn y emite certificados SSH desde la CA integrada
-## Soporte de Plataformas
+## Plataformas compatibles
Plataforma
-Distribucion
+Distribuciรณn
Web
-Cualquier navegador moderno (Chrome, Safari, Firefox) ยท Soporte PWA
+Cualquier navegador moderno (Chrome, Safari, Firefox) ยท Compatible con PWA
Windows x64/ia32
@@ -250,11 +309,11 @@ Soporte integrado para aproximadamente 30 idiomas (gestionado por [Crowdin](http
-## Instalacion
+## Instalaciรณn
-Visite la [documentacion de Termix](https://docs.termix.site/install) para obtener instrucciones completas de instalacion en todas las plataformas.
+Visita la [documentaciรณn de Termix](https://docs.termix.site/install) para ver las instrucciones completas de instalaciรณn en todas las plataformas.
-Archivo de ejemplo de Docker Compose (puede omitir `guacd` y la red si no planea usar las funciones de escritorio remoto):
+Ejemplo de archivo Docker Compose (puedes quitar `guacd` y la red si no piensas usar el escritorio remoto):
```yaml
services:
@@ -291,11 +350,37 @@ networks:
driver: bridge
```
+### Lรญnea de comandos
+
+Termix tambiรฉn tiene un CLI, para que gestiones tus servidores desde un terminal y uses Termix en tus propios scripts.
+
+```bash
+npm install -g @termix-cli/cli
+termix login --url https://termix.example.com
+termix ssh 1
+```
+
+Puede abrir terminales, ejecutar un comando en un host o en una flota entera, mover archivos por SFTP y gestionar hosts, fragmentos y credenciales. La documentaciรณn completa estรก en [docs.termix.site/cli](https://docs.termix.site/cli).
+
+### Alojamiento en la nube
+
+Puedes ejecutar el servidor de Termix en un VPS en lugar de dentro de tu propia red. Si Termix corre en la red que gestiona, una caรญda se lo lleva por delante justo cuando lo necesitas para arreglar las cosas. Fuera se mantiene accesible, te da una IP fija y puedes entrar desde cualquier sitio sin VPN ni abrir puertos.
+
+[GINERNET](https://docs.termix.site/install/ginernet) patrocina Termix, y la documentaciรณn tiene una guรญa paso a paso para desplegar en su plataforma de VPS.
+
+
+
+## Telemetrรญa
+
+Termix envรญa una vez al dรญa un pequeรฑo aviso anรณnimo para que pueda ver cuรกntas instancias hay funcionando y quรฉ funciones se usan. Contiene un identificador de instancia aleatorio, cuรกntos usuarios y hosts tienes, la versiรณn de la aplicaciรณn y quรฉ funciones (terminal, gestor de archivos, tรบneles, docker, etc.) se han usado en las รบltimas 24 horas. Nunca contiene nombres de usuario, nombres de host, direcciones IP, credenciales ni nada que te identifique a ti o a tus servidores.
+
+Viene activado. Puedes desactivarlo en los ajustes de administraciรณn, en General, o poner `ENABLE_TELEMETRY=false` antes incluso de arrancar Termix.
+
## Donar
-Termix es gratuito y de codigo abierto, sin suscripciones ni planes de pago. Si lo encuentra util, considere donar para ayudar a cubrir los costos del servidor, los dominios y el tiempo de desarrollo. Las donaciones tambien ayudan a financiar el tiempo necesario para investigar y aprender lo que se necesita para construir funciones como soporte para SAML, Kubernetes y Agent. Siga el progreso y done a continuacion.
+Termix es gratuito y de cรณdigo abierto, sin suscripciones ni planes de pago. Si te resulta รบtil, considera donar para ayudar con los servidores, los dominios y el tiempo de desarrollo. Las donaciones tambiรฉn financian el tiempo de investigar y aprender lo necesario para funciones como SAML, Kubernetes y el soporte de agentes. Sigue el progreso y dona abajo.
[Donar](https://donate.termix.site/)
@@ -303,7 +388,7 @@ Termix es gratuito y de codigo abierto, sin suscripciones ni planes de pago. Si
## Patrocinadores
-Interesado en un espacio patrocinado de pago para apoyar el desarrollo? Escriba a [mail@termix.site](mailto:mail@termix.site).
+ยฟTe interesa un espacio de pago para apoyar el desarrollo? Escribe a [mail@termix.site](mailto:mail@termix.site).
@@ -325,10 +410,6 @@ Interesado en un espacio patrocinado de pago para apoyar el desarrollo? Escriba
-
-
-
-
@@ -340,18 +421,21 @@ Interesado en un espacio patrocinado de pago para apoyar el desarrollo? Escriba
-
+
+
+
+
## Soporte
-Si necesita ayuda o desea solicitar una funcion para Termix, visite la pagina de [Issues](https://github.com/Termix-SSH/Support/issues), inicie sesion y pulse `New Issue`. Por favor, sea lo mas detallado posible en su reporte, preferiblemente escrito en ingles. Tambien puede unirse al servidor de [Discord](https://discord.gg/jVQGdvHDrf) y visitar el canal de soporte, sin embargo, los tiempos de respuesta pueden ser mas largos.
+ยฟNecesitas ayuda o quieres pedir una funciรณn? Abre una [nueva incidencia](https://github.com/Termix-SSH/Support/issues) y aรฑade todo el detalle que puedas, en inglรฉs si te es posible. Tambiรฉn puedes preguntar en el canal de soporte de [Discord](https://discord.gg/jVQGdvHDrf), aunque allรญ las respuestas pueden tardar mรกs.
-## Capturas de Pantalla
+## Capturas de pantalla
@@ -359,7 +443,7 @@ Si necesita ayuda o desea solicitar una funcion para Termix, visite la pagina de
[](https://www.youtube.com/@TermixSSH/videos)
-Ver resรบmenes de actualizaciones en YouTube
+Mira los resรบmenes de las actualizaciones en YouTube
@@ -399,18 +483,18 @@ Si necesita ayuda o desea solicitar una funcion para Termix, visite la pagina de
-Algunos videos e imagenes pueden estar desactualizados o no mostrar perfectamente las caracteristicas.
+Algunos vรญdeos e imรกgenes pueden estar desactualizados o no mostrar del todo bien las funciones.
-## Caracteristicas Planeadas
+## Caracterรญsticas planeadas
-Consulte [Proyectos](https://github.com/orgs/Termix-SSH/projects/5) para todas las caracteristicas planeadas. Si desea contribuir, consulte [Contribuir](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md).
+Todas las funciones planeadas estรกn en [Projects](https://github.com/orgs/Termix-SSH/projects/5). Si quieres colaborar, consulta [Contributing](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md).
## Licencia
-Distribuido bajo la Licencia Apache Version 2.0. Consulte `LICENSE` para mas informacion.
+Distribuido bajo la Licencia Apache versiรณn 2.0. Consulta `LICENSE` para mรกs informaciรณn.
diff --git a/docs/readme/README-FR.md b/docs/readme/README-FR.md
index 0813165..571cb62 100644
--- a/docs/readme/README-FR.md
+++ b/docs/readme/README-FR.md
@@ -4,7 +4,7 @@
Termix
-Gestion SSH auto-hebergee et acces bureau a distance
+Gestion de serveurs auto-hรฉbergรฉe, du SSH au bureau ร distance jusqu'aux automatisations
English ยท
@@ -37,7 +37,7 @@
-Termix est gratuit et open source. Si vous le trouvez utile, pensez ร [faire un don](https://donate.termix.site/) pour aider ร couvrir les coรปts de serveur et le temps de dรฉveloppement.
+Termix est gratuit et open source. S'il vous est utile, pensez ร [faire un don](https://donate.termix.site/) pour aider ร payer les serveurs et le temps de dรฉveloppement.
@@ -56,138 +56,194 @@ Termix est gratuit et open source. Si vous le trouvez utile, pensez ร [faire un
-## Presentation
+## Prรฉsentation
-Termix est une plateforme de gestion de serveurs tout-en-un, open source, a jamais gratuite et auto-hebergee. Elle fournit une solution multiplateforme pour gerer vos serveurs et votre infrastructure a travers une interface unique et intuitive. Termix offre un acces terminal SSH, le controle de bureau a distance (RDP, VNC, Telnet), des capacites de tunneling SSH, la gestion de fichiers SSH a distance et de nombreux autres outils. Termix est l'alternative parfaite, gratuite et auto-hebergee a Termius, disponible sur toutes les plateformes.
+Termix est une plateforme gratuite, open source et auto-hรฉbergรฉe pour gรฉrer vos serveurs. Elle rรฉunit au mรชme endroit les terminaux SSH, les bureaux ร distance (RDP, VNC, Telnet), les transferts de fichiers, les tunnels, Docker, les mรฉtriques et les automatisations, sur le web, le bureau et le mobile. C'est une alternative auto-hรฉbergรฉe ร Termius, gratuite pour toujours.
-## Fonctionnalites
+## Fonctionnalitรฉs
-**Acces terminal SSH:**
-Terminal complet avec support d'ecran partage (jusqu'a 4 panneaux) et un systeme d'onglets inspire des navigateurs. Inclut la personnalisation du terminal avec des themes courants, des polices et d'autres composants.
+**Terminal SSH:**
+Un vrai terminal avec des onglets faรงon navigateur et un รฉcran divisรฉ, jusqu'ร 6 panneaux ร la fois. Choisissez votre thรจme, votre police et vos couleurs. Une barre d'outils au-dessus de chaque session affiche le CPU, la mรฉmoire et le disque en direct, avec des raccourcis vers les fichiers, Docker, les tunnels et les mรฉtriques de cet hรดte.
-**Acces Bureau a Distance:**
-Support RDP, VNC et Telnet via navigateur avec personnalisation complete et ecran partage.
+**Bureau ร distance:**
+RDP, VNC et Telnet dans le navigateur, en onglets et en รฉcran divisรฉ comme n'importe quelle autre session. Comprend un explorateur de fichiers pour les lecteurs RDP et l'envoi par glisser-dรฉposer. Sur le bureau Windows, vous pouvez aussi ouvrir un hรดte dans le client RDP natif.
-**Gestion des tunnels SSH:**
-Creez et gerez des tunnels SSH de serveur a serveur avec reconnexion automatique, surveillance de l'etat et transfert local, distant ou SOCKS dynamique. Les parametres de tunnel client-bureau-vers-serveur sont stockes localement par installation bureau ; des instantanes de prereglages C2S optionnels peuvent etre sauvegardes sur le serveur, renommes, charges ou supprimes pour deplacer une configuration de tunnel locale entre clients.
+**Tunnels SSH:**
+Redirection locale, distante et SOCKS dynamique, avec reconnexion automatique et vรฉrification de l'รฉtat. Les tunnels client vers serveur de l'application de bureau restent sur cette machine, et vous pouvez enregistrer des prรฉrรฉglages sur le serveur pour reprendre une configuration sur un autre poste.
-**Gestionnaire de fichiers distant:**
-Gerez les fichiers directement sur les serveurs distants avec support de la visualisation et de l'edition de code, images, audio et video. Televersez, telechargez, renommez, supprimez et deplacez des fichiers de maniere fluide avec support sudo. Inclut la prise en charge du deplacement de fichiers de serveur a serveur.
+**Gestionnaire de fichiers:**
+Parcourez, modifiez, envoyez, tรฉlรฉchargez, renommez, dรฉplacez et supprimez des fichiers en SFTP, avec sudo. Affichez et modifiez du code, des images, de l'audio et de la vidรฉo. Copiez des fichiers directement d'un serveur ร l'autre : le chemin le plus rapide est choisi pour vous et l'intรฉgritรฉ des transferts est vรฉrifiรฉe.
-**Gestion Docker et Podman:**
-Demarrez, arretez, mettez en pause, supprimez des conteneurs. Consultez les statistiques des conteneurs. Controlez les conteneurs via le terminal docker exec. Compatible avec Docker et Podman comme environnement d'execution de conteneurs. Non concu pour remplacer Portainer ou Dockge, mais plutot pour gerer simplement vos conteneurs plutot que de les creer.
+**Docker et Podman:**
+Dรฉmarrez, arrรชtez, mettez en pause et supprimez des conteneurs, suivez leurs statistiques et ouvrez un shell ร l'intรฉrieur. Fonctionne avec Docker comme avec Podman. Le but n'est pas de remplacer Portainer ou Dockge, juste de gรฉrer les conteneurs que vous avez dรฉjร .
-**Gestionnaire d'hotes SSH:**
-Enregistrez, organisez et gerez vos connexions SSH avec des tags et des dossiers (personnalisation des dossiers et prise en charge des dossiers imbriques), et sauvegardez facilement les informations de connexion reutilisables tout en automatisant le deploiement des cles SSH.
+**Gestionnaire d'hรดtes:**
+Rangez vos hรดtes avec des รฉtiquettes et des dossiers imbriquรฉs que vous pouvez nommer et colorer. Rรฉutilisez des identifiants enregistrรฉs sur plusieurs hรดtes, dรฉployez des clรฉs SSH automatiquement, regroupez des hรดtes sous un hรดte parent, modifiez et exportez en lot, et utilisez la connexion rapide pour les connexions ponctuelles que vous ne voulez pas garder.
-**Metriques d'hote:**
-Visualisez l'utilisation du CPU, de la memoire, du disque, le reseau, le temps de fonctionnement, les informations systeme, le pare-feu, le moniteur de ports, le visualiseur de journaux, les utilisateurs/permissions, les certificats et bien plus encore sur la plupart des serveurs Linux. Inclut des graphiques d'historique en serie temporelle et des alertes basees sur des seuils avec support ntfy et webhook.
+**Mรฉtriques des hรดtes:**
+CPU, mรฉmoire, disque, rรฉseau, tempรฉrature, temps de fonctionnement, processus, ports, connexions et informations systรจme sur la plupart des serveurs Linux, avec des graphiques d'historique. Les cartes de gestion vous permettent de gรฉrer les services, les tรขches cron, les paquets, les utilisateurs, les rรจgles de pare-feu, WireGuard, Tailscale, les certificats SSL, les journaux et les vรฉrifications d'รฉtat sans quitter Termix.
-**Authentification des utilisateurs:**
-Gestion securisee des utilisateurs avec controles administrateur (peut modifier les informations des autres utilisateurs) et support OIDC/LDAP/SSO (avec controle d'acces), 2FA (TOTP), et support des passkeys (WebAuthn). Visualisez les sessions utilisateur actives sur toutes les plateformes et revoquez les permissions. Liez vos comptes OIDC/locaux ensemble. Consultez le journal d'audit des actions de tous les utilisateurs.
+**Automatisations:**
+Choisissez un dรฉclencheur, puis dites ce qui doit se passer. Les dรฉclencheurs peuvent รชtre une mรฉtrique qui dรฉpasse un seuil, un hรดte qui tombe ou revient, une vรฉrification d'รฉtat qui change, un horaire, un รฉvรฉnement de conteneur ou un webhook entrant. Les รฉtapes peuvent lancer des commandes et des extraits, piloter des conteneurs et des tunnels, rรฉveiller un hรดte, appeler une URL, attendre, se diviser selon une condition, lancer une autre automatisation et vous prรฉvenir via ntfy, Discord ou un webhook. Les essais ร blanc vous permettent de tester sans risque.
-**Integration Tailscale:**
-Listez les appareils de votre reseau Tailscale pour les ajouter rapidement comme hotes, et connectez-vous en utilisant Tailscale SSH comme methode d'authentification, laissant les ACL de votre reseau gerer l'autorisation sans stocker de credentials.
+**Flottes:**
+Regroupez des hรดtes dans une flotte en les choisissant ou avec des rรจgles d'รฉtiquettes, pour que les nouveaux hรดtes s'ajoutent tout seuls. Lancez une commande sur tous les hรดtes d'un coup, envoyez et rรฉcupรฉrez des fichiers sur l'ensemble, installez des paquets et collectez un inventaire de l'OS, du noyau, de l'architecture et du temps de fonctionnement.
-**RBAC/Partage:**
-Creez des roles et partagez des hotes entre utilisateurs/roles. Prend en charge tous les types d'authentification et tous les protocoles d'hote.
+**Assistant IA:**
+Optionnel, et dรฉsactivรฉ tant que vous ne l'activez pas. Connectez OpenAI, Anthropic, Gemini, Ollama ou n'importe quel point d'accรจs compatible OpenAI et posez des questions sur votre installation. Il lit les hรดtes, les flottes, les extraits et les alertes, et propose des changements que vous validez au lieu de les appliquer lui-mรชme. Il ne peut jamais toucher aux identifiants, aux utilisateurs ni aux rรฉglages. Les administrateurs peuvent le laisser dรฉsactivรฉ pour toute l'instance, et vous pouvez le masquer pendant la configuration.
-**Connexions Serie:**
-Connectez-vous a des appareils serie (routeurs, commutateurs, microcontroleurs, etc.) directement depuis le navigateur ou l'application bureau. Configurez le debit en bauds, les bits de donnees, les bits d'arret et la parite. Utilise l'API Web Serial dans les navigateurs compatibles ou un backend natif dans l'application Electron.
+**Connexion et utilisateurs:**
+Comptes locaux ainsi que connexion OIDC, LDAP, GitHub et Google, avec double authentification (TOTP), clรฉs d'accรจs (WebAuthn) et appareils de confiance. Les administrateurs peuvent gรฉrer les utilisateurs, associer les groupes OIDC aux rรดles, voir toutes les sessions actives sur toutes les plateformes et les rรฉvoquer. Reliez vos comptes local et OIDC, et consultez le journal d'audit de ce que chacun a fait.
+**Rรดles et partage:**
+Crรฉez des rรดles et partagez des hรดtes avec des utilisateurs ou des rรดles selon quatre niveaux : connexion, lecture, modification et gestion. Cela fonctionne avec tous les types d'authentification et tous les protocoles, et vous pouvez remplacer les identifiants utilisรฉs pour un hรดte partagรฉ.
+
+
+
+
+
+
**Alertes:**
-Definissez des regles d'alerte basees sur des seuils pour les metriques d'hote (CPU, memoire, disque, etc.) et recevez des notifications via ntfy ou webhooks lorsqu'elles se declenchent. Consultez les alertes actives et resolues dans un journal d'historique.
+Dรฉfinissez des rรจgles sur les mรฉtriques des hรดtes comme le CPU, la mรฉmoire et le disque, et recevez une notification via ntfy, Discord ou un webhook quand elles se dรฉclenchent. Consultez les alertes en cours et rรฉsolues dans un historique, et รฉcartez celles qui ne vous intรฉressent pas.
-
-
**Page d'accueil:**
-Une page d'accueil entierement personnalisable avec une grille de widgets glisser-deposer. Ajoutez des widgets pour l'etat des hotes, les liens de services, les horloges, les notes, les flux RSS, la meteo, les conteneurs Docker, les graphiques de metriques d'hote, les terminaux integres, les iframes et plus encore.
-
-
-
-
-**Chiffrement de la base de donnees:**
-Le backend est stocke sous forme de fichiers de base de donnees SQLite chiffres. Consultez la [documentation](https://docs.termix.site/security) pour plus de details.
+Une grille de widgets en glisser-dรฉposer que vous construisez vous-mรชme. Des widgets pour l'รฉtat des hรดtes, les pings, les liens de services, les favoris, la recherche, les horloges, les calendriers, les comptes ร rebours, les notes, les flux RSS, la mรฉtรฉo, les images, les iframes, Docker, les tunnels, les graphiques de mรฉtriques, les API personnalisรฉes et mรชme un terminal en direct.
-**Graphe reseau:**
-Personnalisez votre tableau de bord pour visualiser votre homelab base sur vos connexions SSH avec support des statuts.
+**Extraits et outils:**
+Enregistrez les commandes que vous lancez souvent et exรฉcutez-les en un clic, avec des variables pour l'hรดte et vos propres saisies. Lancez une mรชme commande dans tous les terminaux ouverts, et cherchez dans votre historique avec la complรฉtion automatique.
-**Outils SSH:**
-Creez des extraits de commandes reutilisables executables en un seul clic. Executez une commande simultanement sur plusieurs terminaux ouverts.
+**Partage de session:**
+Partagez en direct une session terminal, RDP, VNC ou Telnet. Envoyez un lien que n'importe qui peut rejoindre sans compte, ou partagez avec un utilisateur Termix prรฉcis, en lecture seule ou en lecture-รฉcriture. Les partages peuvent expirer d'eux-mรชmes ou รชtre rรฉvoquรฉs, et se dรฉsactivent globalement ou hรดte par hรดte.
-**Onglets Persistants:**
-Les sessions SSH et les onglets restent ouverts sur tous les appareils/actualisations si active dans le profil utilisateur.
+**Enregistrement et journaux de session:**
+Enregistrez les sessions terminal, RDP et VNC pour les revoir plus tard. Tรฉlรฉchargez les journaux d'une session en texte simple, et consultez le journal de connexion pour voir exactement ce qui s'est passรฉ pendant une connexion.
+
+
+
+
+**Connexions sรฉrie:**
+Dialoguez avec des appareils sรฉrie comme des routeurs, des commutateurs et des microcontrรดleurs depuis le navigateur ou l'application de bureau. Rรฉglez la vitesse, les bits de donnรฉes, les bits d'arrรชt et la paritรฉ. Utilise l'API Web Serial dans les navigateurs compatibles, ou un backend natif dans l'application de bureau.
+
+
+
+
+
+
+**Tailscale:**
+Rรฉcupรฉrez les appareils de votre tailnet pour les ajouter comme hรดtes en quelques clics, et connectez-vous avec Tailscale SSH pour que les ACL de votre tailnet gรจrent les accรจs, sans stocker d'identifiants. Headscale et les points d'accรจs personnalisรฉs fonctionnent aussi.
+
+
+
+
+**Proxmox:**
+Importez des hรดtes directement depuis une instance Proxmox, et suivez les statistiques des nลuds et des invitรฉs, dont le CPU, la mรฉmoire et le stockage, dans un onglet dรฉdiรฉ.
+
+
+
+
+
+
+**Espaces de travail et onglets:**
+Enregistrez un ensemble d'onglets avec leur disposition en รฉcran divisรฉ et rouvrez le tout en un clic. Termix retient aussi votre derniรจre session, donc vos onglets reviennent aprรจs un rafraรฎchissement ou sur un autre appareil.
+
+
+
+
+**Configuration guidรฉe:**
+Une courte configuration vous aide ร choisir un prรฉrรฉglage d'interface, votre thรจme, les fonctionnalitรฉs que vous voulez et votre premier hรดte. Le mode simple masque ce que vous n'utilisez pas, et vous pouvez relancer la configuration ou changer de prรฉrรฉglage quand vous voulez.
+
+
+
+
+
+
+**Application de bureau autonome et synchronisation:**
+L'application de bureau fonctionne toute seule, avec son propre backend et sa base de donnรฉes, sans serveur. Vous pouvez aussi la relier ร un serveur Termix pour synchroniser dans les deux sens les hรดtes, les identifiants, les extraits et le reste, et choisir si les connexions partent de votre machine ou passent par le serveur.
+
+
+
+
+**Ligne de commande:**
+Un CLI `termix` pour votre shell et vos scripts. Ouvrez des terminaux, lancez une commande sur un hรดte ou une flotte entiรจre, dรฉplacez des fichiers en SFTP et gรฉrez hรดtes, extraits et identifiants. Installez-le avec `npm install -g @termix-cli/cli` ou rรฉcupรฉrez un binaire autonome. Voir la [documentation du CLI](https://docs.termix.site/cli).
+
+
+
+
+
+
+**Sรฉcuritรฉ:**
+Les mots de passe, les clรฉs et les autres secrets sont chiffrรฉs par utilisateur, et les fichiers de base de donnรฉes eux-mรชmes peuvent รชtre chiffrรฉs sur le disque. Voir la [documentation](https://docs.termix.site/security) pour le dรฉtail.
**Langues:**
-Support integre d'environ 30 langues (gere par [Crowdin](https://docs.termix.site/translations)).
+Une trentaine de langues intรฉgrรฉes, gรฉrรฉes via [Crowdin](https://docs.termix.site/translations).
@@ -196,26 +252,29 @@ Support integre d'environ 30 langues (gere par [Crowdin](https://docs.termix.sit
-Plus de fonctionnalites
+Plus de fonctionnalitรฉs
-- **Tableau de bord** - Consultez les informations de vos serveurs en un coup d'oeil depuis votre tableau de bord
-- **Cles API** - Creez des cles API a portee utilisateur avec des dates d'expiration pour une utilisation en automatisation/CI
-- **Export/Import de donnees** - Exportez et importez les hotes SSH, les identifiants et les donnees du gestionnaire de fichiers
-- **Configuration SSL automatique** - Generation et gestion integrees de certificats SSL avec redirections HTTPS
-- **Interface moderne** - Interface epuree compatible desktop/mobile construite avec React, Tailwind CSS et Shadcn. Choisissez parmi de nombreux themes d'interface utilisateur, notamment clair, sombre, Dracula, etc. Utilisez les routes URL pour ouvrir n'importe quelle connexion en plein ecran.
-- **Historique des commandes** - Auto-completion et consultation des commandes SSH precedemment executees
-- **Connexion rapide** - Connectez-vous a un serveur sans avoir a sauvegarder les donnees de connexion
-- **Palette de commandes** - Appuyez deux fois sur Shift gauche pour acceder rapidement aux connexions SSH avec votre clavier
-- **Integration Proxmox** - Ajoutez automatiquement des hotes dans Termix depuis votre instance Proxmox
-- **SSH riche en fonctionnalites** - Support des hotes de rebond, Warpgate, connexions basees sur TOTP, SOCKS5, verification des cles d'hote, remplissage automatique des mots de passe, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, port knocking, journalisation du terminal, transfert d'agent SSH, agent SSH Bitwarden, signature SSH HashiCorp Vault, et plus encore.
-- **Termix ID** - Un equivalent de sshid.io integre a Termix. Reservez un identifiant, publiez vos cles SSH publiques a une URL de resolution, et utilisez une autorite de certification integree pour emettre des certificats SSH.
+- **Tableau de bord** - Vos serveurs en un coup d'ลil, avec des cartes que vous rangez vous-mรชme
+- **Graphe rรฉseau** - Votre homelab dessinรฉ ร partir de vos hรดtes, avec l'รฉtat en direct
+- **Moniteur tmux** - Parcourez les sessions, fenรชtres et panneaux tmux, avec aperรงus et recherche
+- **Clรฉs API** - Des clรฉs par utilisateur avec date d'expiration, pour vos scripts et votre CI
+- **Export et import** - Faites entrer et sortir hรดtes, identifiants et donnรฉes du gestionnaire de fichiers
+- **SSL automatique** - Certificats gรฉnรฉrรฉs et renouvelรฉs pour vous, avec redirection HTTPS, ou apportez les vรดtres
+- **Bases de donnรฉes** - SQLite par dรฉfaut, PostgreSQL et MySQL รฉgalement pris en charge
+- **Interface moderne** - Une interface React soignรฉe qui marche sur ordinateur et mobile, avec des thรจmes clair, sombre et Dracula. Chaque connexion peut s'ouvrir en plein รฉcran depuis une URL
+- **Palette de commandes** - Double appui sur Maj gauche pour rejoindre un hรดte au clavier
+- **Raccourcis clavier** - Naviguer entre les onglets, les fermer et plus encore, tout est reconfigurable
+- **Wake-on-LAN** - Rรฉveillez une machine depuis Termix ou depuis une รฉtape d'automatisation
+- **Authentification par proxy de confiance** - Laissez un reverse proxy gรฉrer la connexion et transmettre l'utilisateur
+- **SSH complet** - Hรดtes de rebond, Warpgate, demandes TOTP, SOCKS5, vรฉrification des clรฉs d'hรดte, remplissage automatique des mots de passe, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, port knocking, journalisation du terminal, transfert d'agent, agent SSH Bitwarden, signature SSH HashiCorp Vault et plus encore
+- **Termix ID** - Une version intรฉgrรฉe de sshid.io. Rรฉservez un identifiant, publiez vos clรฉs publiques sur une URL de rรฉsolution et รฉmettez des certificats SSH depuis l'autoritรฉ intรฉgrรฉe
-## Support des plateformes
+## Plateformes prises en charge
@@ -224,11 +283,11 @@ Support integre d'environ 30 langues (gere par [Crowdin](https://docs.termix.sit
Web
-Tout navigateur moderne (Chrome, Safari, Firefox) ยท Support PWA
+Tout navigateur rรฉcent (Chrome, Safari, Firefox) ยท Compatible PWA
Windows x64/ia32
-Portable ยท MSI Installateur ยท Chocolatey
+Portable ยท Installeur MSI ยท Chocolatey
Linux x64/ia32
@@ -252,9 +311,9 @@ Support integre d'environ 30 langues (gere par [Crowdin](https://docs.termix.sit
## Installation
-Visitez la [documentation](https://docs.termix.site/install) de Termix pour des instructions d'installation completes sur toutes les plateformes.
+Consultez la [documentation Termix](https://docs.termix.site/install) pour les instructions d'installation complรจtes sur toutes les plateformes.
-Voici un exemple de fichier Docker Compose (vous pouvez omettre guacd et le reseau si vous ne prevoyez pas d'utiliser les fonctionnalites de bureau a distance) :
+Exemple de fichier Docker Compose (vous pouvez retirer `guacd` et le rรฉseau si vous ne comptez pas utiliser le bureau ร distance) :
```yaml
services:
@@ -291,11 +350,37 @@ networks:
driver: bridge
```
+### Ligne de commande
+
+Termix propose aussi un CLI, pour gรฉrer vos serveurs depuis un terminal et utiliser Termix dans vos propres scripts.
+
+```bash
+npm install -g @termix-cli/cli
+termix login --url https://termix.example.com
+termix ssh 1
+```
+
+Il peut ouvrir des terminaux, lancer une commande sur un hรดte ou une flotte entiรจre, dรฉplacer des fichiers en SFTP et gรฉrer hรดtes, extraits et identifiants. La documentation complรจte est sur [docs.termix.site/cli](https://docs.termix.site/cli).
+
+### Hรฉbergement cloud
+
+Vous pouvez faire tourner le serveur Termix sur un VPS plutรดt que dans votre propre rรฉseau. Si Termix tourne sur le rรฉseau qu'il gรจre, une panne l'emporte avec elle, juste au moment oรน vous en avez besoin pour rรฉparer. Ailleurs, il reste joignable, vous avez une IP fixe et vous pouvez y accรฉder de partout sans VPN ni redirection de port.
+
+[GINERNET](https://docs.termix.site/install/ginernet) sponsorise Termix, et la documentation contient un guide pas ร pas pour dรฉployer sur leur plateforme VPS.
+
+
+
+## Tรฉlรฉmรฉtrie
+
+Termix envoie une fois par jour un petit signal anonyme, pour que je puisse voir combien d'instances tournent et quelles fonctionnalitรฉs servent vraiment. Il contient un identifiant d'instance alรฉatoire, le nombre d'utilisateurs et d'hรดtes, la version de l'application et les fonctionnalitรฉs utilisรฉes ces derniรจres 24 heures (terminal, gestionnaire de fichiers, tunnels, docker, etc.). Il ne contient jamais de noms d'utilisateur, de noms d'hรดtes, d'adresses IP, d'identifiants ni quoi que ce soit qui puisse vous identifier, vous ou vos serveurs.
+
+C'est activรฉ par dรฉfaut. Dรฉsactivez-le dans les paramรจtres d'administration, section Gรฉnรฉral, ou dรฉfinissez `ENABLE_TELEMETRY=false` avant mรชme de dรฉmarrer Termix.
+
## Faire un don
-Termix est gratuit et open source, sans abonnement ni plan payant. Si vous le trouvez utile, pensez a faire un don pour aider a couvrir les couts de serveur, les domaines et le temps de developpement. Les dons contribuent egalement a financer le temps necessaire pour rechercher et apprendre ce qui est requis pour construire des fonctionnalites comme SAML, Kubernetes et le support des agents. Suivez la progression et faites un don ci-dessous.
+Termix est gratuit et open source, sans abonnement ni offre payante. S'il vous est utile, pensez ร faire un don pour aider ร couvrir les serveurs, les noms de domaine et le temps de dรฉveloppement. Les dons financent aussi le temps de recherche nรฉcessaire pour construire des fonctionnalitรฉs comme SAML, Kubernetes et le support des agents. Suivez l'avancement et faites un don ci-dessous.
[Faire un don](https://donate.termix.site/)
@@ -303,7 +388,7 @@ Termix est gratuit et open source, sans abonnement ni plan payant. Si vous le tr
## Sponsors
-Interesse par un placement payant pour soutenir le developpement ? Envoyez un email a [mail@termix.site](mailto:mail@termix.site).
+Intรฉressรฉ par un emplacement payant pour soutenir le dรฉveloppement ? รcrivez ร [mail@termix.site](mailto:mail@termix.site).
@@ -325,10 +410,6 @@ Interesse par un placement payant pour soutenir le developpement ? Envoyez un em
-
-
-
-
@@ -340,18 +421,21 @@ Interesse par un placement payant pour soutenir le developpement ? Envoyez un em
-
+
+
+
+
## Support
-Si vous avez besoin d'aide ou souhaitez demander une fonctionnalite pour Termix, visitez la page [Issues](https://github.com/Termix-SSH/Support/issues), connectez-vous et appuyez sur `New Issue`. Veuillez etre aussi detaille que possible dans votre issue, de preference redigee en anglais. Vous pouvez egalement rejoindre le serveur [Discord](https://discord.gg/jVQGdvHDrf) et visiter le canal de support, cependant les temps de reponse peuvent etre plus longs.
+Besoin d'aide ou envie de proposer une fonctionnalitรฉ ? Ouvrez un [nouveau ticket](https://github.com/Termix-SSH/Support/issues) avec le plus de dรฉtails possible, en anglais si vous le pouvez. Vous pouvez aussi demander dans le canal support sur [Discord](https://discord.gg/jVQGdvHDrf), mรชme si les rรฉponses y prennent parfois plus de temps.
-## Captures d'ecran
+## Captures d'รฉcran
@@ -359,7 +443,7 @@ Si vous avez besoin d'aide ou souhaitez demander une fonctionnalite pour Termix,
[](https://www.youtube.com/@TermixSSH/videos)
-Regarder les aperรงus des mises a jour sur YouTube
+Regarder les prรฉsentations des mises ร jour sur YouTube
@@ -399,18 +483,18 @@ Si vous avez besoin d'aide ou souhaitez demander une fonctionnalite pour Termix,
-Certaines videos et images peuvent etre obsoletes ou ne pas presenter parfaitement les fonctionnalites.
+Certaines vidรฉos et images peuvent รชtre dรฉpassรฉes ou ne pas montrer parfaitement les fonctionnalitรฉs.
-## Fonctionnalites prevues
+## Fonctionnalitรฉs prรฉvues
-Consultez les [Projects](https://github.com/orgs/Termix-SSH/projects/5) pour toutes les fonctionnalites prevues. Si vous souhaitez contribuer, consultez [Contributing](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md).
+Toutes les fonctionnalitรฉs prรฉvues sont dans [Projects](https://github.com/orgs/Termix-SSH/projects/5). Si vous souhaitez contribuer, voir [Contribuer](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md).
## Licence
-Distribue sous la licence Apache Version 2.0. Consultez `LICENSE` pour plus d'informations.
+Distribuรฉ sous licence Apache version 2.0. Voir `LICENSE` pour plus d'informations.
diff --git a/docs/readme/README-HI.md b/docs/readme/README-HI.md
index 17a1e63..ae6f0d4 100644
--- a/docs/readme/README-HI.md
+++ b/docs/readme/README-HI.md
@@ -4,7 +4,7 @@
Termix
-เคธเฅเคต-เคนเฅเคธเฅเคเฅเคก SSH เคชเฅเคฐเคฌเคเคงเคจ เคเคฐ เคฐเคฟเคฎเฅเค เคกเฅเคธเฅเคเคเฅเคช เคเคเฅเคธเฅเคธ
+เคธเฅเคฒเฅเคซ-เคนเฅเคธเฅเคเฅเคก เคธเคฐเฅเคตเคฐ เคชเฅเคฐเคฌเคเคงเคจ, SSH เคเคฐ เคฐเคฟเคฎเฅเค เคกเฅเคธเฅเคเคเฅเคช เคธเฅ เคฒเฅเคเคฐ เคเคเฅเคฎเฅเคถเคจ เคคเค
English ยท
@@ -37,7 +37,7 @@
-Termix เคฎเฅเคซเคผเฅเคค เคเคฐ เคเคชเคจ เคธเฅเคฐเฅเคธ เคนเฅเฅค เคฏเคฆเคฟ เคเคชเคเฅ เคฏเคน เคเคชเคฏเฅเคเฅ เคฒเคเคคเคพ เคนเฅ, เคคเฅ เคธเคฐเฅเคตเคฐ เคฒเคพเคเคค เคเคฐ เคตเคฟเคเคพเคธ เคธเคฎเคฏ เคฎเฅเค เคฎเคฆเคฆ เคเฅ เคฒเคฟเค [เคฆเคพเคจ เคเคฐเฅเค](https://donate.termix.site/)เฅค
+Termix เคฎเฅเคซเคผเฅเคค เคเคฐ เคเคชเคจ เคธเฅเคฐเฅเคธ เคนเฅเฅค เค
เคเคฐ เคฏเคน เคเคชเคเฅ เคเคพเคฎ เคเคคเคพ เคนเฅ, เคคเฅ เคธเคฐเฅเคตเคฐ เคเฅ เคฒเคพเคเคค เคเคฐ เคตเคฟเคเคพเคธ เคเฅ เคธเคฎเคฏ เคฎเฅเค เคฎเคฆเคฆ เคเฅ เคฒเคฟเค [เคฆเคพเคจ](https://donate.termix.site/) เคเคฐเคจเฅ เคชเคฐ เคตเคฟเคเคพเคฐ เคเคฐเฅเคเฅค
@@ -49,7 +49,7 @@ Termix เคฎเฅเคซเคผเฅเคค เคเคฐ เคเคชเคจ เคธเฅเคฐเฅเคธ เคนเฅเฅค เคฏเคฆเคฟ
- 1 เคธเคฟเคคเคเคฌเคฐ, 2025 เคเฅ เคชเฅเคฐเคพเคชเฅเคค
+ 1 เคธเคฟเคคเคเคฌเคฐ 2025 เคเฅ เคนเคพเคธเคฟเคฒ เคเคฟเคฏเคพ เคเคฏเคพ
@@ -58,7 +58,7 @@ Termix เคฎเฅเคซเคผเฅเคค เคเคฐ เคเคชเคจ เคธเฅเคฐเฅเคธ เคนเฅเฅค เคฏเคฆเคฟ
## เค
เคตเคฒเฅเคเคจ
-Termix เคเค เคเคชเคจ-เคธเฅเคฐเฅเคธ, เคนเคฎเฅเคถเคพ เคเฅ เคฒเคฟเค เคฎเฅเคซเคผเฅเคค, เคธเฅเคฒเฅเคซ-เคนเฅเคธเฅเคเฅเคก เคเคฒ-เคเคจ-เคตเคจ เคธเคฐเฅเคตเคฐ เคชเฅเคฐเคฌเคเคงเคจ เคชเฅเคฒเฅเคเคซเคผเฅเคฐเฅเคฎ เคนเฅเฅค เคฏเคน เคเค เคเคเคฒ, เคธเคนเค เคเคเคเคฐเคซเคผเฅเคธ เคเฅ เคฎเคพเคงเฅเคฏเคฎ เคธเฅ เคเคชเคเฅ เคธเคฐเฅเคตเคฐ เคเคฐ เคฌเฅเคจเคฟเคฏเคพเคฆเฅ เคขเคพเคเคเฅ เคเฅ เคชเฅเคฐเคฌเคเคงเคจ เคเฅ เคฒเคฟเค เคเค เคฎเคฒเฅเคเฅ-เคชเฅเคฒเฅเคเคซเคผเฅเคฐเฅเคฎ เคธเคฎเคพเคงเคพเคจ เคชเฅเคฐเคฆเคพเคจ เคเคฐเคคเคพ เคนเฅเฅค Termix SSH เคเคฐเฅเคฎเคฟเคจเคฒ เคเคเฅเคธเฅเคธ, เคฐเคฟเคฎเฅเค เคกเฅเคธเฅเคเคเฅเคช เคเคเคเฅเคฐเฅเคฒ (RDP, VNC, Telnet), SSH เคเคจเคฒเคฟเคเค เคเฅเคทเคฎเคคเคพเคเค, เคฐเคฟเคฎเฅเค เคซเคผเคพเคเคฒ เคชเฅเคฐเคฌเคเคงเคจ, เคเคฐ เคเค เค
เคจเฅเคฏ เคเคชเคเคฐเคฃ เคชเฅเคฐเคฆเคพเคจ เคเคฐเคคเคพ เคนเฅเฅค Termix เคธเคญเฅ เคชเฅเคฒเฅเคเคซเคผเฅเคฐเฅเคฎ เคชเคฐ เคเคชเคฒเคฌเฅเคง Termius เคเคพ เคธเคนเฅ เคฎเฅเคซเคผเฅเคค เคเคฐ เคธเฅเคฒเฅเคซ-เคนเฅเคธเฅเคเฅเคก เคตเคฟเคเคฒเฅเคช เคนเฅเฅค
+Termix เคเคชเคเฅ เคธเคฐเฅเคตเคฐ เคธเคเคญเคพเคฒเคจเฅ เคเฅ เคฒเคฟเค เคเค เคฎเฅเคซเคผเฅเคค, เคเคชเคจ เคธเฅเคฐเฅเคธ, เคธเฅเคฒเฅเคซ-เคนเฅเคธเฅเคเฅเคก เคชเฅเคฒเฅเคเคซเคผเฅเคฐเฅเคฎ เคนเฅเฅค เคฏเคน SSH เคเคฐเฅเคฎเคฟเคจเคฒ, เคฐเคฟเคฎเฅเค เคกเฅเคธเฅเคเคเฅเคช (RDP, VNC, Telnet), เคซเคผเคพเคเคฒ เคเฅเคฐเคพเคเคธเคซเคผเคฐ, เคเคจเคฒ, Docker, เคฎเฅเคเฅเคฐเคฟเคเฅเคธ เคเคฐ เคเคเฅเคฎเฅเคถเคจ เคเฅ เคเค เคนเฅ เคเคเคน เคฒเคพเคคเคพ เคนเฅ, เคตเฅเคฌ, เคกเฅเคธเฅเคเคเฅเคช เคเคฐ เคฎเฅเคฌเคพเคเคฒ เคชเคฐเฅค เคฏเคน Termius เคเคพ เคธเฅเคฒเฅเคซ-เคนเฅเคธเฅเคเฅเคก เคตเคฟเคเคฒเฅเคช เคนเฅ เคเฅ เคนเคฎเฅเคถเคพ เคฎเฅเคซเคผเฅเคค เคฐเคนเฅเคเคพเฅค
@@ -68,42 +68,42 @@ Termix เคเค เคเคชเคจ-เคธเฅเคฐเฅเคธ, เคนเคฎเฅเคถเคพ เคเฅ เคฒเคฟเค เคฎเฅ
-**SSH เคเคฐเฅเคฎเคฟเคจเคฒ เคเคเฅเคธเฅเคธ:**
-เคฌเฅเคฐเคพเคเคเคผเคฐ เคเฅเคธเฅ เคเฅเคฌ เคชเฅเคฐเคฃเคพเคฒเฅ เคเฅ เคธเคพเคฅ เคธเฅเคชเฅเคฒเคฟเค-เคธเฅเคเฅเคฐเฅเคจ เคธเคชเฅเคฐเฅเค (4 เคชเฅเคจเคฒ เคคเค) เคตเคพเคฒเคพ เคชเฅเคฐเฅเคฃ-เคตเคฟเคถเฅเคทเคคเคพ เคตเคพเคฒเคพ เคเคฐเฅเคฎเคฟเคจเคฒเฅค เคเคธเคฎเฅเค เคฒเฅเคเคชเฅเคฐเคฟเคฏ เคเคฐเฅเคฎเคฟเคจเคฒ เคฅเฅเคฎ, เคซเคผเฅเคจเฅเค เคเคฐ เค
เคจเฅเคฏ เคเคเคชเฅเคจเฅเคเค เคธเคนเคฟเคค เคเคฐเฅเคฎเคฟเคจเคฒ เคเฅ เคเคธเฅเคเคฎเคพเคเคเคผ เคเคฐเคจเฅ เคเคพ เคธเคชเฅเคฐเฅเค เคถเคพเคฎเคฟเคฒ เคนเฅเฅค
+**SSH เคเคฐเฅเคฎเคฟเคจเคฒ:**
+เคฌเฅเคฐเคพเคเคเคผเคฐ เคเฅเคธเฅ เคเฅเคฌ เคเคฐ เคธเฅเคชเฅเคฒเคฟเค เคธเฅเคเฅเคฐเฅเคจ เคตเคพเคฒเคพ เคชเฅเคฐเคพ เคเคฐเฅเคฎเคฟเคจเคฒ, เคเค เคธเคพเคฅ 6 เคชเฅเคจเคฒ เคคเคเฅค เคฅเฅเคฎ, เคซเคผเฅเคจเฅเค เคเคฐ เคฐเคเค เคเคช เคเฅเคฆ เคเฅเคจเฅเคเฅค เคนเคฐ เคธเคคเฅเคฐ เคเฅ เคเคชเคฐ เคเค เคเฅเคฒเคฌเคพเคฐ เคฐเคนเคคเคพ เคนเฅ เคเคฟเคธเคฎเฅเค CPU, เคฎเฅเคฎเฅเคฐเฅ เคเคฐ เคกเคฟเคธเฅเค เคฒเคพเคเคต เคฆเคฟเคเคคเฅ เคนเฅเค, เคธเคพเคฅ เคนเฅ เคเคธ เคนเฅเคธเฅเค เคเฅ เคซเคผเคพเคเคฒเฅเค, Docker, เคเคจเคฒ เคเคฐ เคฎเฅเคเฅเคฐเคฟเคเฅเคธ เคคเค เคเคพเคจเฅ เคเฅ เคถเฅเคฐเฅเคเคเค เคญเฅเฅค
-**เคฐเคฟเคฎเฅเค เคกเฅเคธเฅเคเคเฅเคช เคเคเฅเคธเฅเคธ:**
-เคฌเฅเคฐเคพเคเคเคผเคฐ เคชเคฐ RDP, VNC เคเคฐ Telnet เคธเคชเฅเคฐเฅเค, เคชเฅเคฐเฅเคฃ เคเคธเฅเคเคฎเคพเคเคเคผเฅเคถเคจ เคเคฐ เคธเฅเคชเฅเคฒเคฟเค เคธเฅเคเฅเคฐเฅเคจ เคเฅ เคธเคพเคฅเฅค
+**เคฐเคฟเคฎเฅเค เคกเฅเคธเฅเคเคเฅเคช:**
+เคฌเฅเคฐเคพเคเคเคผเคฐ เคฎเฅเค RDP, VNC เคเคฐ Telnet, เคฌเคพเคเฅ เคธเคคเฅเคฐเฅเค เคเฅ เคคเคฐเคน เคเฅเคฌ เคเคฐ เคธเฅเคชเฅเคฒเคฟเค เคธเฅเคเฅเคฐเฅเคจ เคฎเฅเคเฅค เคเคธเคฎเฅเค RDP เคกเฅเคฐเคพเคเคต เคเฅ เคฒเคฟเค เคซเคผเคพเคเคฒ เคฌเฅเคฐเคพเคเคเคผเคฐ เคเคฐ เคเฅเคเคเคเคฐ เคเฅเคกเคผเคจเฅ เคตเคพเคฒเคพ เค
เคชเคฒเฅเคก เคญเฅ เคนเฅเฅค Windows เคกเฅเคธเฅเคเคเฅเคช เคชเคฐ เคเคช เคนเฅเคธเฅเค เคเฅ เคธเคฟเคธเฅเคเคฎ เคเฅ เค
เคชเคจเฅ RDP เคเฅเคฒเคพเคเคเค เคฎเฅเค เคญเฅ เคเฅเคฒ เคธเคเคคเฅ เคนเฅเคเฅค
-**SSH เคเคจเคฒ เคชเฅเคฐเคฌเคเคงเคจ:**
-เคเคเฅเคฎเฅเคเคฟเค เคฐเฅเคเคจเฅเคเฅเคถเคจ, เคนเฅเคฒเฅเคฅ เคฎเฅเคจเคฟเคเคฐเคฟเคเค เคเคฐ เคฒเฅเคเคฒ, เคฐเคฟเคฎเฅเค เคฏเคพ เคกเคพเคฏเคจเฅเคฎเคฟเค SOCKS เคซเฅเคฐเคตเคฐเฅเคกเคฟเคเค เคเฅ เคธเคพเคฅ เคธเคฐเฅเคตเคฐ-เคเฅ-เคธเคฐเฅเคตเคฐ SSH เคเคจเคฒ เคฌเคจเคพเคเค เคเคฐ เคชเฅเคฐเคฌเคเคงเคฟเคค เคเคฐเฅเคเฅค เคกเฅเคธเฅเคเคเฅเคช เคเฅเคฒเคพเคเคเค-เคเฅ-เคธเคฐเฅเคตเคฐ เคเคจเคฒ เคธเฅเคเคฟเคเคเฅเคธ เคชเฅเคฐเคคเฅเคฏเฅเค เคกเฅเคธเฅเคเคเฅเคช เคเคเคธเฅเคเฅเคฒ เคฎเฅเค เคธเฅเคฅเคพเคจเฅเคฏ เคฐเฅเคช เคธเฅ เคธเคเคเฅเคฐเคนเฅเคค เคนเฅเคคเฅ เคนเฅเค; เคตเฅเคเคฒเฅเคชเคฟเค C2S เคชเฅเคฐเฅเคธเฅเค เคธเฅเคจเฅเคชเคถเฅเค เคธเคฐเฅเคตเคฐ เคชเคฐ เคธเฅเคต เคเคฟเค เคเคพ เคธเคเคคเฅ เคนเฅเค, เคคเคฅเคพ เคเคฌ เคเคช เคเคฟเคธเฅ เคฒเฅเคเคฒ เคเคจเคฒ เคเฅเคจเฅเคซเคผเคฟเคเคฐเฅเคถเคจ เคเฅ เคเฅเคฒเคพเคเคเค เคเฅ เคฌเฅเค เคธเฅเคฅเคพเคจเคพเคเคคเคฐเคฟเคค เคเคฐเคจเคพ เคเคพเคนเฅเค เคคเฅ เคเคจเฅเคนเฅเค เคฐเฅเคจเฅเคฎ, เคฒเฅเคก เคฏเคพ เคกเคฟเคฒเฅเค เคเคฟเคฏเคพ เคเคพ เคธเคเคคเคพ เคนเฅเฅค
+**SSH เคเคจเคฒ:**
+เคฒเฅเคเคฒ, เคฐเคฟเคฎเฅเค เคเคฐ เคกเคพเคฏเคจเคพเคฎเคฟเค SOCKS เคซเคผเฅเคฐเคตเคฐเฅเคกเคฟเคเค, เค
เคชเคจเฅ เคเคช เคฆเฅเคฌเคพเคฐเคพ เคเฅเคกเคผเคจเฅ เคเคฐ เคธเฅเคฅเคฟเคคเคฟ เคเคพเคเค เคเฅ เคธเคพเคฅเฅค เคกเฅเคธเฅเคเคเฅเคช เคเคช เคเฅ เคเฅเคฒเคพเคเคเค เคธเฅ เคธเคฐเฅเคตเคฐ เคตเคพเคฒเฅ เคเคจเคฒ เคเคธเฅ เคฎเคถเฅเคจ เคชเคฐ เคฐเคนเคคเฅ เคนเฅเค, เคเคฐ เคเคช เคธเฅเคเคฟเคเค เคธเคฐเฅเคตเคฐ เคชเคฐ เคธเคนเฅเคเคเคฐ เคเคธเฅ เคฆเฅเคธเคฐเฅ เคฎเคถเฅเคจ เคชเคฐ เคฒเฅ เคเคพ เคธเคเคคเฅ เคนเฅเคเฅค
-**เคฐเคฟเคฎเฅเค เคซเคผเคพเคเคฒ เคฎเฅเคจเฅเคเคฐ:**
-เคเฅเคก, เคเคฎเฅเค, เคเคกเคฟเคฏเฅ เคเคฐ เคตเฅเคกเคฟเคฏเฅ เคฆเฅเคเคจเฅ เคเคฐ เคธเคเคชเคพเคฆเคฟเคค เคเคฐเคจเฅ เคเฅ เคธเคชเฅเคฐเฅเค เคเฅ เคธเคพเคฅ เคฐเคฟเคฎเฅเค เคธเคฐเฅเคตเคฐ เคชเคฐ เคธเฅเคงเฅ เคซเคผเคพเคเคฒเฅเค เคชเฅเคฐเคฌเคเคงเคฟเคค เคเคฐเฅเคเฅค sudo เคธเคชเฅเคฐเฅเค เคเฅ เคธเคพเคฅ เคซเคผเคพเคเคฒเฅเค เค
เคชเคฒเฅเคก, เคกเคพเคเคจเคฒเฅเคก, เคฐเฅเคจเฅเคฎ, เคกเคฟเคฒเฅเค เคเคฐ เคฎเฅเคต เคเคฐเฅเคเฅค เคเคธเคฎเฅเค เคซเคผเคพเคเคฒเฅเค เคเฅ เคเค เคธเคฐเฅเคตเคฐ เคธเฅ เคฆเฅเคธเคฐเฅ เคธเคฐเฅเคตเคฐ เคฎเฅเค เคธเฅเคฅเคพเคจเคพเคเคคเคฐเคฟเคค เคเคฐเคจเฅ เคเคพ เคธเคชเฅเคฐเฅเค เคญเฅ เคถเคพเคฎเคฟเคฒ เคนเฅเฅค
+**เคซเคผเคพเคเคฒ เคฎเฅเคจเฅเคเคฐ:**
+SFTP เคธเฅ เคซเคผเคพเคเคฒเฅเค เคฆเฅเคเฅเค, เคธเคเคชเคพเคฆเคฟเคค เคเคฐเฅเค, เค
เคชเคฒเฅเคก เคเคฐ เคกเคพเคเคจเคฒเฅเคก เคเคฐเฅเค, เคจเคพเคฎ เคฌเคฆเคฒเฅเค, เคนเคเคพเคเค เคเคฐ เคเคฟเคธเคเคพเคเค, sudo เคเฅ เคธเคพเคฅ เคญเฅเฅค เคเฅเคก, เคคเคธเฅเคตเฅเคฐเฅเค, เคเคกเคฟเคฏเฅ เคเคฐ เคตเฅเคกเคฟเคฏเฅ เคฆเฅเคเฅเค เคเคฐ เคฌเคฆเคฒเฅเคเฅค เคซเคผเคพเคเคฒเฅเค เคธเฅเคงเฅ เคเค เคธเคฐเฅเคตเคฐ เคธเฅ เคฆเฅเคธเคฐเฅ เคชเคฐ เคเฅเคชเฅ เคเคฐเฅเค, เคธเคฌเคธเฅ เคคเฅเคเคผ เคฐเคพเคธเฅเคคเคพ เค
เคชเคจเฅ เคเคช เคเฅเคจเคพ เคเคพเคคเคพ เคนเฅ เคเคฐ เคเฅเคฐเคพเคเคธเคซเคผเคฐ เคเฅ เคเคพเคเค เคญเฅ เคนเฅเคคเฅ เคนเฅเฅค
-**Docker เคเคฐ Podman เคชเฅเคฐเคฌเคเคงเคจ:**
-เคเคเคเฅเคจเคฐ เคถเฅเคฐเฅ, เคฌเคเคฆ, เคชเฅเคเคผ, เคนเคเคพเคเคเฅค เคเคเคเฅเคจเคฐ เคธเฅเคเฅเคเฅเคธ เคฆเฅเคเฅเคเฅค docker exec เคเคฐเฅเคฎเคฟเคจเคฒ เคเคพ เคเคชเคฏเฅเค เคเคฐเคเฅ เคเคเคเฅเคจเคฐ เคเฅ เคจเคฟเคฏเคเคคเฅเคฐเคฟเคค เคเคฐเฅเคเฅค Docker เคเคฐ Podman เคฆเฅเคจเฅเค เคเฅ เคเคเคเฅเคจเคฐ เคฐเคจเคเคพเคเคฎ เคเฅ เคฐเฅเคช เคฎเฅเค เคธเคชเฅเคฐเฅเค เคเคฐเคคเคพ เคนเฅเฅค เคเคธเฅ Portainer เคฏเคพ Dockge เคเฅ เคเคเคน เคฒเฅเคจเฅ เคเฅ เคฒเคฟเค เคจเคนเฅเค เคฌเคจเคพเคฏเคพ เคเคฏเคพ เคฌเคฒเฅเคเคฟ เคเคเคเฅเคจเคฐ เคฌเคจเคพเคจเฅ เคเฅ เคคเฅเคฒเคจเคพ เคฎเฅเค เคเคจเฅเคนเฅเค เคธเคฐเคฒเคคเคพ เคธเฅ เคชเฅเคฐเคฌเคเคงเคฟเคค เคเคฐเคจเฅ เคเฅ เคฒเคฟเค เคฌเคจเคพเคฏเคพ เคเคฏเคพ เคนเฅเฅค
+**Docker เคเคฐ Podman:**
+เคเคเคเฅเคจเคฐ เคเคพเคฒเฅ เคเคฐเฅเค, เคฐเฅเคเฅเค, เคฅเคพเคฎเฅเค เคเคฐ เคนเคเคพเคเค, เคเคจเคเฅ เคเคเคเคกเคผเฅ เคฆเฅเคเฅเค, เคเคฐ เคเคฟเคธเฅ เคเค เคเฅ เค
เคเคฆเคฐ เคถเฅเคฒ เคเฅเคฒเฅเคเฅค Docker เคเคฐ Podman เคฆเฅเคจเฅเค เคเฅ เคธเคพเคฅ เคเคฒเคคเคพ เคนเฅเฅค เคฏเคน Portainer เคฏเคพ Dockge เคเฅ เคเคเคน เคฒเฅเคจเฅ เคเฅ เคฒเคฟเค เคจเคนเฅเค เคนเฅ, เคธเคฟเคฐเฅเคซเคผ เคเคชเคเฅ เคชเคนเคฒเฅ เคธเฅ เคฎเฅเคเฅเคฆ เคเคเคเฅเคจเคฐ เคธเคเคญเคพเคฒเคจเฅ เคเฅ เคฒเคฟเค เคนเฅเฅค
-**SSH เคนเฅเคธเฅเค เคฎเฅเคจเฅเคเคฐ:**
-เคเฅเค เคเคฐ เคซเคผเฅเคฒเฅเคกเคฐ (เคซเคผเฅเคฒเฅเคกเคฐ เคเคธเฅเคเคฎเคพเคเคเคผเฅเคถเคจ เคเคฐ เคจเฅเคธเฅเคเฅเคก เคซเคผเฅเคฒเฅเคกเคฐ เคธเคชเฅเคฐเฅเค เคเฅ เคธเคพเคฅ) เคเฅ เคธเคพเคฅ เค
เคชเคจเฅ SSH เคเคจเฅเคเฅเคถเคจ เคธเคนเฅเคเฅเค, เคตเฅเคฏเคตเคธเฅเคฅเคฟเคค เคเคฐเฅเค เคเคฐ เคชเฅเคฐเคฌเคเคงเคฟเคค เคเคฐเฅเค, เคเคฐ SSH เคเฅเคเคเคฟเคฏเฅเค เคเฅ เคคเฅเคจเคพเคคเฅ เคเฅ เคธเฅเคตเคเคพเคฒเคฟเคค เคเคฐเคจเฅ เคเฅ เคเฅเคทเคฎเคคเคพ เคเฅ เคธเคพเคฅ เคชเฅเคจ: เคเคชเคฏเฅเค เคฏเฅเคเฅเคฏ เคฒเฅเคเคฟเคจ เคเคพเคจเคเคพเคฐเฅ เคเคธเคพเคจเฅ เคธเฅ เคธเคนเฅเคเฅเคเฅค
+**เคนเฅเคธเฅเค เคฎเฅเคจเฅเคเคฐ:**
+เคเฅเค เคเคฐ เคจเคพเคฎ เคต เคฐเคเค เคตเคพเคฒเฅ เคจเฅเคธเฅเคเฅเคก เคซเคผเฅเคฒเฅเคกเคฐ เคธเฅ เคนเฅเคธเฅเค เคธเคนเฅเคเฅเค เคเคฐ เคตเฅเคฏเคตเคธเฅเคฅเคฟเคค เคเคฐเฅเคเฅค เคธเคนเฅเคเฅ เคเค เคเฅเคฐเฅเคกเฅเคเคถเคฟเคฏเคฒ เคเค เคนเฅเคธเฅเค เคชเคฐ เคฆเฅเคฌเคพเคฐเคพ เคเคธเฅเคคเฅเคฎเคพเคฒ เคเคฐเฅเค, SSH เคเฅเคเคเคฟเคฏเคพเค เค
เคชเคจเฅ เคเคช เคญเฅเคเฅเค, เคนเฅเคธเฅเค เคเฅ เคเคฟเคธเฅ เคฎเฅเคเฅเคฏ เคนเฅเคธเฅเค เคเฅ เคจเฅเคเฅ เคฐเคเฅเค, เคเค เคธเคพเคฅ เคเค เคฎเฅเค เคฌเคฆเคฒเคพเคต เคเคฐเฅเค เคเคฐ เคจเคฟเคฐเฅเคฏเคพเคค เคเคฐเฅเค, เคเคฐ เคเคฟเคจ เคเคจเฅเคเฅเคถเคจเฅเค เคเฅ เคธเคนเฅเคเคจเคพ เคจเคนเฅเค เคเคพเคนเคคเฅ เคเคจเคเฅ เคฒเคฟเค เคเฅเคตเคฟเค เคเคจเฅเคเฅเค เคเคธเฅเคคเฅเคฎเคพเคฒ เคเคฐเฅเคเฅค
@@ -111,83 +111,139 @@ Termix เคเค เคเคชเคจ-เคธเฅเคฐเฅเคธ, เคนเคฎเฅเคถเคพ เคเฅ เคฒเคฟเค เคฎเฅ
**เคนเฅเคธเฅเค เคฎเฅเคเฅเคฐเคฟเคเฅเคธ:**
-เค
เคงเคฟเคเคพเคเคถ Linux เคเคงเคพเคฐเคฟเคค เคธเคฐเฅเคตเคฐ เคชเคฐ CPU, เคฎเฅเคฎเฅเคฐเฅ, เคกเคฟเคธเฅเค เคเคชเคฏเฅเค, เคจเฅเคเคตเคฐเฅเค, เค
เคชเคเคพเคเคฎ, เคธเคฟเคธเฅเคเคฎ เคเคพเคจเคเคพเคฐเฅ, เคซเคผเคพเคฏเคฐเคตเฅเคฒ, เคชเฅเคฐเฅเค เคฎเฅเคจเคฟเคเคฐ, เคฒเฅเค เคตเฅเคฏเฅเค
เคฐ, เคเคชเคฏเฅเคเคเคฐเฅเคคเคพ/เค
เคจเฅเคฎเคคเคฟเคฏเคพเค, เคธเคฐเฅเคเคฟเคซเคผเคฟเคเฅเค เคเคฐ เคญเฅ เคฌเคนเฅเคค เคเฅเค เคฆเฅเคเฅเคเฅค เคเคธเคฎเฅเค เคเคพเคเคฎ-เคธเฅเคฐเฅเคเคผ เคนเคฟเคธเฅเคเฅเคฐเฅ เคเฅเคฐเคพเคซเคผ เคเคฐ ntfy เคต webhook เคธเคชเฅเคฐเฅเค เคเฅ เคธเคพเคฅ เคฅเฅเคฐเฅเคถเฅเคฒเฅเคก-เคเคงเคพเคฐเคฟเคค เค
เคฒเคฐเฅเค เคถเคพเคฎเคฟเคฒ เคนเฅเคเฅค
+เคเคผเฅเคฏเคพเคฆเคพเคคเคฐ Linux เคธเคฐเฅเคตเคฐ เคชเคฐ CPU, เคฎเฅเคฎเฅเคฐเฅ, เคกเคฟเคธเฅเค, เคจเฅเคเคตเคฐเฅเค, เคคเคพเคชเคฎเคพเคจ, เค
เคชเคเคพเคเคฎ, เคชเฅเคฐเฅเคธเฅเคธ, เคชเฅเคฐเฅเค, เคฒเฅเคเคฟเคจ เคเคฐ เคธเคฟเคธเฅเคเคฎ เคเคพเคจเคเคพเคฐเฅ, เคชเฅเคฐเคพเคจเฅ เคเคเคเคกเคผเฅเค เคเฅ เคเฅเคฐเคพเคซเคผ เคเฅ เคธเคพเคฅเฅค เคฎเฅเคจเฅเคเคฐ เคเคพเคฐเฅเคก เคธเฅ เคเคช เคธเคฐเฅเคตเคฟเคธ, cron เคเคพเคฐเฅเคฏ, เคชเฅเคเฅเค, เคเคชเคฏเฅเคเคเคฐเฅเคคเคพ, เคซเคผเคพเคฏเคฐเคตเฅเคฒ เคจเคฟเคฏเคฎ, WireGuard, Tailscale, SSL เคชเฅเคฐเคฎเคพเคฃเคชเคคเฅเคฐ, เคฒเฅเค เคเคฐ เคนเฅเคฒเฅเคฅ เคเฅเค Termix เคเฅเคกเคผเฅ เคฌเคฟเคจเคพ เคธเคเคญเคพเคฒ เคธเคเคคเฅ เคนเฅเคเฅค
-**เคเคชเคฏเฅเคเคเคฐเฅเคคเคพ เคชเฅเคฐเคฎเคพเคฃเฅเคเคฐเคฃ:**
-เคตเฅเคฏเคตเคธเฅเคฅเคพเคชเค เคจเคฟเคฏเคเคคเฅเคฐเคฃ (เค
เคจเฅเคฏ เคเคชเคฏเฅเคเคเคฐเฅเคคเคพเคเค เคเฅ เคเคพเคจเคเคพเคฐเฅ เคธเคเคชเคพเคฆเคฟเคค เคเคฐ เคธเคเคคเฅ เคนเฅเค) เคเคฐ OIDC/LDAP/SSO (เคเคเฅเคธเฅเคธ เคเคเคเฅเคฐเฅเคฒ เคเฅ เคธเคพเคฅ), 2FA (TOTP), เคเคฐ เคชเคพเคธเคเฅ (WebAuthn) เคธเคชเฅเคฐเฅเค เคเฅ เคธเคพเคฅ เคธเฅเคฐเคเฅเคทเคฟเคค เคเคชเคฏเฅเคเคเคฐเฅเคคเคพ เคชเฅเคฐเคฌเคเคงเคจเฅค เคธเคญเฅ เคชเฅเคฒเฅเคเคซเคผเฅเคฐเฅเคฎ เคชเคฐ เคธเคเฅเคฐเคฟเคฏ เคเคชเคฏเฅเคเคเคฐเฅเคคเคพ เคธเคคเฅเคฐ เคฆเฅเคเฅเค เคเคฐ เค
เคจเฅเคฎเคคเคฟเคฏเคพเค เคฐเคฆเฅเคฆ เคเคฐเฅเคเฅค เค
เคชเคจเฅ OIDC/เคธเฅเคฅเคพเคจเฅเคฏ เคเคพเคคเฅเค เคเฅ เคเค เคธเคพเคฅ เคเฅเคกเคผเฅเคเฅค เคธเคญเฅ เคเคชเคฏเฅเคเคเคฐเฅเคคเคพเคเค เคเฅ เคเคพเคฐเฅเคฐเคตเคพเคเคฏเฅเค เคเคพ เคเคกเคฟเค เคฒเฅเค เคฆเฅเคเฅเคเฅค
+**เคเคเฅเคฎเฅเคถเคจ:**
+เคชเคนเคฒเฅ เคเค เคเฅเคฐเคฟเคเคฐ เคเฅเคจเฅเค, เคซเคฟเคฐ เคฌเคคเคพเคเค เคเคฟ เคเฅเคฏเคพ เคนเฅเคจเคพ เคเคพเคนเคฟเคเฅค เคเฅเคฐเคฟเคเคฐ เคฎเฅเค เคเคฟเคธเฅ เคฎเฅเคเฅเคฐเคฟเค เคเคพ เคคเคฏ เคธเฅเคฎเคพ เคชเคพเคฐ เคเคฐเคจเคพ, เคนเฅเคธเฅเค เคเคพ เคฌเคเคฆ เคนเฅเคจเคพ เคฏเคพ เคตเคพเคชเคธ เคเคจเคพ, เคนเฅเคฒเฅเคฅ เคเฅเค เคเคพ เคฌเคฆเคฒเคจเคพ, เคเฅเค เคคเคฏ เคธเคฎเคฏ, เคเคเคเฅเคจเคฐ เคเฅ เคเฅเค เคเคเคจเคพ, เคฏเคพ เคเคจเฅ เคตเคพเคฒเคพ webhook เคถเคพเคฎเคฟเคฒ เคนเฅเฅค เคเคฆเคฎเฅเค เคฎเฅเค เคเคฎเคพเคเคก เคเคฐ เคธเฅเคจเคฟเคชเฅเค เคเคฒเคพเคจเคพ, เคเคเคเฅเคจเคฐ เคเคฐ เคเคจเคฒ เคธเคเคญเคพเคฒเคจเคพ, เคฎเคถเฅเคจ เคเคเคพเคจเคพ, เคเฅเค URL เคฌเฅเคฒเคพเคจเคพ, เคเคเคคเคเคผเคพเคฐ เคเคฐเคจเคพ, เคถเคฐเฅเคค เคเฅ เคนเคฟเคธเคพเคฌ เคธเฅ เคฐเคพเคธเฅเคคเคพ เคฌเคฆเคฒเคจเคพ, เคฆเฅเคธเคฐเคพ เคเคเฅเคฎเฅเคถเคจ เคเคฒเคพเคจเคพ, เคเคฐ ntfy, Discord เคฏเคพ webhook เคธเฅ เคเคชเคเฅ เคฌเคคเคพเคจเคพ เคถเคพเคฎเคฟเคฒ เคนเฅเฅค เคเฅเคธเฅเค เคฐเคจ เคธเฅ เคเคช เคชเคนเคฒเฅ เคธเฅเคฐเคเฅเคทเคฟเคค เคคเคฐเฅเคเฅ เคธเฅ เคเคเคผเคฎเคพ เคธเคเคคเฅ เคนเฅเคเฅค
-**Tailscale เคเคเฅเคเคฐเคฃ:**
-เค
เคชเคจเฅ Tailscale เคจเฅเคเคตเคฐเฅเค เคเฅ เคกเคฟเคตเคพเคเคธ เคธเฅเคเฅเคฌเคฆเฅเคง เคเคฐเฅเค เคคเคพเคเคฟ เคเคจเฅเคนเฅเค เคเคฒเฅเคฆเฅ เคธเฅ เคนเฅเคธเฅเค เคเฅ เคฐเฅเคช เคฎเฅเค เคเฅเคกเคผเคพ เคเคพ เคธเคเฅ, เคเคฐ Tailscale SSH เคเฅ เคชเฅเคฐเคฎเคพเคฃเฅเคเคฐเคฃ เคตเคฟเคงเคฟ เคเฅ เคฐเฅเคช เคฎเฅเค เคเคชเคฏเฅเค เคเคฐเคเฅ เคเคจเฅเคเฅเค เคเคฐเฅเค, เคเคฟเคธเคธเฅ เคเคชเคเฅ Tailscale ACL เคเฅเคฐเฅเคกเฅเคเคถเคฟเคฏเคฒ เคธเคเคเฅเคฐเคนเฅเคค เคเคฟเค เคฌเคฟเคจเคพ เคชเฅเคฐเคพเคงเคฟเคเคฐเคฃ เคธเคเคญเคพเคฒ เคธเคเฅเคเฅค
+**เคซเคผเฅเคฒเฅเค:**
+เคนเฅเคธเฅเค เคเฅเคจเคเคฐ เคฏเคพ เคเฅเค เคจเคฟเคฏเคฎเฅเค เคธเฅ เคเค เคซเคผเฅเคฒเฅเค เคฌเคจเคพเคเค, เคคเคพเคเคฟ เคจเค เคนเฅเคธเฅเค เค
เคชเคจเฅ เคเคช เคเฅเคกเคผ เคเคพเคเคเฅค เคเค เคนเฅ เคเคฎเคพเคเคก เคธเคญเฅ เคนเฅเคธเฅเค เคชเคฐ เคเค เคธเคพเคฅ เคเคฒเคพเคเค, เคธเคฌ เคชเคฐ เคซเคผเคพเคเคฒเฅเค เคญเฅเคเฅเค เคเคฐ เคเคจเคธเฅ เคฒเคพเคเค, เคชเฅเคเฅเค เคเคเคธเฅเคเฅเคฒ เคเคฐเฅเค, เคเคฐ OS, เคเคฐเฅเคจเฅเคฒ, เคเคฐเฅเคเคฟเคเฅเคเฅเคเคฐ เคเคฐ เค
เคชเคเคพเคเคฎ เคเฅ เคธเฅเคเฅ เคเคเคเฅเค เคพ เคเคฐเฅเคเฅค
-**RBAC/เคถเฅเคฏเคฐเคฟเคเค:**
-เคญเฅเคฎเคฟเคเคพเคเค เคฌเคจเคพเคเค เคเคฐ เคเคชเคฏเฅเคเคเคฐเฅเคคเคพเคเค/เคญเฅเคฎเคฟเคเคพเคเค เคฎเฅเค เคนเฅเคธเฅเค เคธเคพเคเคพ เคเคฐเฅเคเฅค เคธเคญเฅ เคชเฅเคฐเคฎเคพเคฃเฅเคเคฐเคฃ เคชเฅเคฐเคเคพเคฐเฅเค เคเคฐ เคธเคญเฅ เคนเฅเคธเฅเค เคชเฅเคฐเฅเคเฅเคเฅเคฒ เคเคพ เคธเคชเฅเคฐเฅเค เคเคฐเคคเคพ เคนเฅเฅค
+**AI เคธเคนเคพเคฏเค:**
+เคฏเคน เคตเฅเคเคฒเฅเคชเคฟเค เคนเฅ เคเคฐ เคเคฌ เคคเค เคเคช เคเฅเคฆ เคเคพเคฒเฅ เคจ เคเคฐเฅเค, เคฌเคเคฆ เคฐเคนเคคเคพ เคนเฅเฅค OpenAI, Anthropic, Gemini, Ollama เคฏเคพ OpenAI เคเฅ เค
เคจเฅเคฐเฅเคช เคเฅเค เคญเฅ เคเคเคกเคชเฅเคเคเค เคเฅเคกเคผเฅเค เคเคฐ เค
เคชเคจเฅ เคธเฅเคเค
เคช เคเฅ เคฌเคพเคฐเฅ เคฎเฅเค เคชเฅเคเฅเคเฅค เคฏเคน เคนเฅเคธเฅเค, เคซเคผเฅเคฒเฅเค, เคธเฅเคจเคฟเคชเฅเค เคเคฐ เค
เคฒเคฐเฅเค เคชเคขเคผ เคธเคเคคเคพ เคนเฅ, เคเคฐ เคฌเคฆเคฒเคพเคต เคเฅเคฆ เคเคฐเคจเฅ เคเฅ เคฌเคเคพเคฏ เคเคชเคเฅ เคฎเคเคเคผเฅเคฐเฅ เคเฅ เคฒเคฟเค เคธเฅเคเคพเคคเคพ เคนเฅเฅค เคฏเคน เคเฅเคฐเฅเคกเฅเคเคถเคฟเคฏเคฒ, เคเคชเคฏเฅเคเคเคฐเฅเคคเคพเคเค เคฏเคพ เคธเฅเคเคฟเคเคเฅเคธ เคคเค เคเคญเฅ เคจเคนเฅเค เคชเคนเฅเคเค เคธเคเคคเคพเฅค เคเคกเคฎเคฟเคจ เคเคธเฅ เคชเฅเคฐเฅ เคเคเคธเฅเคเฅเคเคธ เคเฅ เคฒเคฟเค เคฌเคเคฆ เคฐเค เคธเคเคคเฅ เคนเฅเค, เคเคฐ เคเคช เคเคธเฅ เคถเฅเคฐเฅเคเคคเฅ เคธเฅเคเค
เคช เคฎเฅเค เคนเฅ เคเคฟเคชเคพ เคธเคเคคเฅ เคนเฅเคเฅค
-**เคธเฅเคฐเคฟเคฏเคฒ เคเคจเฅเคเฅเคถเคจ:**
-เคธเฅเคฐเคฟเคฏเคฒ เคกเคฟเคตเคพเคเคธ (เคฐเคพเคเคเคฐ, เคธเฅเคตเคฟเค, เคฎเคพเคเคเฅเคฐเฅเคเคเคเฅเคฐเฅเคฒเคฐ เคเคฆเคฟ) เคธเฅ เคธเฅเคงเฅ เคฌเฅเคฐเคพเคเคเคผเคฐ เคฏเคพ เคกเฅเคธเฅเคเคเฅเคช เคเคช เคธเฅ เคเคจเฅเคเฅเค เคเคฐเฅเคเฅค เคฌเฅเคก เคฐเฅเค, เคกเฅเคเคพ เคฌเคฟเคเฅเคธ, เคธเฅเคเฅเคช เคฌเคฟเคเฅเคธ เคเคฐ เคชเฅเคฐเคฟเคเฅ เคเฅเคจเฅเคซเคผเคฟเคเคฐ เคเคฐเฅเคเฅค เคธเคฎเคฐเฅเคฅเคฟเคค เคฌเฅเคฐเคพเคเคเคผเคฐ เคฎเฅเค Web Serial API เคฏเคพ Electron เคเคช เคฎเฅเค เคจเฅเคเคฟเคต เคฌเฅเคเคเคเคก เคเคพ เคเคชเคฏเฅเค เคเคฐเคคเคพ เคนเฅเฅค
+**เคฒเฅเคเคฟเคจ เคเคฐ เคเคชเคฏเฅเคเคเคฐเฅเคคเคพ:**
+เคฒเฅเคเคฒ เคเคพเคคเฅเค เคเฅ เคธเคพเคฅ OIDC, LDAP, GitHub เคเคฐ Google เคธเฅ เคฒเฅเคเคฟเคจ, เคเคฐ เคฆเฅ เคเคฐเคฃเฅเค เคตเคพเคฒเคพ เคธเคคเฅเคฏเคพเคชเคจ (TOTP), เคชเคพเคธเคเฅ (WebAuthn) เคคเคฅเคพ เคญเคฐเฅเคธเฅเคฎเคเคฆ เคกเคฟเคตเคพเคเคธเฅค เคเคกเคฎเคฟเคจ เคเคชเคฏเฅเคเคเคฐเฅเคคเคพเคเค เคเฅ เคธเคเคญเคพเคฒ เคธเคเคคเฅ เคนเฅเค, OIDC เคธเคฎเฅเคนเฅเค เคเฅ เคญเฅเคฎเคฟเคเคพเคเค เคธเฅ เคเฅเคกเคผ เคธเคเคคเฅ เคนเฅเค, เคนเคฐ เคชเฅเคฒเฅเคเคซเคผเฅเคฐเฅเคฎ เคชเคฐ เคเคพเคฒเฅ เคธเคคเฅเคฐ เคฆเฅเค เคเคฐ เคฐเคฆเฅเคฆ เคเคฐ เคธเคเคคเฅ เคนเฅเคเฅค เค
เคชเคจเฅ เคฒเฅเคเคฒ เคเคฐ OIDC เคเคพเคคเฅ เคเคชเคธ เคฎเฅเค เคเฅเคกเคผเฅเค, เคเคฐ เคเคกเคฟเค เคฒเฅเค เคฎเฅเค เคฆเฅเคเฅเค เคเคฟ เคเคฟเคธเคจเฅ เคเฅเคฏเคพ เคเคฟเคฏเคพเฅค
+**เคญเฅเคฎเคฟเคเคพเคเค เคเคฐ เคธเคพเคเคพเคเคฐเคฃ:**
+เคญเฅเคฎเคฟเคเคพเคเค เคฌเคจเคพเคเค เคเคฐ เคนเฅเคธเฅเค เคเฅ เคเคชเคฏเฅเคเคเคฐเฅเคคเคพเคเค เคฏเคพ เคญเฅเคฎเคฟเคเคพเคเค เคเฅ เคธเคพเคฅ เคเคพเคฐ เคธเฅเคคเคฐเฅเค เคชเคฐ เคธเคพเคเคพ เคเคฐเฅเค: เคเคจเฅเคเฅเค, เคฆเฅเคเคจเคพ, เคฌเคฆเคฒเคจเคพ เคเคฐ เคชเฅเคฐเคฌเคเคงเคจเฅค เคฏเคน เคนเคฐ เคคเคฐเคน เคเฅ เคชเฅเคฐเคฎเคพเคฃเฅเคเคฐเคฃ เคเคฐ เคนเคฐ เคชเฅเคฐเฅเคเฅเคเฅเคฒ เคเฅ เคธเคพเคฅ เคเคฒเคคเคพ เคนเฅ, เคเคฐ เคธเคพเคเคพ เคนเฅเคธเฅเค เคเฅ เคฒเคฟเค เคเคธเฅเคคเฅเคฎเคพเคฒ เคนเฅเคจเฅ เคตเคพเคฒเฅ เคเฅเคฐเฅเคกเฅเคเคถเคฟเคฏเคฒ เคเคช เคฌเคฆเคฒ เคญเฅ เคธเคเคคเฅ เคนเฅเคเฅค
+
+
+
+
+
+
**เค
เคฒเคฐเฅเค:**
-เคนเฅเคธเฅเค เคฎเฅเคเฅเคฐเคฟเคเฅเคธ (CPU, เคฎเฅเคฎเฅเคฐเฅ, เคกเคฟเคธเฅเค เคเคฆเคฟ) เคชเคฐ เคฅเฅเคฐเฅเคถเฅเคฒเฅเคก-เคเคงเคพเคฐเคฟเคค เค
เคฒเคฐเฅเค เคจเคฟเคฏเคฎ เคธเฅเค เคเคฐเฅเค เคเคฐ เคเคฌ เคตเฅ เคเฅเคฐเคฟเคเคฐ เคนเฅเค เคคเฅ ntfy เคฏเคพ webhooks เคเฅ เคฎเคพเคงเฅเคฏเคฎ เคธเฅ เคธเฅเคเคจเคพ เคชเคพเคเคเฅค เคเคคเคฟเคนเคพเคธ เคฒเฅเค เคฎเฅเค เคธเคเฅเคฐเคฟเคฏ เคเคฐ เคนเคฒ เคเคฟเค เคเค เค
เคฒเคฐเฅเค เคฆเฅเคเฅเคเฅค
+CPU, เคฎเฅเคฎเฅเคฐเฅ เคเคฐ เคกเคฟเคธเฅเค เคเฅเคธเฅ เคนเฅเคธเฅเค เคฎเฅเคเฅเคฐเคฟเคเฅเคธ เคชเคฐ เคจเคฟเคฏเคฎ เคฒเคเคพเคเค, เคเคฐ เคเคจเคเฅ เคเคฒเคจเฅ เคชเคฐ ntfy, Discord เคฏเคพ webhook เคธเฅ เคธเฅเคเคจเคพ เคชเคพเคเคเฅค เคเคฒ เคฐเคนเฅ เคเคฐ เค เฅเค เคนเฅ เคเฅเคเฅ เค
เคฒเคฐเฅเค เคเคคเคฟเคนเคพเคธ เคฎเฅเค เคฆเฅเคเฅเค, เคเคฐ เคเฅ เคเคชเคเฅ เคเคพเคฎ เคเฅ เคจเคนเฅเค เคเคจเฅเคนเฅเค เคนเคเคพ เคฆเฅเคเฅค
-
-
**เคนเฅเคฎเคชเฅเค:**
-เคกเฅเคฐเฅเค-เคเคเคก-เคกเฅเคฐเฅเคช เคตเคฟเคเฅเค เคเฅเคฐเคฟเคก เคเฅ เคธเคพเคฅ เคชเฅเคฐเฅ เคคเคฐเคน เคธเฅ เคเคธเฅเคเคฎเคพเคเคเคผ เคเคฐเคจเฅ เคฏเฅเคเฅเคฏ เคนเฅเคฎเคชเฅเคเฅค เคนเฅเคธเฅเค เคธเฅเคเฅเคเคธ, เคธเคฐเฅเคตเคฟเคธ เคฒเคฟเคเค, เคเคกเคผเคฟเคฏเคพเค, เคจเฅเคเฅเคธ, RSS เคซเคผเฅเคก, เคฎเฅเคธเคฎ, Docker เคเคเคเฅเคจเคฐ, เคนเฅเคธเฅเค เคฎเฅเคเฅเคฐเคฟเคเฅเคธ เคเคพเคฐเฅเค, เคเคฎเฅเคฌเฅเคกเฅเคก เคเคฐเฅเคฎเคฟเคจเคฒ, iframes เคเคฐ เค
เคจเฅเคฏ เคเฅ เคฒเคฟเค เคตเคฟเคเฅเค เคเฅเคกเคผเฅเคเฅค
-
-
-
-
-**เคกเฅเคเคพเคฌเฅเคธ เคเคจเฅเคเฅเคฐเคฟเคชเฅเคถเคจ:**
-เคฌเฅเคเคเคเคก เคเคจเฅเคเฅเคฐเคฟเคชเฅเคเฅเคก SQLite เคกเฅเคเคพเคฌเฅเคธ เคซเคผเคพเคเคฒเฅเค เคเฅ เคฐเฅเคช เคฎเฅเค เคธเคเคเฅเคฐเคนเฅเคคเฅค เค
เคงเคฟเค เคเคพเคจเคเคพเคฐเฅ เคเฅ เคฒเคฟเค [เคกเฅเคเฅเคธ](https://docs.termix.site/security) เคฆเฅเคเฅเคเฅค
+เคเฅเคเคเคเคฐ เคเฅเคกเคผเคจเฅ เคตเคพเคฒเคพ เคตเคฟเคเฅเค เคเฅเคฐเคฟเคก เคเคฟเคธเฅ เคเคช เคเฅเคฆ เคฌเคจเคพเคคเฅ เคนเฅเคเฅค เคนเฅเคธเฅเค เคเฅ เคธเฅเคฅเคฟเคคเคฟ, เคชเคฟเคเค, เคธเคฐเฅเคตเคฟเคธ เคฒเคฟเคเค, เคฌเฅเคเคฎเคพเคฐเฅเค, เคเฅเค, เคเคกเคผเคฟเคฏเคพเค, เคเฅเคฒเฅเคเคกเคฐ, เคเคฒเคเฅ เคเคฟเคจเคคเฅ, เคจเฅเคเฅเคธ, RSS, เคฎเฅเคธเคฎ, เคคเคธเฅเคตเฅเคฐเฅเค, iframe, Docker, เคเคจเคฒ, เคฎเฅเคเฅเคฐเคฟเคเฅเคธ เคเฅ เคเฅเคฐเคพเคซเคผ, เค
เคชเคจเฅ API เคเคฐ เคฏเคนเคพเค เคคเค เคเคฟ เคเคพเคฒเฅ เคเคฐเฅเคฎเคฟเคจเคฒ เคคเค เคเฅ เคตเคฟเคเฅเค เคฎเฅเคเฅเคฆ เคนเฅเคเฅค
-**เคจเฅเคเคตเคฐเฅเค เคเฅเคฐเคพเคซเคผ:**
-เคธเฅเคฅเคฟเคคเคฟ เคธเคชเฅเคฐเฅเค เคเฅ เคธเคพเคฅ เค
เคชเคจเฅ SSH เคเคจเฅเคเฅเคถเคจ เคเฅ เคเคงเคพเคฐ เคชเคฐ เค
เคชเคจเฅ เคนเฅเคฎเคฒเฅเคฌ เคเฅ เคตเคฟเคเคผเฅเค
เคฒเคพเคเคเคผ เคเคฐเคจเฅ เคเฅ เคฒเคฟเค เค
เคชเคจเคพ เคกเฅเคถเคฌเฅเคฐเฅเคก เคเคธเฅเคเคฎเคพเคเคเคผ เคเคฐเฅเคเฅค
+**เคธเฅเคจเคฟเคชเฅเค เคเคฐ เคเคชเคเคฐเคฃ:**
+เคเฅ เคเคฎเคพเคเคก เคเคช เคฌเคพเคฐ-เคฌเคพเคฐ เคเคฒเคพเคคเฅ เคนเฅเค เคเคจเฅเคนเฅเค เคธเคนเฅเคเฅเค เคเคฐ เคเค เคเฅเคฒเคฟเค เคฎเฅเค เคเคฒเคพเคเค, เคนเฅเคธเฅเค เคเคฐ เค
เคชเคจเฅ เคเคจเคชเฅเค เคเฅ เคฒเคฟเค เคตเฅเคฐเคฟเคเคฌเคฒ เคเฅ เคธเคพเคฅเฅค เคเค เคนเฅ เคเคฎเคพเคเคก เคธเคญเฅ เคเฅเคฒเฅ เคเคฐเฅเคฎเคฟเคจเคฒเฅเค เคชเคฐ เคเคฒเคพเคเค, เคเคฐ เค
เคชเคจเฅ เคเคฎเคพเคเคก เคเคคเคฟเคนเคพเคธ เคฎเฅเค เคเคเฅ-เคเคเคชเฅเคฒเฅเค เคเฅ เคธเคพเคฅ เคเฅเคเฅเคเฅค
-**SSH เคเฅเคฒเฅเคธ:**
-เคเค เคเฅเคฒเคฟเค เคธเฅ เคจเคฟเคทเฅเคชเคพเคฆเคฟเคค เคนเฅเคจเฅ เคตเคพเคฒเฅ เคชเฅเคจ: เคเคชเคฏเฅเค เคฏเฅเคเฅเคฏ เคเคฎเคพเคเคก เคธเฅเคจเคฟเคชเฅเค เคฌเคจเคพเคเคเฅค เคเค เคธเคพเคฅ เคเค เคเฅเคฒเฅ เคเคฐเฅเคฎเคฟเคจเคฒเฅเค เคฎเฅเค เคเค เคเคฎเคพเคเคก เคเคฒเคพเคเคเฅค
+**เคธเคคเฅเคฐ เคธเคพเคเคพ เคเคฐเคจเคพ:**
+เคเคพเคฒเฅ เคเคฐเฅเคฎเคฟเคจเคฒ, RDP, VNC เคฏเคพ Telnet เคธเคคเฅเคฐ เคฒเคพเคเคต เคธเคพเคเคพ เคเคฐเฅเคเฅค เคเคธเคพ เคฒเคฟเคเค เคญเฅเคเฅเค เคเคฟเคธเคธเฅ เคเฅเค เคญเฅ เคฌเคฟเคจเคพ เคเคพเคคเฅ เคเฅ เคเฅเคกเคผ เคธเคเฅ, เคฏเคพ เคเคฟเคธเฅ เคเคพเคธ Termix เคเคชเคฏเฅเคเคเคฐเฅเคคเคพ เคเฅ เคธเคพเคฅ เคธเคพเคเคพ เคเคฐเฅเค, เคธเคฟเคฐเฅเคซเคผ เคฆเฅเคเคจเฅ เคฏเคพ เคฒเคฟเคเคจเฅ เคเฅ เค
เคจเฅเคฎเคคเคฟ เคเฅ เคธเคพเคฅเฅค เคธเคพเคเคพเคเคฐเคฃ เค
เคชเคจเฅ เคเคช เคเคคเฅเคฎ เคนเฅ เคธเคเคคเคพ เคนเฅ เคฏเคพ เคเคญเฅ เคญเฅ เคฐเคฆเฅเคฆ เคเคฟเคฏเคพ เคเคพ เคธเคเคคเคพ เคนเฅ, เคเคฐ เคเคธเฅ เคชเฅเคฐเฅ เคคเคฐเคน เคฏเคพ เคนเคฐ เคนเฅเคธเฅเค เคเฅ เคฒเคฟเค เค
เคฒเค เคธเฅ เคฌเคเคฆ เคเคฟเคฏเคพ เคเคพ เคธเคเคคเคพ เคนเฅเฅค
-**เคชเคฐเคธเคฟเคธเฅเคเฅเคเค เคเฅเคฌ:**
-เคเคชเคฏเฅเคเคเคฐเฅเคคเคพ เคชเฅเคฐเฅเคซเคผเคพเคเคฒ เคฎเฅเค เคธเคเฅเคทเคฎ เคนเฅเคจเฅ เคชเคฐ SSH เคธเฅเคถเคจ เคเคฐ เคเฅเคฌ เคกเคฟเคตเคพเคเคธ/เคฐเฅเคซเฅเคฐเฅเคถ เคเฅ เคชเคพเคฐ เคเฅเคฒเฅ เคฐเคนเคคเฅ เคนเฅเคเฅค
+**เคธเคคเฅเคฐ เคฐเคฟเคเฅเคฐเฅเคกเคฟเคเค เคเคฐ เคฒเฅเค:**
+เคเคฐเฅเคฎเคฟเคจเคฒ, RDP เคเคฐ VNC เคธเคคเฅเคฐ เคฐเคฟเคเฅเคฐเฅเคก เคเคฐเฅเค เคเคฐ เคฌเคพเคฆ เคฎเฅเค เคฆเฅเคเฅเคเฅค เคธเคคเฅเคฐ เคเฅ เคธเคพเคฆเฅ เคเฅเคเฅเคธเฅเค เคฒเฅเค เคกเคพเคเคจเคฒเฅเคก เคเคฐเฅเค, เคเคฐ เคเคจเฅเคเฅเคถเคจ เคฒเฅเค เคฆเฅเคเคเคฐ เคเคพเคจเฅเค เคเคฟ เคเฅเคกเคผเคคเฅ เคธเคฎเคฏ เค
เคธเคฒ เคฎเฅเค เคเฅเคฏเคพ เคนเฅเคเฅค
+
+
+
+
+**เคธเฅเคฐเคฟเคฏเคฒ เคเคจเฅเคเฅเคถเคจ:**
+เคฐเคพเคเคเคฐ, เคธเฅเคตเคฟเค เคเคฐ เคฎเคพเคเคเฅเคฐเฅเคเคเคเฅเคฐเฅเคฒเคฐ เคเฅเคธเฅ เคธเฅเคฐเคฟเคฏเคฒ เคเคชเคเคฐเคฃเฅเค เคธเฅ เคฌเฅเคฐเคพเคเคเคผเคฐ เคฏเคพ เคกเฅเคธเฅเคเคเฅเคช เคเคช เคธเฅ เคฌเคพเคค เคเคฐเฅเคเฅค เคฌเฅเคก เคฐเฅเค, เคกเฅเคเคพ เคฌเคฟเค, เคธเฅเคเฅเคช เคฌเคฟเค เคเคฐ เคชเฅเคฐเคฟเคเฅ เคธเฅเค เคเคฐเฅเคเฅค เคธเคนเคฏเฅเคเฅ เคฌเฅเคฐเคพเคเคเคผเคฐเฅเค เคฎเฅเค Web Serial API เคเคฐ เคกเฅเคธเฅเคเคเฅเคช เคเคช เคฎเฅเค เคฎเฅเคฒ เคฌเฅเคเคเคเคก เคเคธเฅเคคเฅเคฎเคพเคฒ เคนเฅเคคเคพ เคนเฅเฅค
+
+
+
+
+
+
+**Tailscale:**
+เค
เคชเคจเฅ tailnet เคธเฅ เคกเคฟเคตเคพเคเคธ เคฒเคพเคเคฐ เคเฅเค เคนเฅ เคเฅเคฒเคฟเค เคฎเฅเค เคนเฅเคธเฅเค เคเฅ เคฐเฅเคช เคฎเฅเค เคเฅเคกเคผเฅเค, เคเคฐ Tailscale SSH เคธเฅ เคเฅเคกเคผเฅเค เคคเคพเคเคฟ เคชเคนเฅเคเค เคเคพ เคเคพเคฎ เคเคชเคเฅ tailnet เคเฅ ACL เคธเคเคญเคพเคฒเฅเค เคเคฐ เคเฅเค เคเฅเคฐเฅเคกเฅเคเคถเคฟเคฏเคฒ เคธเคนเฅเคเคจเคพ เคจ เคชเคกเคผเฅเฅค Headscale เคเคฐ เค
เคชเคจเฅ เคเคเคกเคชเฅเคเคเค เคญเฅ เคเคฒเคคเฅ เคนเฅเคเฅค
+
+
+
+
+**Proxmox:**
+เคนเฅเคธเฅเค เคธเฅเคงเฅ เคเคฟเคธเฅ Proxmox เคเคเคธเฅเคเฅเคเคธ เคธเฅ เคฒเคพเคเค, เคเคฐ เคจเฅเคก เคคเคฅเคพ เคเฅเคธเฅเค เคเฅ เคเคเคเคกเคผเฅ, เคเคฟเคจเคฎเฅเค CPU, เคฎเฅเคฎเฅเคฐเฅ เคเคฐ เคธเฅเคเฅเคฐเฅเค เคถเคพเคฎเคฟเคฒ เคนเฅเค, เค
เคฒเค เคเฅเคฌ เคฎเฅเค เคฆเฅเคเฅเคเฅค
+
+
+
+
+
+
+**เคตเคฐเฅเคเคธเฅเคชเฅเคธ เคเคฐ เคเฅเคฌ:**
+เคเฅเคฌ เคเคพ เคเค เคธเฅเค เคเคจเคเฅ เคธเฅเคชเฅเคฒเคฟเค เคฒเฅเคเคเค เคเฅ เคธเคพเคฅ เคธเคนเฅเคเฅเค เคเคฐ เคชเฅเคฐเคพ เคเคพ เคชเฅเคฐเคพ เคเค เคเฅเคฒเคฟเค เคฎเฅเค เคซเคฟเคฐ เคเฅเคฒเฅเคเฅค Termix เคเคชเคเคพ เคชเคฟเคเคฒเคพ เคธเคคเฅเคฐ เคญเฅ เคฏเคพเคฆ เคฐเคเคคเคพ เคนเฅ, เคเคธเคฒเคฟเค เคชเฅเค เคฐเฅเคซเคผเฅเคฐเฅเคถ เคเคฐเคจเฅ เคชเคฐ เคเคฐ เคฆเฅเคธเคฐเฅ เคกเคฟเคตเคพเคเคธ เคชเคฐ เคญเฅ เคเคชเคเฅ เคเฅเคฌ เคฒเฅเค เคเคคเฅ เคนเฅเคเฅค
+
+
+
+
+**เคจเคฟเคฐเฅเคฆเฅเคถเคฟเคค เคธเฅเคเค
เคช:**
+เคเค เคเฅเคเคพ เคธเคพ เคธเฅเคเค
เคช เคเคชเคเฅ เคเคเคเคฐเคซเคผเฅเคธ เคชเฅเคฐเฅเคธเฅเค, เคฅเฅเคฎ, เคฎเคจเคเคพเคนเฅ เคธเฅเคตเคฟเคงเคพเคเค เคเคฐ เคชเคนเคฒเคพ เคนเฅเคธเฅเค เคเฅเคจเคจเฅ เคฎเฅเค เคฎเคฆเคฆ เคเคฐเคคเคพ เคนเฅเฅค เคธเคฐเคฒ เคฎเฅเคก เคตเคน เคธเคฌ เคเคฟเคชเคพ เคฆเฅเคคเคพ เคนเฅ เคเฅ เคเคช เคเคธเฅเคคเฅเคฎเคพเคฒ เคจเคนเฅเค เคเคฐเคคเฅ, เคเคฐ เคเคช เคธเฅเคเค
เคช เคฆเฅเคฌเคพเคฐเคพ เคเคฒเคพ เคธเคเคคเฅ เคนเฅเค เคฏเคพ เคชเฅเคฐเฅเคธเฅเค เคเคญเฅ เคญเฅ เคฌเคฆเคฒ เคธเคเคคเฅ เคนเฅเคเฅค
+
+
+
+
+
+
+**เคธเฅเคตเคคเคเคคเฅเคฐ เคกเฅเคธเฅเคเคเฅเคช เคเคช เคเคฐ เคธเคฟเคเค:**
+เคกเฅเคธเฅเคเคเฅเคช เคเคช เค
เคชเคจเฅ เคฒเฅเคเคฒ เคฌเฅเคเคเคเคก เคเคฐ เคกเฅเคเคพเคฌเฅเคธ เคเฅ เคธเคพเคฅ เคฌเคฟเคจเคพ เคเคฟเคธเฅ เคธเคฐเฅเคตเคฐ เคเฅ เค
เคเฅเคฒเฅ เคเคฒเคคเคพ เคนเฅเฅค เคเคช เคเคธเฅ เคเคฟเคธเฅ Termix เคธเคฐเฅเคตเคฐ เคธเฅ เคเฅเคกเคผเคเคฐ เคนเฅเคธเฅเค, เคเฅเคฐเฅเคกเฅเคเคถเคฟเคฏเคฒ, เคธเฅเคจเคฟเคชเฅเค เคตเคเฅเคฐเคน เคฆเฅเคจเฅเค เคคเคฐเคซเคผ เคธเคฟเคเค เคเคฐ เคธเคเคคเฅ เคนเฅเค, เคเคฐ เคเฅเคจ เคธเคเคคเฅ เคนเฅเค เคเคฟ เคเคจเฅเคเฅเคถเคจ เคเคชเคเฅ เคฎเคถเฅเคจ เคธเฅ เคถเฅเคฐเฅ เคนเฅเค เคฏเคพ เคธเคฐเฅเคตเคฐ เคเฅ เคฐเคพเคธเฅเคคเฅเฅค
+
+
+
+
+**เคเคฎเคพเคเคก เคฒเคพเคเคจ:**
+เคเคชเคเฅ เคถเฅเคฒ เคเคฐ เคธเฅเคเฅเคฐเคฟเคชเฅเค เคเฅ เคฒเคฟเค `termix` CLIเฅค เคเคฐเฅเคฎเคฟเคจเคฒ เคเฅเคฒเฅเค, เคเคฟเคธเฅ เคเค เคนเฅเคธเฅเค เคฏเคพ เคชเฅเคฐเฅ เคซเคผเฅเคฒเฅเค เคชเคฐ เคเคฎเคพเคเคก เคเคฒเคพเคเค, SFTP เคธเฅ เคซเคผเคพเคเคฒเฅเค เคญเฅเคเฅเค, เคเคฐ เคนเฅเคธเฅเค, เคธเฅเคจเคฟเคชเฅเค เคต เคเฅเคฐเฅเคกเฅเคเคถเคฟเคฏเคฒ เคธเคเคญเคพเคฒเฅเคเฅค `npm install -g @termix-cli/cli` เคธเฅ เคเคเคธเฅเคเฅเคฒ เคเคฐเฅเค เคฏเคพ เค
เคฒเค เคฌเคพเคเคจเคฐเฅ เคฒเฅเคเฅค [CLI เคฆเคธเฅเคคเคพเคตเฅเคเคผ](https://docs.termix.site/cli) เคฆเฅเคเฅเคเฅค
+
+
+
+
+
+
+**เคธเฅเคฐเคเฅเคทเคพ:**
+เคชเคพเคธเคตเคฐเฅเคก, เคเฅเคเคเคฟเคฏเคพเค เคเคฐ เคฌเคพเคเฅ เคเฅเคชเคจเฅเคฏ เคเคพเคจเคเคพเคฐเฅ เคนเคฐ เคเคชเคฏเฅเคเคเคฐเฅเคคเคพ เคเฅ เคฒเคฟเค เค
เคฒเค เคธเฅ เคเคจเฅเคเฅเคฐเคฟเคชเฅเค เคนเฅเคคเฅ เคนเฅ, เคเคฐ เคกเฅเคเคพเคฌเฅเคธ เคซเคผเคพเคเคฒเฅเค เคญเฅ เคกเคฟเคธเฅเค เคชเคฐ เคเคจเฅเคเฅเคฐเคฟเคชเฅเค เคเฅ เคเคพ เคธเคเคคเฅ เคนเฅเคเฅค เคฏเคน เคเฅเคธเฅ เคเคพเคฎ เคเคฐเคคเคพ เคนเฅ, เคฏเคน [เคฆเคธเฅเคคเคพเคตเฅเคเคผ](https://docs.termix.site/security) เคฎเฅเค เคฆเฅเคเฅเคเฅค
**เคญเคพเคทเคพเคเค:**
-เคฒเคเคญเค 30 เคญเคพเคทเคพเคเค เคเคพ เคฌเคฟเคฒเฅเค-เคเคจ เคธเคชเฅเคฐเฅเค ([Crowdin](https://docs.termix.site/translations) เคฆเฅเคตเคพเคฐเคพ เคชเฅเคฐเคฌเคเคงเคฟเคค)เฅค
+เคฒเคเคญเค 30 เคญเคพเคทเคพเคเค เคชเคนเคฒเฅ เคธเฅ เคฎเฅเคเฅเคฆ เคนเฅเค, เคเคฟเคจเฅเคนเฅเค [Crowdin](https://docs.termix.site/translations) เคธเฅ เคธเคเคญเคพเคฒเคพ เคเคพเคคเคพ เคนเฅเฅค
@@ -196,20 +252,23 @@ Termix เคเค เคเคชเคจ-เคธเฅเคฐเฅเคธ, เคนเคฎเฅเคถเคพ เคเฅ เคฒเคฟเค เคฎเฅ
-เค
เคงเคฟเค เคตเคฟเคถเฅเคทเคคเคพเคเค
+เคเคฐ เคญเฅ เคตเคฟเคถเฅเคทเคคเคพเคเค
-- **เคกเฅเคถเคฌเฅเคฐเฅเคก** - เค
เคชเคจเฅ เคกเฅเคถเคฌเฅเคฐเฅเคก เคชเคฐ เคเค เคจเคเคผเคฐ เคฎเฅเค เคธเคฐเฅเคตเคฐ เคเฅ เคเคพเคจเคเคพเคฐเฅ เคฆเฅเคเฅเค
-- **API เคเฅเคเคเคฟเคฏเคพเค** - เคเคเฅเคฎเฅเคถเคจ/CI เคเฅ เคฒเคฟเค เคเคชเคฏเฅเค เคนเฅเคคเฅ เคธเคฎเคพเคชเฅเคคเคฟ เคคเคฟเคฅเคฟเคฏเฅเค เคเฅ เคธเคพเคฅ เคเคชเคฏเฅเคเคเคฐเฅเคคเคพ-เคธเฅเคเฅเคชเฅเคก API เคเฅเคเคเคฟเคฏเคพเค เคฌเคจเคพเคเค
-- **เคกเฅเคเคพ เคเคเฅเคธเคชเฅเคฐเฅเค/เคเคฎเฅเคชเฅเคฐเฅเค** - SSH เคนเฅเคธเฅเค, เคเฅเคฐเฅเคกเฅเคเคถเคฟเคฏเคฒ เคเคฐ เคซเคผเคพเคเคฒ เคฎเฅเคจเฅเคเคฐ เคกเฅเคเคพ เคเคเฅเคธเคชเฅเคฐเฅเค เคเคฐ เคเคฎเฅเคชเฅเคฐเฅเค เคเคฐเฅเค
-- **เคธเฅเคตเคเคพเคฒเคฟเคค SSL เคธเฅเคเค
เคช** - HTTPS เคฐเฅเคกเคพเคฏเคฐเฅเคเฅเค เคเฅ เคธเคพเคฅ เคฌเคฟเคฒเฅเค-เคเคจ SSL เคธเคฐเฅเคเคฟเคซเคผเคฟเคเฅเค เคเคจเคฐเฅเคถเคจ เคเคฐ เคชเฅเคฐเคฌเคเคงเคจ
-- **เคเคงเฅเคจเคฟเค UI** - React, Tailwind CSS, เคเคฐ Shadcn เคธเฅ เคฌเคจเคพ เคธเคพเคซเคผ เคกเฅเคธเฅเคเคเฅเคช/เคฎเฅเคฌเคพเคเคฒ-เคซเคผเฅเคฐเฅเคเคกเคฒเฅ เคเคเคเคฐเคซเคผเฅเคธเฅค เคฒเคพเคเค, เคกเคพเคฐเฅเค, เคกเฅเคฐเฅเคเฅเคฒเคพ เคเคฆเคฟ เคธเคนเคฟเคค เคเค เค
เคฒเค-เค
เคฒเค UI เคฅเฅเคฎ เคเฅ เคฌเฅเค เคเฅเคจเฅเคเฅค เคเคฟเคธเฅ เคญเฅ เคเคจเฅเคเฅเคถเคจ เคเฅ เคซเคผเฅเคฒ-เคธเฅเคเฅเคฐเฅเคจ เคฎเฅเค เคเฅเคฒเคจเฅ เคเฅ เคฒเคฟเค URL เคฐเฅเค เคเคพ เคเคชเคฏเฅเค เคเคฐเฅเคเฅค
-- **เคเคฎเคพเคเคก เคเคคเคฟเคนเคพเคธ** - เคชเคนเคฒเฅ เคเคฒเคพเค เคเค SSH เคเคฎเคพเคเคก เคเคพ เคเคเฅ-เคเคฎเฅเคชเฅเคฒเฅเค เคเคฐ เคฆเฅเคถเฅเคฏ
-- **เคเฅเคตเคฟเค เคเคจเฅเคเฅเค** - เคเคจเฅเคเฅเคถเคจ เคกเฅเคเคพ เคธเคนเฅเคเฅ เคฌเคฟเคจเคพ เคธเคฐเฅเคตเคฐ เคธเฅ เคเคจเฅเคเฅเค เคเคฐเฅเค
-- **เคเคฎเคพเคเคก เคชเฅเคฒเฅเค** - เค
เคชเคจเฅ เคเฅเคฌเฅเคฐเฅเคก เคธเฅ SSH เคเคจเฅเคเฅเคถเคจ เคคเค เคคเฅเคตเคฐเคฟเคค เคชเคนเฅเคเค เคเฅ เคฒเคฟเค เคฌเคพเคเค Shift เคเฅ เคฆเฅ เคฌเคพเคฐ เคเฅเคช เคเคฐเฅเค
-- **Proxmox เคเคเฅเคเคฐเคฃ** - เค
เคชเคจเฅ Proxmox เคเคเคธเฅเคเฅเคเคธ เคธเฅ Termix เคฎเฅเค เคนเฅเคธเฅเค เคธเฅเคตเคเคพเคฒเคฟเคค เคฐเฅเคช เคธเฅ เคเฅเคกเคผเฅเค
-- **SSH เคธเฅเคตเคฟเคงเคพเคเค เคธเฅ เคญเคฐเคชเฅเคฐ** - เคเคฎเฅเคช เคนเฅเคธเฅเค, Warpgate, TOTP เคเคงเคพเคฐเคฟเคค เคเคจเฅเคเฅเคถเคจ, SOCKS5, เคนเฅเคธเฅเค เคเฅ เคตเฅเคฐเคฟเคซเคผเคฟเคเฅเคถเคจ, เคชเคพเคธเคตเคฐเฅเคก เคเคเฅเคซเคผเคฟเคฒ, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, เคชเฅเคฐเฅเค เคจเฅเคเคฟเคเค, เคเคฐเฅเคฎเคฟเคจเคฒ เคฒเฅเคเคฟเคเค, SSH เคเคเฅเคเค เคซเคผเฅเคฐเคตเคฐเฅเคกเคฟเคเค, Bitwarden SSH เคเคเฅเคเค, HashiCorp Vault SSH เคธเคฟเคเฅเคจเคฟเคเค, เคเคฐ เค
เคจเฅเคฏ เคเคพ เคธเคชเฅเคฐเฅเคเฅค
-- **Termix ID** - Termix เคฎเฅเค เคฌเคฟเคฒเฅเค-เคเคจ sshid.io เคเฅ เคธเคฎเคเคเฅเคทเฅค เคเค เคนเฅเคเคกเคฒ เคเฅเคฒเฅเคฎ เคเคฐเฅเค, เค
เคชเคจเฅ เคธเคพเคฐเฅเคตเคเคจเคฟเค SSH เคเฅเคเคเคฟเคฏเฅเค เคเฅ เคเค เคฐเคฟเคเคผเฅเคฒเฅเคตเคฐ URL เคชเคฐ เคชเฅเคฐเคเคพเคถเคฟเคค เคเคฐเฅเค, เคเคฐ SSH เคธเคฐเฅเคเคฟเคซเคผเคฟเคเฅเค เคเคพเคฐเฅ เคเคฐเคจเฅ เคเฅ เคฒเคฟเค เคฌเคฟเคฒเฅเค-เคเคจ CA เคเคพ เคเคชเคฏเฅเค เคเคฐเฅเคเฅค
+- **เคกเฅเคถเคฌเฅเคฐเฅเคก** - เคเคชเคเฅ เคธเคฐเฅเคตเคฐ เคเค เคจเคเคผเคฐ เคฎเฅเค, เคเคธเฅ เคเคพเคฐเฅเคก เคเฅ เคธเคพเคฅ เคเคฟเคจเฅเคนเฅเค เคเคช เคเฅเคฆ เคเคฎเคพเคคเฅ เคนเฅเค
+- **เคจเฅเคเคตเคฐเฅเค เคเฅเคฐเคพเคซเคผ** - เคเคชเคเฅ เคนเฅเคธเฅเค เคธเฅ เคฌเคจเคพ เคเคชเคเคพ เคนเฅเคฎเคฒเฅเคฌ เคเคพ เคจเคเฅเคถเคพ, เคฒเคพเคเคต เคธเฅเคฅเคฟเคคเคฟ เคเฅ เคธเคพเคฅ
+- **tmux เคฎเฅเคจเคฟเคเคฐ** - tmux เคเฅ เคธเคคเฅเคฐ, เคตเคฟเคเคกเฅ เคเคฐ เคชเฅเคจ เคฆเฅเคเฅเค, เคเคฒเค เคเคฐ เคเฅเค เคเฅ เคธเคพเคฅ
+- **API เคเฅเคเคเคฟเคฏเคพเค** - เคธเฅเคเฅเคฐเคฟเคชเฅเค เคเคฐ CI เคเฅ เคฒเคฟเค, เคธเคฎเคพเคชเฅเคคเคฟ เคคเคฟเคฅเคฟ เคตเคพเคฒเฅ เคเคชเคฏเฅเคเคเคฐเฅเคคเคพ-เคตเคฟเคถเคฟเคทเฅเค เคเฅเคเคเคฟเคฏเคพเค
+- **เคจเคฟเคฐเฅเคฏเคพเคค เคเคฐ เคเคฏเคพเคค** - เคนเฅเคธเฅเค, เคเฅเคฐเฅเคกเฅเคเคถเคฟเคฏเคฒ เคเคฐ เคซเคผเคพเคเคฒ เคฎเฅเคจเฅเคเคฐ เคเคพ เคกเฅเคเคพ เค
เคเคฆเคฐ-เคฌเคพเคนเคฐ เคฒเฅ เคเคพเคเค
+- **เค
เคชเคจเฅ เคเคช SSL** - เคชเฅเคฐเคฎเคพเคฃเคชเคคเฅเคฐ เคเคชเคเฅ เคฒเคฟเค เคฌเคจเคคเฅ เคเคฐ เคจเคตเฅเคจเฅเคเฅเคค เคนเฅเคคเฅ เคนเฅเค, HTTPS เคฐเฅเคกเคพเคฏเคฐเฅเคเฅเค เคเฅ เคธเคพเคฅ, เคฏเคพ เค
เคชเคจเฅ เคเฅเคฆ เคเฅ เคฒเคเคพเคเค
+- **เคกเฅเคเคพเคฌเฅเคธ** - เคกเคฟเคซเคผเฅเคฒเฅเค เคฐเฅเคช เคธเฅ SQLite, เคธเคพเคฅ เคฎเฅเค PostgreSQL เคเคฐ MySQL เคญเฅ
+- **เคเคงเฅเคจเคฟเค เคเคเคเคฐเคซเคผเฅเคธ** - เคธเคพเคซเคผ เคธเฅเคฅเคฐเคพ React เคเคเคเคฐเคซเคผเฅเคธ เคเฅ เคกเฅเคธเฅเคเคเฅเคช เคเคฐ เคฎเฅเคฌเคพเคเคฒ เคฆเฅเคจเฅเค เคชเคฐ เคเคฒเคคเคพ เคนเฅ, เคฒเคพเคเค, เคกเคพเคฐเฅเค เคเคฐ Dracula เคเฅเคธเฅ เคฅเฅเคฎ เคเฅ เคธเคพเคฅเฅค เคเฅเค เคญเฅ เคเคจเฅเคเฅเคถเคจ URL เคธเฅ เคชเฅเคฐเฅ เคธเฅเคเฅเคฐเฅเคจ เคฎเฅเค เคเฅเคฒ เคธเคเคคเคพ เคนเฅ
+- **เคเคฎเคพเคเคก เคชเฅเคฒเฅเค** - เคฌเคพเคเค Shift เคฆเฅ เคฌเคพเคฐ เคฆเคฌเคพเคเคฐ เคเฅเคฌเฅเคฐเฅเคก เคธเฅ เคธเฅเคงเฅ เคเคฟเคธเฅ เคนเฅเคธเฅเค เคชเคฐ เคเคพเคเค
+- **เคเฅเคฌเฅเคฐเฅเคก เคถเฅเคฐเฅเคเคเค** - เคเฅเคฌ เคฌเคฆเคฒเคจเคพ, เคฌเคเคฆ เคเคฐเคจเคพ เคเคฐ เคฌเคนเฅเคค เคเฅเค, เคธเคฌ เคฆเฅเคฌเคพเคฐเคพ เคคเคฏ เคเคฟเค เคเคพ เคธเคเคคเฅ เคนเฅเค
+- **Wake-on-LAN** - เคเคฟเคธเฅ เคฎเคถเฅเคจ เคเฅ Termix เคธเฅ เคฏเคพ เคเคเฅเคฎเฅเคถเคจ เคเฅ เคเคฟเคธเฅ เคเคฆเคฎ เคธเฅ เคเคเคพเคเค
+- **เคญเคฐเฅเคธเฅเคฎเคเคฆ เคชเฅเคฐเฅเคเฅเคธเฅ เคธเฅ เคฒเฅเคเคฟเคจ** - เคฐเคฟเคตเคฐเฅเคธ เคชเฅเคฐเฅเคเฅเคธเฅ เคเฅ เคฒเฅเคเคฟเคจ เคธเคเคญเคพเคฒเคจเฅ เคฆเฅเค เคเคฐ เคเคชเคฏเฅเคเคเคฐเฅเคคเคพ เคเฅ เคเคพเคจเคเคพเคฐเฅ เคเคเฅ เคญเฅเคเคจเฅ เคฆเฅเค
+- **เคญเคฐเคชเฅเคฐ SSH เคธเฅเคตเคฟเคงเคพเคเค** - เคเคเคช เคนเฅเคธเฅเค, Warpgate, TOTP เคชเฅเคเคจเคพ, SOCKS5, เคนเฅเคธเฅเค เคเฅเคเคเฅ เคเฅ เคเคพเคเค, เคชเคพเคธเคตเคฐเฅเคก เค
เคชเคจเฅ เคเคช เคญเคฐเคจเคพ, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, เคชเฅเคฐเฅเค เคจเฅเคเคฟเคเค, เคเคฐเฅเคฎเคฟเคจเคฒ เคฒเฅเค, เคเคเฅเคเค เคซเคผเฅเคฐเคตเคฐเฅเคกเคฟเคเค, Bitwarden SSH เคเคเฅเคเค, HashiCorp Vault เคธเฅ SSH เคนเคธเฅเคคเคพเคเฅเคทเคฐ เคเคฐ เคญเฅ เคฌเคนเฅเคค เคเฅเค
+- **Termix ID** - sshid.io เคเฅเคธเคพ เค
เคชเคจเคพ เคฌเคจเคพ เคนเฅเค เคเคเคคเคเคผเคพเคฎเฅค เคเค เคจเคพเคฎ เคฒเฅเค, เค
เคชเคจเฅ เคธเคพเคฐเฅเคตเคเคจเคฟเค เคเฅเคเคเคฟเคฏเคพเค เคเค เคฐเคฟเคเคผเฅเคฒเฅเคตเคฐ URL เคชเคฐ เคฐเคเฅเค, เคเคฐ เค
เคเคฆเคฐ เคฎเฅเคเฅเคฆ CA เคธเฅ SSH เคชเฅเคฐเคฎเคพเคฃเคชเคคเฅเคฐ เคเคพเคฐเฅ เคเคฐเฅเค
@@ -252,9 +311,9 @@ Termix เคเค เคเคชเคจ-เคธเฅเคฐเฅเคธ, เคนเคฎเฅเคถเคพ เคเฅ เคฒเคฟเค เคฎเฅ
## เคเคเคธเฅเคเฅเคฒเฅเคถเคจ
-เคธเคญเฅ เคชเฅเคฒเฅเคเคซเคผเฅเคฐเฅเคฎ เคชเคฐ เคชเฅเคฐเฅเคฃ เคเคเคธเฅเคเฅเคฒเฅเคถเคจ เคจเคฟเคฐเฅเคฆเฅเคถเฅเค เคเฅ เคฒเคฟเค Termix [เคกเฅเคเฅเคธ](https://docs.termix.site/install) เคชเคฐ เคเคพเคเคเฅค
+เคธเคญเฅ เคชเฅเคฒเฅเคเคซเคผเฅเคฐเฅเคฎ เคชเคฐ เคชเฅเคฐเฅ เคเคเคธเฅเคเฅเคฒเฅเคถเคจ เคเคพเคจเคเคพเคฐเฅ เคเฅ เคฒเคฟเค [Termix เคฆเคธเฅเคคเคพเคตเฅเคเคผ](https://docs.termix.site/install) เคฆเฅเคเฅเคเฅค
-เคจเคฎเฅเคจเคพ Docker Compose เคซเคผเคพเคเคฒ (เคฏเคฆเคฟ เคเคช เคฐเคฟเคฎเฅเค เคกเฅเคธเฅเคเคเฅเคช เคธเฅเคตเคฟเคงเคพเคเค เคเคพ เคเคชเคฏเฅเค เคเคฐเคจเฅ เคเฅ เคฏเฅเคเคจเคพ เคจเคนเฅเค เคฌเคจเคพ เคฐเคนเฅ เคนเฅเค เคคเฅ เคเคช `guacd` เคเคฐ เคจเฅเคเคตเคฐเฅเค เคเฅ เคนเคเคพ เคธเคเคคเฅ เคนเฅเค):
+Docker Compose เคซเคผเคพเคเคฒ เคเคพ เคจเคฎเฅเคจเคพ (เค
เคเคฐ เคเคช เคฐเคฟเคฎเฅเค เคกเฅเคธเฅเคเคเฅเคช เคเคธเฅเคคเฅเคฎเคพเคฒ เคจเคนเฅเค เคเคฐเคจเฅ เคตเคพเคฒเฅ เคคเฅ `guacd` เคเคฐ เคจเฅเคเคตเคฐเฅเค เคตเคพเคฒเคพ เคนเคฟเคธเฅเคธเคพ เคนเคเคพ เคธเคเคคเฅ เคนเฅเค):
```yaml
services:
@@ -291,11 +350,37 @@ networks:
driver: bridge
```
+### เคเคฎเคพเคเคก เคฒเคพเคเคจ
+
+Termix เคฎเฅเค CLI เคญเฅ เคนเฅ, เคคเคพเคเคฟ เคเคช เคเคฐเฅเคฎเคฟเคจเคฒ เคธเฅ เค
เคชเคจเฅ เคธเคฐเฅเคตเคฐ เคธเคเคญเคพเคฒ เคธเคเฅเค เคเคฐ Termix เคเฅ เค
เคชเคจเฅ เคธเฅเคเฅเคฐเคฟเคชเฅเค เคฎเฅเค เคเคธเฅเคคเฅเคฎเคพเคฒ เคเคฐ เคธเคเฅเคเฅค
+
+```bash
+npm install -g @termix-cli/cli
+termix login --url https://termix.example.com
+termix ssh 1
+```
+
+เคฏเคน เคเคฐเฅเคฎเคฟเคจเคฒ เคเฅเคฒ เคธเคเคคเคพ เคนเฅ, เคเค เคนเฅเคธเฅเค เคฏเคพ เคชเฅเคฐเฅ เคซเคผเฅเคฒเฅเค เคชเคฐ เคเคฎเคพเคเคก เคเคฒเคพ เคธเคเคคเคพ เคนเฅ, SFTP เคธเฅ เคซเคผเคพเคเคฒเฅเค เคฒเฅ เคเคพ เคธเคเคคเคพ เคนเฅ, เคเคฐ เคนเฅเคธเฅเค, เคธเฅเคจเคฟเคชเฅเค เคต เคเฅเคฐเฅเคกเฅเคเคถเคฟเคฏเคฒ เคธเคเคญเคพเคฒ เคธเคเคคเคพ เคนเฅเฅค เคชเฅเคฐเคพ เคฆเคธเฅเคคเคพเคตเฅเคเคผ [docs.termix.site/cli](https://docs.termix.site/cli) เคชเคฐ เคนเฅเฅค
+
+### เคเฅเคฒเคพเคเคก เคนเฅเคธเฅเคเคฟเคเค
+
+เคเคช Termix เคธเคฐเฅเคตเคฐ เคเฅ เค
เคชเคจเฅ เคจเฅเคเคตเคฐเฅเค เคเฅ เคฌเคเคพเคฏ เคเคฟเคธเฅ VPS เคชเคฐ เคญเฅ เคเคฒเคพ เคธเคเคคเฅ เคนเฅเคเฅค เค
เคเคฐ Termix เคเคธเฅ เคจเฅเคเคตเคฐเฅเค เคชเคฐ เคเคฒ เคฐเคนเคพ เคนเฅ เคเคฟเคธเฅ เคตเคน เคธเคเคญเคพเคฒเคคเคพ เคนเฅ, เคคเฅ เคเคกเคผเคฌเคกเคผเฅ เคนเฅเคจเฅ เคชเคฐ เคตเคน เคญเฅ เคธเคพเคฅ เคนเฅ เคฌเคเคฆ เคนเฅ เคเคพเคเคเคพ, เค เฅเค เคเคธเฅ เคตเคเฅเคค เคเคฌ เคเคชเคเฅ เคเคธเฅ เค เฅเค เคเคฐเคจเฅ เคเฅ เคฒเคฟเค เคเคพเคนเคฟเคเฅค เคฌเคพเคนเคฐ เคเคฒเคพเคจเฅ เคชเคฐ เคตเคน เคนเคฎเฅเคถเคพ เคชเคนเฅเคเค เคฎเฅเค เคฐเคนเคคเคพ เคนเฅ, เคเค เคธเฅเคฅเคฟเคฐ IP เคฆเฅเคคเคพ เคนเฅ, เคเคฐ เคฌเคฟเคจเคพ VPN เคฏเคพ เคชเฅเคฐเฅเค เคซเคผเฅเคฐเคตเคฐเฅเคก เคเฅ เคเคนเฅเค เคธเฅ เคญเฅ เคชเคนเฅเคเค เคฎเคฟเคฒเคคเฅ เคนเฅเฅค
+
+[GINERNET](https://docs.termix.site/install/ginernet) Termix เคเฅ เคชเฅเคฐเคพเคฏเฅเคเคฟเคค เคเคฐเคคเคพ เคนเฅ, เคเคฐ เคฆเคธเฅเคคเคพเคตเฅเคเคผ เคฎเฅเค เคเคจเคเฅ VPS เคชเฅเคฒเฅเคเคซเคผเฅเคฐเฅเคฎ เคชเคฐ เคคเฅเคจเคพเคคเฅ เคเฅ เคเคฆเคฎ-เคฆเคฐ-เคเคฆเคฎ เคเคพเคเคก เคฎเฅเคเฅเคฆ เคนเฅเฅค
+
+
+
+## เคเฅเคฒเฅเคฎเฅเคเฅเคฐเฅ
+
+Termix เคฆเคฟเคจ เคฎเฅเค เคเค เคฌเคพเคฐ เคเค เคเฅเคเคพ เคธเคพ เคเฅเคฎเคจเคพเคฎ เคธเคเคเฅเคค เคญเฅเคเคคเคพ เคนเฅ, เคคเคพเคเคฟ เคฎเฅเคเฅ เคชเคคเคพ เคเคฒเฅ เคเคฟ เคเคฟเคคเคจเฅ เคเคเคธเฅเคเฅเคเคธ เคเคฒ เคฐเคนเฅ เคนเฅเค เคเคฐ เคเฅเคจ เคธเฅ เคธเฅเคตเคฟเคงเคพเคเค เคธเค เคฎเฅเค เคเคธเฅเคคเฅเคฎเคพเคฒ เคนเฅเคคเฅ เคนเฅเคเฅค เคเคธเคฎเฅเค เคเค เคฌเฅเคคเคฐเคคเฅเคฌ เคเคเคธเฅเคเฅเคเคธ เคเคเคกเฅ, เคเคชเคเฅ เคชเคพเคธ เคเคฟเคคเคจเฅ เคเคชเคฏเฅเคเคเคฐเฅเคคเคพ เคเคฐ เคนเฅเคธเฅเค เคนเฅเค, เคเคช เคเคพ เคธเคเคธเฅเคเคฐเคฃ, เคเคฐ เคชเคฟเคเคฒเฅ 24 เคเคเคเฅ เคฎเฅเค เคเคธเฅเคคเฅเคฎเคพเคฒ เคนเฅเค เคธเฅเคตเคฟเคงเคพเคเค (เคเคฐเฅเคฎเคฟเคจเคฒ, เคซเคผเคพเคเคฒ เคฎเฅเคจเฅเคเคฐ, เคเคจเคฒ, docker เคเคฆเคฟ) เคนเฅเคคเฅ เคนเฅเคเฅค เคเคธเคฎเฅเค เคเคญเฅ เคญเฅ เคเคชเคฏเฅเคเคเคฐเฅเคคเคพ เคจเคพเคฎ, เคนเฅเคธเฅเค เคจเคพเคฎ, IP เคชเคคเฅ, เคเฅเคฐเฅเคกเฅเคเคถเคฟเคฏเคฒ เคฏเคพ เคเคธเฅ เคเฅเค เคเฅเคเคผ เคจเคนเฅเค เคนเฅเคคเฅ เคเฅ เคเคชเคเฅ เคฏเคพ เคเคชเคเฅ เคธเคฐเฅเคตเคฐ เคเฅ เคชเคนเคเคพเคจ เคฌเคคเคพเคเฅค
+
+เคฏเคน เคกเคฟเคซเคผเฅเคฒเฅเค เคฐเฅเคช เคธเฅ เคเคพเคฒเฅ เคฐเคนเคคเคพ เคนเฅเฅค เคเคธเฅ เคเคกเคฎเคฟเคจ เคธเฅเคเคฟเคเคเฅเคธ เคฎเฅเค เคธเคพเคฎเคพเคจเฅเคฏ เคเฅ เค
เคเคคเคฐเฅเคเคค เคฌเคเคฆ เคเคฐเฅเค, เคฏเคพ Termix เคถเฅเคฐเฅ เคเคฐเคจเฅ เคธเฅ เคชเคนเคฒเฅ เคนเฅ `ENABLE_TELEMETRY=false` เคธเฅเค เคเคฐ เคฆเฅเคเฅค
+
## เคฆเคพเคจ เคเคฐเฅเค
-Termix เคฎเฅเคซเคผเฅเคค เคเคฐ เคเคชเคจ เคธเฅเคฐเฅเคธ เคนเฅ, เคฌเคฟเคจเคพ เคเคฟเคธเฅ เคธเคฌเฅเคธเคเฅเคฐเคฟเคชเฅเคถเคจ เคฏเคพ เคชเฅเคก เคชเฅเคฒเคพเคจ เคเฅเฅค เคฏเคฆเคฟ เคเคชเคเฅ เคฏเคน เคเคชเคฏเฅเคเฅ เคฒเคเคคเคพ เคนเฅ, เคคเฅ เคธเคฐเฅเคตเคฐ เคฒเคพเคเคค, เคกเฅเคฎเฅเคจ เคเคฐ เคตเคฟเคเคพเคธ เคธเคฎเคฏ เคเฅ เคเคตเคฐ เคเคฐเคจเฅ เคฎเฅเค เคฎเคฆเคฆ เคเฅ เคฒเคฟเค เคฆเคพเคจ เคเคฐเคจเฅ เคชเคฐ เคตเคฟเคเคพเคฐ เคเคฐเฅเคเฅค เคฆเคพเคจ SAML, Kubernetes, เคเคฐ Agent เคธเคชเฅเคฐเฅเค เคเฅเคธเฅ เคธเฅเคตเคฟเคงเคพเคเค เคเฅ เคจเคฟเคฐเฅเคฎเคพเคฃ เคเฅ เคฒเคฟเค เคเคตเคถเฅเคฏเค เคถเฅเคง เคเคฐ เคธเฅเคเคจเฅ เคฎเฅเค เคฒเคเคจเฅ เคตเคพเคฒเฅ เคธเคฎเคฏ เคเฅ เคตเคฟเคคเฅเคค เคชเฅเคทเคฟเคค เคเคฐเคจเฅ เคฎเฅเค เคญเฅ เคฎเคฆเคฆ เคเคฐเคคเฅ เคนเฅเคเฅค เคจเฅเคเฅ เคชเฅเคฐเคเคคเคฟ เคฆเฅเคเฅเค เคเคฐ เคฆเคพเคจ เคเคฐเฅเคเฅค
+Termix เคฎเฅเคซเคผเฅเคค เคเคฐ เคเคชเคจ เคธเฅเคฐเฅเคธ เคนเฅ, เคจ เคเฅเค เคธเคฆเคธเฅเคฏเคคเคพ เคนเฅ เคจ เคเฅเค เคชเฅเคก เคชเฅเคฒเคพเคจเฅค เค
เคเคฐ เคฏเคน เคเคชเคเฅ เคเคพเคฎ เคเคคเคพ เคนเฅ, เคคเฅ เคธเคฐเฅเคตเคฐ, เคกเฅเคฎเฅเคจ เคเคฐ เคตเคฟเคเคพเคธ เคเฅ เคธเคฎเคฏ เคฎเฅเค เคฎเคฆเคฆ เคเฅ เคฒเคฟเค เคฆเคพเคจ เคเคฐเคจเฅ เคชเคฐ เคตเคฟเคเคพเคฐ เคเคฐเฅเคเฅค เคฆเคพเคจ เคธเฅ SAML, Kubernetes เคเคฐ เคเคเฅเคเค เคธเคชเฅเคฐเฅเค เคเฅเคธเฅ เคธเฅเคตเคฟเคงเคพเคเค เคฌเคจเคพเคจเฅ เคเฅ เคฒเคฟเค เคเคผเคฐเฅเคฐเฅ เคถเฅเคง เคเคฐ เคธเฅเคเคจเฅ เคเคพ เคธเคฎเคฏ เคญเฅ เคฎเคฟเคฒเคคเคพ เคนเฅเฅค เคจเฅเคเฅ เคชเฅเคฐเคเคคเคฟ เคฆเฅเคเฅเค เคเคฐ เคฆเคพเคจ เคเคฐเฅเคเฅค
[เคฆเคพเคจ เคเคฐเฅเค](https://donate.termix.site/)
@@ -303,7 +388,7 @@ Termix เคฎเฅเคซเคผเฅเคค เคเคฐ เคเคชเคจ เคธเฅเคฐเฅเคธ เคนเฅ, เคฌเคฟเคจเคพ
## เคชเฅเคฐเคพเคฏเฅเคเค
-เคตเคฟเคเคพเคธ เคเฅ เคธเคฎเคฐเฅเคฅเคจ เคฆเฅเคจเฅ เคเฅ เคฒเคฟเค เคชเฅเคก เคชเฅเคฒเฅเคธเคฎเฅเคเค เคฎเฅเค เคฐเฅเคเคฟ เคนเฅ? [mail@termix.site](mailto:mail@termix.site) เคชเคฐ เคเคฎเฅเคฒ เคเคฐเฅเคเฅค
+เคตเคฟเคเคพเคธ เคฎเฅเค เคธเคนเคฏเฅเค เคเฅ เคฒเคฟเค เคชเฅเคก เคชเฅเคฒเฅเคธเคฎเฅเคเค เคฎเฅเค เคฐเฅเคเคฟ เคนเฅ? [mail@termix.site](mailto:mail@termix.site) เคชเคฐ เคเคฎเฅเคฒ เคเคฐเฅเคเฅค
@@ -325,10 +410,6 @@ Termix เคฎเฅเคซเคผเฅเคค เคเคฐ เคเคชเคจ เคธเฅเคฐเฅเคธ เคนเฅ, เคฌเคฟเคจเคพ
-
-
-
-
@@ -340,14 +421,17 @@ Termix เคฎเฅเคซเคผเฅเคค เคเคฐ เคเคชเคจ เคธเฅเคฐเฅเคธ เคนเฅ, เคฌเคฟเคจเคพ
-
+
+
+
+
## เคธเคนเคพเคฏเคคเคพ
-เคฏเคฆเคฟ เคเคชเคเฅ เคธเคนเคพเคฏเคคเคพ เคเคพเคนเคฟเค เคฏเคพ Termix เคเฅ เคฒเคฟเค เคเคฟเคธเฅ เคตเคฟเคถเฅเคทเคคเคพ เคเคพ เค
เคจเฅเคฐเฅเคง เคเคฐเคจเคพ เคเคพเคนเคคเฅ เคนเฅเค, เคคเฅ [เคเคถเฅเคฏเฅเคเคผ](https://github.com/Termix-SSH/Support/issues) เคชเฅเค เคชเคฐ เคเคพเคเค, เคฒเฅเค เคเคจ เคเคฐเฅเค, เคเคฐ `New Issue` เคฆเคฌเคพเคเคเฅค เคเฅเคชเคฏเคพ เค
เคชเคจเฅ เคเคถเฅเคฏเฅ เคฎเฅเค เคฏเคฅเคพเคธเคเคญเคต เคตเคฟเคธเฅเคคเฅเคค เคตเคฟเคตเคฐเคฃ เคฆเฅเค, เค
เคงเคฟเคฎเคพเคจเคคเค เค
เคเคเฅเคฐเฅเคเคผเฅ เคฎเฅเค เคฒเคฟเคเฅเคเฅค เคเคช [Discord](https://discord.gg/jVQGdvHDrf) เคธเคฐเฅเคตเคฐ เคฎเฅเค เคญเฅ เคถเคพเคฎเคฟเคฒ เคนเฅ เคธเคเคคเฅ เคนเฅเค เคเคฐ เคธเคนเคพเคฏเคคเคพ เคเฅเคจเคฒ เคชเคฐ เคเคพ เคธเคเคคเฅ เคนเฅเค, เคนเคพเคฒเคพเคเคเคฟ, เคชเฅเคฐเคคเคฟเคเฅเคฐเคฟเคฏเคพ เคธเคฎเคฏ เค
เคงเคฟเค เคนเฅ เคธเคเคคเคพ เคนเฅเฅค
+เคฎเคฆเคฆ เคเคพเคนเคฟเค เคฏเคพ เคเฅเค เคธเฅเคตเคฟเคงเคพ เคฎเคพเคเคเคจเฅ เคนเฅ? เคเค [เคจเคฏเคพ issue](https://github.com/Termix-SSH/Support/issues) เคเฅเคฒเฅเค เคเคฐ เคเคฟเคคเคจเคพ เคนเฅ เคธเคเฅ เคตเคฟเคธเฅเคคเคพเคฐ เคธเฅ เคฒเคฟเคเฅเค, เคนเฅ เคธเคเฅ เคคเฅ เค
เคเคเฅเคฐเฅเคเคผเฅ เคฎเฅเคเฅค เคเคช [Discord](https://discord.gg/jVQGdvHDrf) เคเฅ เคธเคชเฅเคฐเฅเค เคเฅเคจเคฒ เคฎเฅเค เคญเฅ เคชเฅเค เคธเคเคคเฅ เคนเฅเค, เคนเคพเคฒเคพเคเคเคฟ เคตเคนเคพเค เคเคตเคพเคฌ เคเคจเฅ เคฎเฅเค เคเคผเฅเคฏเคพเคฆเคพ เคธเคฎเคฏ เคฒเค เคธเคเคคเคพ เคนเฅเฅค
@@ -359,7 +443,7 @@ Termix เคฎเฅเคซเคผเฅเคค เคเคฐ เคเคชเคจ เคธเฅเคฐเฅเคธ เคนเฅ, เคฌเคฟเคจเคพ
[](https://www.youtube.com/@TermixSSH/videos)
-YouTube เคชเคฐ เค
เคชเคกเฅเค เคเฅ เคธเคฎเฅเคเฅเคทเคพเคเค เคฆเฅเคเฅเค
+YouTube เคชเคฐ เค
เคชเคกเฅเค เคเฅ เคเคพเคจเคเคพเคฐเฅ เคฆเฅเคเฅเค
@@ -399,7 +483,7 @@ Termix เคฎเฅเคซเคผเฅเคค เคเคฐ เคเคชเคจ เคธเฅเคฐเฅเคธ เคนเฅ, เคฌเคฟเคจเคพ
-เคเฅเค เคตเฅเคกเคฟเคฏเฅ เคเคฐ เคเคตเคฟเคฏเคพเค เคชเฅเคฐเคพเคจเฅ เคนเฅ เคธเคเคคเฅ เคนเฅเค เคฏเคพ เคตเคฟเคถเฅเคทเคคเคพเคเค เคเฅ เคชเฅเคฐเฅ เคคเคฐเคน เคธเฅ เคชเฅเคฐเคฆเคฐเฅเคถเคฟเคค เคจเคนเฅเค เคเคฐ เคธเคเคคเฅ เคนเฅเคเฅค
+เคเฅเค เคตเฅเคกเคฟเคฏเฅ เคเคฐ เคคเคธเฅเคตเฅเคฐเฅเค เคชเฅเคฐเคพเคจเฅ เคนเฅ เคธเคเคคเฅ เคนเฅเค เคฏเคพ เคธเฅเคตเคฟเคงเคพเคเค เคเฅ เคชเฅเคฐเฅ เคคเคฐเคน เคจเคนเฅเค เคฆเคฟเคเคพ เคชเคพเคคเฅเคเฅค
@@ -407,10 +491,10 @@ Termix เคฎเฅเคซเคผเฅเคค เคเคฐ เคเคชเคจ เคธเฅเคฐเฅเคธ เคนเฅ, เคฌเคฟเคจเคพ
## เคจเคฟเคฏเฅเคเคฟเคค เคตเคฟเคถเฅเคทเคคเคพเคเค
-เคธเคญเฅ เคจเคฟเคฏเฅเคเคฟเคค เคตเคฟเคถเฅเคทเคคเคพเคเค เคเฅ เคฒเคฟเค [เคชเฅเคฐเฅเคเฅเคเฅเคเฅเคธ](https://github.com/orgs/Termix-SSH/projects/5) เคฆเฅเคเฅเคเฅค เคฏเคฆเคฟ เคเคช เคฏเฅเคเคฆเคพเคจ เคฆเฅเคจเคพ เคเคพเคนเคคเฅ เคนเฅเค, เคคเฅ [เคฏเฅเคเคฆเคพเคจ](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md) เคฆเฅเคเฅเคเฅค
+เคธเคญเฅ เคจเคฟเคฏเฅเคเคฟเคค เคธเฅเคตเคฟเคงเคพเคเค [Projects](https://github.com/orgs/Termix-SSH/projects/5) เคฎเฅเค เคนเฅเคเฅค เค
เคเคฐ เคเคช เคฏเฅเคเคฆเคพเคจ เคฆเฅเคจเคพ เคเคพเคนเคคเฅ เคนเฅเค, เคคเฅ [Contributing](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md) เคฆเฅเคเฅเคเฅค
## เคฒเคพเคเคธเฅเคเคธ
-Apache License Version 2.0 เคเฅ เคคเคนเคค เคตเคฟเคคเคฐเคฟเคคเฅค เค
เคงเคฟเค เคเคพเคจเคเคพเคฐเฅ เคเฅ เคฒเคฟเค `LICENSE` เคฆเฅเคเฅเคเฅค
+Apache License เคธเคเคธเฅเคเคฐเคฃ 2.0 เคเฅ เคคเคนเคค เคตเคฟเคคเคฐเคฟเคคเฅค เค
เคงเคฟเค เคเคพเคจเคเคพเคฐเฅ เคเฅ เคฒเคฟเค `LICENSE` เคฆเฅเคเฅเคเฅค
diff --git a/docs/readme/README-IT.md b/docs/readme/README-IT.md
index 91d6884..d38ab41 100644
--- a/docs/readme/README-IT.md
+++ b/docs/readme/README-IT.md
@@ -4,7 +4,7 @@
Termix
-Gestione SSH self-hosted e accesso al desktop remoto
+Gestione dei server self-hosted, da SSH e desktop remoto fino alle automazioni
English ยท
@@ -32,12 +32,12 @@
-
+
-Termix รจ gratuito e open source. Se lo trovi utile, considera di [donare](https://donate.termix.site/) per aiutare a coprire i costi del server e il tempo di sviluppo.
+Termix รจ gratuito e open source. Se ti รจ utile, valuta una [donazione](https://donate.termix.site/) per aiutare a coprire i costi dei server e il tempo di sviluppo.
@@ -58,7 +58,7 @@ Termix รจ gratuito e open source. Se lo trovi utile, considera di [donare](https
## Panoramica
-Termix รจ una piattaforma di gestione server tutto-in-uno, open-source, per sempre gratuita e self-hosted. Fornisce una soluzione multipiattaforma per gestire i tuoi server e la tua infrastruttura attraverso un'unica interfaccia intuitiva. Termix offre accesso al terminale SSH, controllo remoto del desktop (RDP, VNC, Telnet), funzionalitร di tunneling SSH, gestione remota dei file e molti altri strumenti. Termix รจ la perfetta alternativa gratuita e self-hosted a Termius, disponibile per tutte le piattaforme.
+Termix รจ una piattaforma gratuita, open source e self-hosted per gestire i tuoi server. Mette in un unico posto terminali SSH, desktop remoti (RDP, VNC, Telnet), trasferimenti di file, tunnel, Docker, metriche e automazioni, su web, desktop e mobile. ร un'alternativa self-hosted a Termius che resta gratuita per sempre.
@@ -68,126 +68,182 @@ Termix รจ una piattaforma di gestione server tutto-in-uno, open-source, per semp
-**Accesso Terminale SSH:**
-Terminale completo con supporto schermo diviso (fino a 4 pannelli) con un sistema di schede in stile browser. Include il supporto per la personalizzazione del terminale, inclusi temi, font e altri componenti comuni.
+**Terminale SSH:**
+Un terminale completo con schede come quelle del browser e schermo diviso, fino a 6 pannelli insieme. Scegli tema, carattere e colori. Sopra ogni sessione c'รจ una barra con CPU, memoria e disco in tempo reale, piรน scorciatoie ai file, a Docker, ai tunnel e alle metriche di quell'host.
-**Accesso Desktop Remoto:**
-Supporto RDP, VNC e Telnet tramite browser con personalizzazione completa e schermo diviso.
+**Desktop remoto:**
+RDP, VNC e Telnet nel browser, in schede e schermo diviso come qualsiasi altra sessione. Include un browser dei file per le unitร RDP e il caricamento trascinando i file. Sul desktop Windows puoi anche aprire un host nel client RDP nativo.
-**Gestione Tunnel SSH:**
-Crea e gestisci tunnel SSH da server a server con riconnessione automatica, monitoraggio dello stato e inoltro locale, remoto o SOCKS dinamico. Le impostazioni del tunnel da client desktop a server sono archiviate localmente per ogni installazione desktop; gli snapshot di preset C2S opzionali possono essere salvati sul server, rinominati, caricati o eliminati per spostare una configurazione di tunnel locale tra i client.
+**Tunnel SSH:**
+Inoltro locale, remoto e SOCKS dinamico, con riconnessione automatica e controlli di stato. I tunnel da client a server dell'app desktop restano su quella macchina, e puoi salvare delle preimpostazioni sul server per portare una configurazione su un altro computer.
-**Gestore File Remoto:**
-Gestisci i file direttamente sui server remoti con supporto per la visualizzazione e la modifica di codice, immagini, audio e video. Carica, scarica, rinomina, elimina e sposta file senza problemi con supporto sudo. Include il supporto per spostare file da server a server.
+**Gestore file:**
+Sfoglia, modifica, carica, scarica, rinomina, sposta ed elimina file via SFTP, anche con sudo. Guarda e modifica codice, immagini, audio e video. Copia i file direttamente da un server all'altro: il percorso piรน veloce viene scelto per te e i trasferimenti vengono verificati.
-**Gestione Docker e Podman:**
-Avvia, ferma, metti in pausa, rimuovi container. Visualizza le statistiche dei container. Controlla i container tramite terminale docker exec. Supporta sia Docker che Podman come runtime dei container. Non รจ stato creato per sostituire Portainer o Dockge, ma piuttosto per gestire semplicemente i tuoi container rispetto alla loro creazione.
+**Docker e Podman:**
+Avvia, ferma, metti in pausa ed elimina i container, guarda le loro statistiche e apri una shell dentro uno di essi. Funziona sia con Docker sia con Podman. Non vuole sostituire Portainer o Dockge, serve solo a gestire i container che hai giร .
-**Gestore Host SSH:**
-Salva, organizza e gestisci le tue connessioni SSH con tag e cartelle (con personalizzazione delle cartelle e supporto per cartelle annidate), salva facilmente le informazioni di accesso riutilizzabili e automatizza il deployment delle chiavi SSH.
+**Gestore host:**
+Salva e organizza gli host con etichette e cartelle annidate a cui puoi dare nome e colore. Riutilizza le credenziali salvate su piรน host, distribuisci le chiavi SSH in automatico, raggruppa gli host sotto un host padre, modifica ed esporta in blocco, e usa la connessione rapida per i collegamenti una tantum che non vuoi salvare.
-**Metriche Host:**
-Visualizza CPU, memoria, utilizzo del disco, rete, uptime, informazioni di sistema, firewall, monitoraggio porte, visualizzatore di log, utenti/permessi, certificati e molto altro, funzionanti sulla maggior parte dei server basati su Linux. Include grafici storici delle serie temporali e avvisi basati su soglie con supporto ntfy e webhook.
+**Metriche host:**
+CPU, memoria, disco, rete, temperatura, tempo di accensione, processi, porte, accessi e informazioni di sistema sulla maggior parte dei server Linux, con grafici storici. Le schede di gestione ti fanno seguire servizi, cron, pacchetti, utenti, regole del firewall, WireGuard, Tailscale, certificati SSL, log e controlli di stato senza uscire da Termix.
-**Autenticazione Utente:**
-Gestione utenti sicura con controlli amministrativi (puรฒ modificare le informazioni di altri utenti) e OIDC/LDAP/SSO (con controllo degli accessi), 2FA (TOTP) e supporto passkey (WebAuthn). Visualizza le sessioni utente attive su tutte le piattaforme e revoca i permessi. Collega i tuoi account OIDC/Locali tra loro. Visualizza il log di controllo delle azioni di tutti gli utenti.
+**Automazioni:**
+Scegli un evento che fa partire tutto, poi decidi cosa deve succedere. Gli eventi possono essere una metrica che supera una soglia, un host che cade o torna su, un controllo di stato che cambia, una pianificazione, un evento di un container o un webhook in arrivo. I passaggi possono eseguire comandi e frammenti, gestire container e tunnel, accendere un host, chiamare un URL, aspettare, seguire una condizione, avviare un'altra automazione e avvisarti via ntfy, Discord o webhook. Le prove a vuoto ti permettono di provare senza rischi.
-**Integrazione Tailscale:**
-Elenca i dispositivi della tua rete Tailscale per aggiungerli rapidamente come host, e connettiti utilizzando Tailscale SSH come metodo di autenticazione, lasciando che le ACL della tua rete gestiscano l'autorizzazione senza memorizzare credenziali.
+**Flotte:**
+Raggruppa gli host in una flotta scegliendoli o con regole sulle etichette, cosรฌ i nuovi host entrano da soli. Esegui un comando su tutti gli host in una volta, invia e recupera file su tutti quanti, installa pacchetti e raccogli un inventario di sistema operativo, kernel, architettura e tempo di accensione.
-**RBAC/Condivisione:**
-Crea ruoli e condividi host tra utenti/ruoli. Supporta tutti i tipi di autenticazione e tutti i protocolli host.
+**Assistente IA:**
+ร opzionale e resta spento finchรฉ non lo accendi tu. Collega OpenAI, Anthropic, Gemini, Ollama o qualsiasi endpoint compatibile con OpenAI e fai domande sulla tua installazione. Legge host, flotte, frammenti e avvisi, e propone modifiche da approvare invece di farle da solo. Non puรฒ mai toccare credenziali, utenti o impostazioni. Gli amministratori possono lasciarlo spento per tutta l'istanza, e tu puoi nasconderlo giร durante la configurazione.
-**Connessioni Seriali:**
-Connettiti a dispositivi seriali (router, switch, microcontrollori, ecc.) direttamente dal browser o dall'app desktop. Configura baud rate, bit di dati, bit di stop e paritร . Utilizza la Web Serial API nei browser supportati o un backend nativo nell'app Electron.
+**Accesso e utenti:**
+Account locali piรน accesso con OIDC, LDAP, GitHub e Google, con doppia autenticazione (TOTP), passkey (WebAuthn) e dispositivi fidati. Gli amministratori possono gestire gli utenti, collegare i gruppi OIDC ai ruoli, vedere tutte le sessioni attive su ogni piattaforma e revocarle. Collega il tuo account locale a quello OIDC e consulta il registro di controllo di quello che ha fatto ognuno.
+**Ruoli e condivisione:**
+Crea ruoli e condividi gli host con utenti o ruoli su quattro livelli: connessione, visualizzazione, modifica e gestione. Funziona con ogni tipo di autenticazione e ogni protocollo, e puoi cambiare le credenziali usate per un host condiviso.
+
+
+
+
+
+
**Avvisi:**
-Imposta regole di avviso basate su soglie per le metriche dell'host (CPU, memoria, disco, ecc.) e ricevi notifiche tramite ntfy o webhook quando si attivano. Visualizza gli avvisi attivi e risolti in un registro storico.
+Imposta regole sulle metriche degli host come CPU, memoria e disco, e ricevi una notifica via ntfy, Discord o webhook quando scattano. Guarda gli avvisi attivi e quelli rientrati in uno storico, e scarta quelli che non ti interessano.
+
+
+
+
+**Pagina iniziale:**
+Una griglia di widget che costruisci tu trascinandoli. Ci sono widget per stato degli host, ping, collegamenti ai servizi, segnalibri, ricerca, orologi, calendari, conti alla rovescia, note, RSS, meteo, immagini, iframe, Docker, tunnel, grafici delle metriche, API personalizzate e perfino un terminale dal vivo.
-**Homepage:**
-Una homepage completamente personalizzabile con una griglia di widget drag-and-drop. Aggiungi widget per lo stato dell'host, link ai servizi, orologi, note, feed RSS, meteo, container Docker, grafici delle metriche dell'host, terminali incorporati, iframe e altro ancora.
+**Frammenti e strumenti:**
+Salva i comandi che usi spesso e lanciali con un clic, con variabili per l'host e per quello che scrivi tu. Esegui uno stesso comando su tutti i terminali aperti e cerca nella cronologia con il completamento automatico.
-**Crittografia Database:**
-Il backend รจ archiviato come file di database SQLite crittografati. Consulta la [documentazione](https://docs.termix.site/security) per maggiori informazioni.
+**Condivisione sessione:**
+Condividi dal vivo una sessione di terminale, RDP, VNC o Telnet. Manda un link a cui chiunque puรฒ accedere senza account, oppure condividi con un utente Termix preciso, in sola lettura o anche in scrittura. Le condivisioni possono scadere da sole o essere revocate, e si possono spegnere per tutti o per singolo host.
-**Grafico di Rete:**
-Personalizza la tua Dashboard per visualizzare il tuo homelab basato sulle connessioni SSH con supporto dello stato.
+**Registrazione e log delle sessioni:**
+Registra le sessioni di terminale, RDP e VNC e riguardale dopo. Scarica i log di testo di una sessione e consulta il registro delle connessioni per vedere esattamente cosa รจ successo durante una connessione.
-**Strumenti SSH:**
-Crea snippet di comandi riutilizzabili che si eseguono con un singolo clic. Esegui un comando simultaneamente su piรน terminali aperti.
+**Connessioni seriali:**
+Parla con dispositivi seriali come router, switch e microcontrollori dal browser o dall'app desktop. Imposta velocitร , bit di dati, bit di stop e paritร . Usa l'API Web Serial nei browser compatibili, oppure un backend nativo nell'app desktop.
-**Schede Persistenti:**
-Le sessioni SSH e le schede rimangono aperte tra dispositivi/aggiornamenti se abilitato nel profilo utente.
+**Tailscale:**
+Prendi i dispositivi dalla tua tailnet per aggiungerli come host in pochi clic, e collegati con Tailscale SSH cosรฌ gli ACL della tailnet gestiscono l'accesso senza salvare credenziali. Funzionano anche Headscale e gli endpoint personalizzati.
+
+
+
+
+**Proxmox:**
+Importa gli host direttamente da un'istanza Proxmox e segui le statistiche di nodi e macchine ospiti, comprese CPU, memoria e spazio, in una scheda dedicata.
+
+
+
+
+
+
+**Spazi di lavoro e schede:**
+Salva un insieme di schede con la loro disposizione divisa e riapri tutto con un clic. Termix ricorda anche l'ultima sessione, cosรฌ le schede tornano dopo un ricaricamento e su altri dispositivi.
+
+
+
+
+**Configurazione guidata:**
+Una breve configurazione ti accompagna nella scelta di una preimpostazione dell'interfaccia, del tema, delle funzionalitร che vuoi e del primo host. La modalitร semplice nasconde quello che non usi, e puoi rifare la configurazione o cambiare preimpostazione quando vuoi.
+
+
+
+
+
+
+**Desktop autonomo e sincronizzazione:**
+L'app desktop funziona da sola, con backend e database locali, senza bisogno di un server. Puoi anche collegarla a un server Termix per sincronizzare nei due sensi host, credenziali, frammenti e altro, e scegliere se le connessioni partono dal tuo computer o passano dal server.
+
+
+
+
+**Riga di comando:**
+Una CLI `termix` per la tua shell e i tuoi script. Apri terminali, esegui un comando su un host o su un'intera flotta, sposta file via SFTP e gestisci host, frammenti e credenziali. Installala con `npm install -g @termix-cli/cli` oppure prendi un binario autonomo. Vedi la [documentazione della CLI](https://docs.termix.site/cli).
+
+
+
+
+
+
+**Sicurezza:**
+Password, chiavi e altri segreti sono cifrati per ogni utente, e gli stessi file del database possono essere cifrati su disco. Guarda la [documentazione](https://docs.termix.site/security) per capire come funziona.
**Lingue:**
-Supporto integrato per circa 30 lingue (gestito da [Crowdin](https://docs.termix.site/translations)).
+Circa 30 lingue incluse, gestite tramite [Crowdin](https://docs.termix.site/translations).
@@ -199,23 +255,26 @@ Supporto integrato per circa 30 lingue (gestito da [Crowdin](https://docs.termix
Altre funzionalitร
-- **Dashboard** - Visualizza le informazioni del server a colpo d'occhio sulla tua dashboard
-- **Chiavi API** - Crea chiavi API con ambito utente e date di scadenza da utilizzare per automazione/CI
-- **Esportazione/Importazione Dati** - Esporta e importa host SSH, credenziali e dati del gestore file
-- **Configurazione SSL Automatica** - Generazione e gestione integrata dei certificati SSL con reindirizzamenti HTTPS
-- **Interfaccia Moderna** - Interfaccia pulita e responsive per desktop/mobile costruita con React, Tailwind CSS e Shadcn. Scegli tra molti temi UI diversi, inclusi chiaro, scuro, Dracula, ecc. Usa i percorsi URL per aprire qualsiasi connessione a schermo intero.
-- **Cronologia Comandi** - Autocompletamento e visualizzazione dei comandi SSH eseguiti in precedenza
-- **Connessione Rapida** - Connettiti a un server senza dover salvare i dati di connessione
-- **Palette Comandi** - Premi due volte shift sinistro per accedere rapidamente alle connessioni SSH con la tastiera
-- **Integrazione Proxmox** - Aggiungi automaticamente host a Termix dalla tua istanza Proxmox
-- **SSH Ricco di Funzionalitร ** - Supporta jump host, Warpgate, connessioni basate su TOTP, SOCKS5, verifica chiave host, compilazione automatica password, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, port knocking, registrazione terminale, SSH agent forwarding, Bitwarden SSH agent, firma SSH HashiCorp Vault e altro ancora
-- **Termix ID** - L'equivalente di sshid.io integrato in Termix. Rivendica un handle, pubblica le tue chiavi SSH pubbliche su un URL resolver e utilizza una CA integrata per emettere certificati SSH
+- **Dashboard** - I tuoi server a colpo d'occhio, con schede che disponi tu
+- **Grafico di rete** - Il tuo homelab disegnato a partire dagli host, con stato in tempo reale
+- **Monitor tmux** - Sfoglia sessioni, finestre e pannelli di tmux, con anteprime e ricerca
+- **Chiavi API** - Chiavi per singolo utente con scadenza, per script e CI
+- **Esporta e importa** - Sposta host, credenziali e dati del gestore file dentro e fuori
+- **SSL automatico** - Certificati generati e rinnovati per te, con reindirizzamento a HTTPS, oppure usa i tuoi
+- **Database** - SQLite di base, con supporto anche per PostgreSQL e MySQL
+- **Interfaccia moderna** - Interfaccia React pulita che funziona su desktop e mobile, con temi come chiaro, scuro e Dracula. Ogni connessione si puรฒ aprire a schermo intero da un URL
+- **Palette comandi** - Premi due volte Maiusc sinistro per saltare a un host da tastiera
+- **Scorciatoie da tastiera** - Spostarsi tra le schede, chiuderle e altro, tutto riassegnabile
+- **Wake-on-LAN** - Accendi una macchina da Termix o da un passaggio di un'automazione
+- **Autenticazione tramite proxy fidato** - Lascia che un reverse proxy gestisca l'accesso e passi l'utente
+- **SSH molto completo** - Host di salto, Warpgate, richieste TOTP, SOCKS5, verifica delle chiavi host, riempimento automatico della password, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, port knocking, log del terminale, inoltro dell'agente, agente SSH di Bitwarden, firma SSH con HashiCorp Vault e altro
+- **Termix ID** - Una versione integrata di sshid.io. Prendi un identificativo, pubblica le tue chiavi pubbliche su un URL di risoluzione ed emetti certificati SSH dalla CA integrata
-## Supporto Piattaforme
+## Piattaforme supportate
@@ -224,15 +283,15 @@ Supporto integrato per circa 30 lingue (gestito da [Crowdin](https://docs.termix
Web
-Qualsiasi browser moderno (Chrome, Safari, Firefox) ยท Supporto PWA
+Qualsiasi browser recente (Chrome, Safari, Firefox) ยท Supporto PWA
Windows x64/ia32
-Portable ยท Installer MSI ยท Chocolatey
+Portatile ยท Installer MSI ยท Chocolatey
Linux x64/ia32
-Portable ยท AUR ยท AppImage ยท Deb ยท Flatpak
+Portatile ยท AUR ยท AppImage ยท Deb ยท Flatpak
macOS x64/ia32, v12.0+
@@ -252,9 +311,9 @@ Supporto integrato per circa 30 lingue (gestito da [Crowdin](https://docs.termix
## Installazione
-Visita la [Documentazione Termix](https://docs.termix.site/install) per le istruzioni complete di installazione su tutte le piattaforme.
+Vai alla [documentazione di Termix](https://docs.termix.site/install) per le istruzioni complete di installazione su tutte le piattaforme.
-File Docker Compose di esempio (puoi omettere `guacd` e la rete se non prevedi di utilizzare le funzioni di desktop remoto):
+Esempio di file Docker Compose (puoi togliere `guacd` e la rete se non pensi di usare il desktop remoto):
```yaml
services:
@@ -291,11 +350,37 @@ networks:
driver: bridge
```
+### Riga di comando
+
+Termix ha anche una CLI, cosรฌ puoi gestire i tuoi server dal terminale e usare Termix nei tuoi script.
+
+```bash
+npm install -g @termix-cli/cli
+termix login --url https://termix.example.com
+termix ssh 1
+```
+
+Puรฒ aprire terminali, eseguire un comando su un host o su un'intera flotta, spostare file via SFTP e gestire host, frammenti e credenziali. La documentazione completa รจ su [docs.termix.site/cli](https://docs.termix.site/cli).
+
+### Hosting in cloud
+
+Puoi far girare il server Termix su un VPS invece che dentro la tua rete. Se Termix gira sulla rete che gestisce, un guasto se lo porta via proprio quando ti servirebbe per sistemare le cose. Fuori resta raggiungibile, ti dร un IP fisso e ci entri da ovunque senza VPN nรฉ porte aperte.
+
+[GINERNET](https://docs.termix.site/install/ginernet) sponsorizza Termix, e nella documentazione c'รจ una guida passo passo per il rilascio sulla loro piattaforma VPS.
+
+
+
+## Telemetria
+
+Termix invia una volta al giorno un piccolo segnale anonimo, cosรฌ posso vedere quante istanze sono attive e quali funzionalitร vengono usate davvero. Contiene un ID istanza casuale, quanti utenti e host hai, la versione dell'app e quali funzionalitร (terminale, gestore file, tunnel, docker, ecc.) sono state usate nelle ultime 24 ore. Non contiene mai nomi utente, nomi host, indirizzi IP, credenziali o qualsiasi altra cosa che identifichi te o i tuoi server.
+
+ร attivo di base. Puoi spegnerlo nelle impostazioni di amministrazione, sezione Generale, oppure impostare `ENABLE_TELEMETRY=false` prima ancora di avviare Termix.
+
## Dona
-Termix รจ gratuito e open source, senza abbonamenti o piani a pagamento. Se lo trovi utile, considera di donare per aiutare a coprire i costi del server, i domini e il tempo di sviluppo. Le donazioni aiutano anche a finanziare il tempo necessario per ricercare e imparare ciรฒ che serve per costruire funzionalitร come SAML, Kubernetes e supporto Agent. Segui i progressi e dona qui sotto.
+Termix รจ gratuito e open source, senza abbonamenti nรฉ piani a pagamento. Se ti รจ utile, valuta una donazione per aiutare con server, domini e tempo di sviluppo. Le donazioni finanziano anche il tempo per studiare quello che serve a costruire funzionalitร come SAML, Kubernetes e il supporto agli agenti. Segui i progressi e dona qui sotto.
[Dona](https://donate.termix.site/)
@@ -303,7 +388,7 @@ Termix รจ gratuito e open source, senza abbonamenti o piani a pagamento. Se lo t
## Sponsor
-Interessato a un posizionamento a pagamento per supportare lo sviluppo? Scrivi a [mail@termix.site](mailto:mail@termix.site).
+Ti interessa uno spazio a pagamento per sostenere lo sviluppo? Scrivi a [mail@termix.site](mailto:mail@termix.site).
@@ -325,10 +410,6 @@ Interessato a un posizionamento a pagamento per supportare lo sviluppo? Scrivi a
-
-
-
-
@@ -340,14 +421,17 @@ Interessato a un posizionamento a pagamento per supportare lo sviluppo? Scrivi a
-
+
+
+
+
## Supporto
-Se hai bisogno di aiuto o vuoi richiedere una funzionalitร per Termix, visita la pagina [Issues](https://github.com/Termix-SSH/Support/issues), accedi e premi `New Issue`. Per favore, sii il piรน dettagliato possibile nella tua segnalazione, preferibilmente scritta in inglese. Puoi anche unirti al server [Discord](https://discord.gg/jVQGdvHDrf) e visitare il canale di supporto, tuttavia i tempi di risposta potrebbero essere piรน lunghi.
+Ti serve aiuto o vuoi proporre una funzionalitร ? Apri una [nuova issue](https://github.com/Termix-SSH/Support/issues) con piรน dettagli possibile, in inglese se ci riesci. Puoi anche chiedere nel canale di supporto su [Discord](https://discord.gg/jVQGdvHDrf), anche se lรฌ le risposte possono richiedere piรน tempo.
@@ -399,18 +483,18 @@ Se hai bisogno di aiuto o vuoi richiedere una funzionalitร per Termix, visita l
-Alcuni video e immagini potrebbero non essere aggiornati o potrebbero non mostrare perfettamente le funzionalitร .
+Alcuni video e immagini possono essere datati o non mostrare al meglio le funzionalitร .
-## Funzionalitร Pianificate
+## Funzionalitร pianificate
-Consulta [Projects](https://github.com/orgs/Termix-SSH/projects/5) per tutte le funzionalitร pianificate. Se desideri contribuire, consulta [Contributing](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md).
+Tutte le funzionalitร pianificate sono su [Projects](https://github.com/orgs/Termix-SSH/projects/5). Se vuoi contribuire, guarda [Contributing](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md).
## Licenza
-Distribuito sotto la Licenza Apache Versione 2.0. Consulta `LICENSE` per maggiori informazioni.
+Distribuito con licenza Apache versione 2.0. Vedi `LICENSE` per maggiori informazioni.
diff --git a/docs/readme/README-JA.md b/docs/readme/README-JA.md
index dbde058..0f5a2c4 100644
--- a/docs/readme/README-JA.md
+++ b/docs/readme/README-JA.md
@@ -4,7 +4,7 @@
Termix
-ใปใซใใในใๅ SSH ็ฎก็ใจใชใขใผใใในใฏใใใใขใฏใปใน
+SSH ใใชใขใผใใในใฏใใใใใ่ชๅๅใพใงใใปใซใใในใใฎใตใผใใผ็ฎก็
English ยท
@@ -37,7 +37,7 @@
-Termix ใฏ็กๆใฎใชใผใใณใฝใผในใใญใธใงใฏใใงใใไพฟๅฉใ ใจๆใใๅ ดๅใฏใใตใผใใผใณในใใจ้็บๆ้ใฎใใใซ[ๅฏไป](https://donate.termix.site/)ใใๆค่จใใ ใใใ
+Termix ใฏ็กๆใงใชใผใใณใฝใผในใงใใๅฝนใซ็ซใฃใใจๆใใใใใตใผใใผ่ฒป็จใจ้็บๆ้ใๆฏใใใใใซ[ๅฏไป](https://donate.termix.site/)ใใๆค่จใใ ใใใ
@@ -49,7 +49,7 @@ Termix ใฏ็กๆใฎใชใผใใณใฝใผในใใญใธใงใฏใใงใใไพฟๅฉใ ใจ
- 2025ๅนด9ๆ1ๆฅใซ้ๆ
+ 2025ๅนด9ๆ1ๆฅ ้ๆ
@@ -58,7 +58,7 @@ Termix ใฏ็กๆใฎใชใผใใณใฝใผในใใญใธใงใฏใใงใใไพฟๅฉใ ใจ
## ๆฆ่ฆ
-Termixใฏใใชใผใใณใฝใผในใงๆฐธไน
็กๆใฎใปใซใใในใๅใชใผใซใคใณใฏใณใตใผใใผ็ฎก็ใใฉใใใใฉใผใ ใงใใๅไธใฎ็ดๆ็ใชใคใณใฟใผใใงใผในใ้ใใฆใใตใผใใผใจใคใณใใฉในใใฉใฏใใฃใ็ฎก็ใใใใซใใใฉใใใใฉใผใ ใฝใชใฅใผใทใงใณใๆไพใใพใใTermixใฏใSSHใฟใผใใใซใขใฏใปในใใชใขใผใใในใฏใใใๅถๅพก๏ผRDPใVNCใTelnet๏ผใSSHใใณใใชใณใฐๆฉ่ฝใใชใขใผใใใกใคใซ็ฎก็ใใใใณใใฎไปๅคใใฎใใผใซใๆไพใใพใใTermixใฏใใในใฆใฎใใฉใใใใฉใผใ ใงๅฉ็จๅฏ่ฝใชTermiusใฎๅฎๅ
จ็กๆใงใปใซใใในใๅฏ่ฝใชไปฃๆฟใฝใชใฅใผใทใงใณใงใใ
+Termix ใฏ็กๆใงใชใผใใณใฝใผในใฎใใปใซใใในใๅใตใผใใผ็ฎก็ใใฉใใใใฉใผใ ใงใใSSH ใฟใผใใใซใใชใขใผใใในใฏใใใ๏ผRDPใVNCใTelnet๏ผใใใกใคใซ่ปข้ใใใณใใซใDockerใใกใใชใฏในใ่ชๅๅใใฒใจใคใซใพใจใใใฆใงใใใในใฏใใใใใขใใคใซใงไฝฟใใพใใใใฃใจ็กๆใงไฝฟใใใใปใซใใในใ็ใฎ Termius ไปฃๆฟใงใใ
@@ -68,42 +68,42 @@ Termixใฏใใชใผใใณใฝใผในใงๆฐธไน
็กๆใฎใปใซใใในใๅใชใผ
-**SSHใฟใผใใใซใขใฏใปใน:**
-ใใฉใฆใถ้ขจใฟใใทในใใ ใซใใๅๅฒ็ป้ขๅฏพๅฟ๏ผๆๅคง4ใใใซ๏ผใฎใใซๆฉ่ฝใฟใผใใใซใไธ่ฌ็ใชใฟใผใใใซใใผใใใใฉใณใใใใฎไปใฎใณใณใใผใใณใใๅซใใฟใผใใใซใซในใฟใใคใบใซๅฏพๅฟใใฆใใพใใ
+**SSH ใฟใผใใใซ:**
+ใใฉใฆใถใฎใใใชใฟใใจๅๅฒ็ป้ขใๅใใๆฌๆ ผ็ใชใฟใผใใใซใงใๆๅคง 6 ๅๅฒใพใงๅๆใซ่กจ็คบใงใใพใใใใผใใใใฉใณใใ้
่ฒใฏ่ช็ฑใซ้ธในใพใใๅใปใใทใงใณใฎไธใฎใใผใซใใผใซใฏ CPUใใกใขใชใใใฃในใฏใฎ็ถๆณใใชใขใซใฟใคใ ใง่กจ็คบใใใใใฎใในใใฎใใกใคใซใDockerใใใณใใซใใกใใชใฏในใธใใ็งปๅใงใใพใใ
-**ใชใขใผใใในใฏใใใใขใฏใปใน:**
-ใใฉใฆใถไธใงRDPใVNCใTelnetใใตใใผใใๅฎๅ
จใชใซในใฟใใคใบใจๅๅฒ็ป้ขใซๅฏพๅฟใใฆใใพใใ
+**ใชใขใผใใในใฏใใใ:**
+RDPใVNCใTelnet ใใใฉใฆใถใใๅฉ็จใงใใไปใฎใปใใทใงใณใจๅใใใใซใฟใใๅๅฒ็ป้ขใงๆฑใใพใใRDP ใใฉใคใ็จใฎใใกใคใซใใฉใฆใถใจใใฉใใฐ๏ผใใญใใใฎใขใใใญใผใใไฝฟใใพใใWindows ใฎใในใฏใใใ็ใงใฏใใในใใใใคใใฃใใฎ RDP ใฏใฉใคใขใณใใง้ใใใจใใงใใพใใ
-**SSHใใณใใซ็ฎก็:**
-่ชๅๅๆฅ็ถใจใใซในใขใใฟใชใณใฐใใญใผใซใซใปใชใขใผใใปใใคใใใใฏSOCKSใใฉใฏใผใใฃใณใฐใๅใใใตใผใใผ้SSHใใณใใซใฎไฝๆใป็ฎก็ใๅฏ่ฝใงใใใในใฏใใใใฏใฉใคใขใณใๅฏพใตใผใใผใฎใใณใใซ่จญๅฎใฏใในใฏใใใใคใณในใใผใซใใจใซใญใผใซใซใซไฟๅญใใใใชใใทใงใณใฎC2Sใใชใปใใในใใใใทใงใใใใตใผใใผใซไฟๅญใปๅๅๅคๆดใป่ชญใฟ่พผใฟใปๅ้คใใฆใฏใฉใคใขใณใ้ใงใญใผใซใซใใณใใซ่จญๅฎใ็งปๅใงใใพใใ
+**SSH ใใณใใซ:**
+ใญใผใซใซใใชใขใผใใใใคใใใใฏ SOCKS ใฎ่ปข้ใซๅฏพๅฟใใ่ชๅๅๆฅ็ถใจใใซในใใงใใฏใไปใใฆใใพใใใในใฏใใใ็ใฎใฏใฉใคใขใณใ้ใใณใใซใฏใใฎ็ซฏๆซใซไฟๅญใใใใใชใปใใใใตใผใใผใซไฟๅญใใฆใใใฐๅฅใฎ็ซฏๆซใซ่จญๅฎใ็งปใใพใใ
-**ใชใขใผใใใกใคใซใใใผใธใฃใผ:**
-ใณใผใใ็ปๅใ้ณๅฃฐใๅ็ปใฎ่กจ็คบใป็ทจ้ใซๅฏพๅฟใใใชใขใผใใตใผใใผไธใฎใใกใคใซใ็ดๆฅ็ฎก็ใงใใพใใsudoๅฏพๅฟใงใใกใคใซใฎใขใใใญใผใใใใฆใณใญใผใใๅๅๅคๆดใๅ้คใ็งปๅใใทใผใ ใฌในใซๅฎ่กใงใใพใใใตใผใใผ้ใงใฎใใกใคใซ็งปๅใซใๅฏพๅฟใใฆใใพใใ
+**ใใกใคใซใใใผใธใฃใผ:**
+SFTP ใงใใกใคใซใฎ้ฒ่ฆงใ็ทจ้ใใขใใใญใผใใใใฆใณใญใผใใๅๅๅคๆดใ็งปๅใๅ้คใใงใใsudo ใซใๅฏพๅฟใใฆใใพใใใณใผใใ็ปๅใ้ณๅฃฐใๅ็ปใ่กจ็คบใป็ทจ้ใงใใพใใใตใผใใผ้ใง็ดๆฅใใกใคใซใใณใใผใงใใๆ้ใฎ็ต่ทฏใ่ชๅใง้ธใฐใใ่ปข้ใฎๆดๅๆงใๆค่จผใใใพใใ
-**DockerใใใณPodman็ฎก็:**
-ใณใณใใใฎ่ตทๅใๅๆญขใไธๆๅๆญขใๅ้คใใณใณใใใฎ็ตฑ่จๆ
ๅ ฑใ่กจ็คบใdocker execใฟใผใใใซใงใณใณใใใๆไฝใDockerใจPodmanใฎไธกๆนใใณใณใใใฉใณใฟใคใ ใจใใฆใตใใผใใใฆใใพใใPortainerใDockgeใฎไปฃๆฟใงใฏใชใใใณใณใใใฎไฝๆใใใ็ฐกๆ็ใช็ฎก็ใ็ฎ็ใจใใฆใใพใใ
+**Docker ใจ Podman:**
+ใณใณใใใฎ่ตทๅใๅๆญขใไธๆๅๆญขใๅ้คใใงใใ็ถๆ
ใ็ขบ่ชใใใใไธญใงใทใงใซใ้ใใใใงใใพใใDocker ใจ Podman ใฎใฉใกใใงใๅใใพใใPortainer ใ Dockge ใ็ฝฎใๆใใใใใฎใใฎใงใฏใชใใใใงใซใใใณใณใใใๆฑใใใใฎใใฎใงใใ
-**SSHใในใใใใผใธใฃใผ:**
-ใฟใฐใใใฉใซใ๏ผใใฉใซใใฎใซในใฟใใคใบใจใในใใใฉใซใๅฏพๅฟ๏ผใงSSHๆฅ็ถใไฟๅญใๆด็ใ็ฎก็ใใๅๅฉ็จๅฏ่ฝใชใญใฐใคใณๆ
ๅ ฑใ็ฐกๅใซไฟๅญใใชใใSSHใญใผใฎใใใญใคใ่ชๅๅใงใใพใใ
+**ใในใ็ฎก็:**
+ใฟใฐใจใๅๅใ่ฒใไปใใใใๅ
ฅใๅญใฎใใฉใซใใงใในใใๆด็ใงใใพใใไฟๅญใใ่ช่จผๆ
ๅ ฑใ่คๆฐใฎใในใใงไฝฟใๅใใSSH ้ตใ่ชๅใง้
ๅธใใใในใใ่ฆชใในใใฎไธใซใพใจใใไธๆฌ็ทจ้ใใจใฏในใใผใใใงใใพใใไฟๅญใใใใชใไธๅบฆใใใฎๆฅ็ถใซใฏใฏใคใใฏๆฅ็ถใไฝฟใใพใใ
@@ -111,83 +111,139 @@ Termixใฏใใชใผใใณใฝใผในใงๆฐธไน
็กๆใฎใปใซใใในใๅใชใผ
**ใในใใกใใชใฏใน:**
-ใปใจใใฉใฎLinuxใใผในใฎใตใผใใผใงใCPUใใกใขใชใใใฃในใฏไฝฟ็จ้ใใใใใฏใผใฏใใขใใใฟใคใ ใใทในใใ ๆ
ๅ ฑใใใกใคใขใฆใฉใผใซใใใผใใขใใฟใผใใญใฐใใฅใผใขใใฆใผใถใผ/ๆจฉ้ใ่จผๆๆธใชใฉใใใใซๅคใใฎๆ
ๅ ฑใ่กจ็คบใงใใพใใๆ็ณปๅใฎๅฑฅๆญดใฐใฉใใจใntfyใใใณwebhookใซๅฏพๅฟใใใใใๅคใใผในใฎใขใฉใผใใๅซใฟใพใใ
+ใใใฆใใฎ Linux ใตใผใใผใง CPUใใกใขใชใใใฃในใฏใใใใใฏใผใฏใๆธฉๅบฆใ็จผๅๆ้ใใใญใปในใใใผใใใญใฐใคใณใใทในใใ ๆ
ๅ ฑใๅฑฅๆญดใฐใฉใไปใใง็ขบ่ชใงใใพใใใใใผใธใฃใผใซใผใใไฝฟใใฐใใตใผใในใcronใใใใฑใผใธใใฆใผใถใผใใใกใคใขใฆใฉใผใซใWireGuardใTailscaleใSSL ่จผๆๆธใใญใฐใใใซในใใงใใฏใ Termix ใใ้ขใใใซๆฑใใพใใ
-**ใฆใผใถใผ่ช่จผ:**
-็ฎก็่
ใณใณใใญใผใซ๏ผไปใฎใฆใผใถใผๆ
ๅ ฑใ็ทจ้ๅฏ่ฝ๏ผใจOIDC/LDAP/SSO๏ผใขใฏใปในๅถๅพกไปใ๏ผใ2FA๏ผTOTP๏ผใใในใญใผ๏ผWebAuthn๏ผๅฏพๅฟใซใใๅฎๅ
จใชใฆใผใถใผ็ฎก็ใใในใฆใฎใใฉใใใใฉใผใ ใงใขใฏใใฃใใชใฆใผใถใผใปใใทใงใณใ่กจ็คบใใๆจฉ้ใๅใๆถใๅฏ่ฝใOIDC/ใญใผใซใซใขใซใฆใณใใฎ้ฃๆบใๅฏ่ฝใงใใใในใฆใฎใฆใผใถใผๆไฝใฎ็ฃๆปใญใฐใ่กจ็คบใงใใพใใ
+**่ชๅๅ:**
+ใใฃใใใ้ธใใงใไฝใใใใใๆฑบใใใ ใใงใใใใฃใใใซใฏใใกใใชใฏในใใใใๅคใ่ถ
ใใใจใใใในใใไธใใฃใใ่ฝใกใใใใใจใใใใซในใใงใใฏใฎ็ถๆ
ใๅคใใฃใใจใใในใฑใธใฅใผใซใใณใณใใใฎใคใใณใใๅค้จใใใฎ Webhook ใใใใพใใในใใใใงใฏใณใใณใใในใใใใใฎๅฎ่กใใณใณใใใใใณใใซใฎๆไฝใใในใใฎ่ตทๅใURL ใฎๅผใณๅบใใๅพ
ๆฉใๆกไปถๅๅฒใๅฅใฎ่ชๅๅใฎๅฎ่กใใงใใntfyใDiscordใWebhook ใง้็ฅใงใใพใใใในใๅฎ่กใงๅฎๅ
จใซ่ฉฆใใพใใ
-**Tailscaleใคใณใใฐใฌใผใทใงใณ:**
-Tailnetใฎใใใคในใใชในใใใฆใในใใจใใฆใใฐใใ่ฟฝๅ ใใTailscale SSHใ่ช่จผๆนๆณใจใใฆไฝฟ็จใใฆๆฅ็ถใใพใใใใใซใใใTailnetใฎACLใ่ช่จผๆ
ๅ ฑใไฟๅญใใใซ่ชๅฏใๅฆ็ใใพใใ
+**ใใชใผใ:**
+ใในใใ้ธใถใใใฟใฐใฎใซใผใซใๆฑบใใฆใใชใผใใซใพใจใใใจใๆฐใใใในใใฏ่ชๅใงๅ
ฅใใพใใใในใฆใฎใในใใงๅใใณใใณใใไธๅบฆใซๅฎ่กใใๅ
จๅฐใซใใกใคใซใ้
ใฃใใ้ใใใใใใใฑใผใธใๅ
ฅใใใใOSใใซใผใใซใใขใผใญใใฏใใฃใ็จผๅๆ้ใฎไธ่ฆงใ้ใใใใพใใ
-**RBAC/ๅ
ฑๆ:**
-ใญใผใซใไฝๆใใใฆใผใถใผ/ใญใผใซ้ใงใในใใๅ
ฑๆใงใใพใใใในใฆใฎ่ช่จผใฟใคใใจใในใฆใฎใในใใใญใใณใซใซๅฏพๅฟใใฆใใพใใ
+**AI ใขใทในใฟใณใ:**
+ไปปๆใฎๆฉ่ฝใงใ่ชๅใงๆๅนใซใใใพใงใฏๅใใพใใใOpenAIใAnthropicใGeminiใOllamaใใพใใฏ OpenAI ไบๆใฎใจใณใใใคใณใใซใคใชใใงใ่ชๅใฎ็ฐๅขใซใคใใฆ่ณชๅใงใใพใใใในใใใใชใผใใในใใใใใใขใฉใผใใ่ชญใฟๅใใพใใใๅคๆดใฏ่ชๅใง่กใใใๆฟ่ชใใฆใใใใใใฎๆๆกใจใใฆๅบใใพใใ่ช่จผๆ
ๅ ฑใใฆใผใถใผใ่จญๅฎใซใฏๆฑบใใฆ่งฆใใใใพใใใ็ฎก็่
ใฏใคใณในใฟใณในๅ
จไฝใง็กๅนใซใงใใๅๆ่จญๅฎใง้่กจ็คบใซใใใใจใใงใใพใใ
-**ใทใชใขใซๆฅ็ถ:**
-ใใฉใฆใถใพใใฏใในใฏใใใใขใใชใใใทใชใขใซใใใคใน๏ผใซใผใฟใผใในใคใใใใใคใฏใญใณใณใใญใผใฉใผใชใฉ๏ผใซ็ดๆฅๆฅ็ถใงใใพใใใใผใฌใผใใใใผใฟใใใใในใใใใใใใใใชใใฃใ่จญๅฎใงใใพใใๅฏพๅฟใใฉใฆใถใงใฏWeb Serial APIใไฝฟ็จใใElectronใขใใชใงใฏใใคใใฃใใใใฏใจใณใใไฝฟ็จใใพใใ
+**ใญใฐใคใณใจใฆใผใถใผ:**
+ใญใผใซใซใขใซใฆใณใใซๅ ใใฆ OIDCใLDAPใGitHubใGoogle ใงใฎใตใคใณใคใณใซๅฏพๅฟใใ2 ่ฆ็ด ่ช่จผ๏ผTOTP๏ผใใในใญใผ๏ผWebAuthn๏ผใไฟก้ ผๆธใฟใใใคในใไฝฟใใพใใ็ฎก็่
ใฏใฆใผใถใผใฎ็ฎก็ใOIDC ใฐใซใผใใจใญใผใซใฎๅฏพๅฟไปใใๅ
จใใฉใใใใฉใผใ ใฎใขใฏใใฃใใชใปใใทใงใณใฎ็ขบ่ชใจๅคฑๅนใใงใใพใใใญใผใซใซใจ OIDC ใฎใขใซใฆใณใใ้ฃๆบใงใใ่ชฐใไฝใใใใใฏ็ฃๆปใญใฐใง็ขบ่ชใงใใพใใ
+**ใญใผใซใจๅ
ฑๆ:**
+ใญใผใซใไฝใใๆฅ็ถใ้ฒ่ฆงใ็ทจ้ใ็ฎก็ใจใใ 4 ๆฎต้ใงใในใใใฆใผใถใผใใญใผใซใซๅ
ฑๆใงใใพใใใในใฆใฎ่ช่จผๆนๅผใจใในใฆใฎใใญใใณใซใงไฝฟใใๅ
ฑๆใใใในใใงไฝฟใ่ช่จผๆ
ๅ ฑใไธๆธใใใใใจใใงใใพใใ
+
+
+
+
+
+
**ใขใฉใผใ:**
-ใในใใกใใชใฏใน๏ผCPUใใกใขใชใใใฃในใฏใชใฉ๏ผใซๅฏพใใฆใใใๅคใใผในใฎใขใฉใผใใซใผใซใ่จญๅฎใใ็บๅๆใซntfyใพใใฏwebhookใง้็ฅใๅใๅใใพใใ็บๅไธญใใใณ่งฃๆฑบๆธใฟใฎใขใฉใผใใๅฑฅๆญดใญใฐใง็ขบ่ชใงใใพใใ
+CPUใใกใขใชใใใฃในใฏใชใฉใฎใในใใกใใชใฏในใซใซใผใซใ่จญๅฎใใ็บๅ ฑใใใ ntfyใDiscordใWebhook ใง้็ฅใๅใๅใใพใใ็บๅ ฑไธญใจ่งฃๆถๆธใฟใฎใขใฉใผใใฏๅฑฅๆญดใง็ขบ่ชใงใใๆฐใซใใชใใใฎใฏๆถใใฆใใใพใใ
-
-
**ใใผใ ใใผใธ:**
-ใใฉใใฐ๏ผใใญใใใฎใฆใฃใธใงใใใฐใชใใใๅใใๅฎๅ
จใซในใฟใใคใบๅฏ่ฝใชใใผใ ใใผใธใใในใในใใผใฟในใใตใผใในใชใณใฏใๆ่จใใกใขใRSSใใฃใผใใๅคฉๆฐใDockerใณใณใใใใในใใกใใชใฏในใฐใฉใใๅใ่พผใฟใฟใผใใใซใiframeใชใฉใฎใฆใฃใธใงใใใ่ฟฝๅ ใงใใพใใ
-
-
-
-
-**ใใผใฟใใผในๆๅทๅ:**
-ใใใฏใจใณใใฏๆๅทๅใใใSQLiteใใผใฟใใผในใใกใคใซใจใใฆไฟๅญใใใพใใ่ฉณ็ดฐใฏ[ใใญใฅใกใณใ](https://docs.termix.site/security)ใใ่ฆงใใ ใใใ
+่ชๅใง็ตใฟ็ซใฆใใใฉใใฐ๏ผใใญใใใฎใฆใฃใธใงใใ็ป้ขใงใใใในใใฎ็ถๆ
ใPingใใตใผใในใชใณใฏใใใใฏใใผใฏใๆค็ดขใๆ่จใใซใฌใณใใผใใซใฆใณใใใฆใณใใกใขใRSSใๅคฉๆฐใ็ปๅใiframeใDockerใใใณใใซใใกใใชใฏในใฎใฐใฉใใ็ฌ่ช APIใใใใซใฏใฉใคใใฎใฟใผใใใซใพใงใฆใฃใธใงใใใจใใฆ็ฝฎใใพใใ
-**ใใใใฏใผใฏใฐใฉใ:**
-ใใใทใฅใใผใใใซในใฟใใคใบใใฆใSSHๆฅ็ถใซๅบใฅใใใผใ ใฉใใฎใใใใฏใผใฏใในใใผใฟใน่กจ็คบไปใใงๅฏ่ฆๅใงใใพใใ
+**ในใใใใใจใใผใซ:**
+ใใไฝฟใใณใใณใใไฟๅญใใฆใใฏใณใฏใชใใฏใงๅฎ่กใงใใพใใใในใใฎๅคใ่ชๅใงๅ
ฅๅใใๅคใๅคๆฐใจใใฆไฝฟใใพใใ้ใใฆใใใในใฆใฎใฟใผใใใซใงๅใใณใใณใใใพใจใใฆๅฎ่กใงใใใณใใณใๅฑฅๆญดใ่ฃๅฎไปใใงๆค็ดขใงใใพใใ
-**SSHใใผใซ:**
-ใฏใณใฏใชใใฏใงๅฎ่กใงใใๅๅฉ็จๅฏ่ฝใชใณใใณใในใใใใใฎไฝๆใ่คๆฐใฎ้ใใฆใใใฟใผใใใซใซๅฏพใใฆๅๆใซใณใใณใใๅฎ่กใงใใพใใ
+**ใปใใทใงใณๅ
ฑๆ:**
+ใฟใผใใใซใRDPใVNCใTelnet ใฎใปใใทใงใณใใชใขใซใฟใคใ ใงๅ
ฑๆใงใใพใใใขใซใฆใณใใชใใงๅๅ ใงใใใชใณใฏใ้ใใใ็นๅฎใฎ Termix ใฆใผใถใผใจๅ
ฑๆใใ้ฒ่ฆงใฎใฟใๆไฝๅฏ่ฝใใ้ธในใพใใๅ
ฑๆใฏ่ชๅใงๆ้ๅใใซใใใใคใงใๅใๆถใใซใใงใใๅ
จไฝใพใใฏใในใใใจใซใชใใซใงใใพใใ
-**ๆฐธ็ถใฟใ:**
-ใฆใผใถใผใใญใใฃใผใซใงๆๅนใซใใใจใSSHใปใใทใงใณใจใฟใใใใใคใน/ๆดๆฐใใพใใใง้ใใใพใพไฟๆใใใพใใ
+**ใปใใทใงใณ้ฒ็ปใจใญใฐ:**
+ใฟใผใใใซใRDPใVNC ใฎใปใใทใงใณใ้ฒ็ปใใฆใใใจใใๅ็ใงใใพใใใปใใทใงใณใฎใใญในใใญใฐใใใฆใณใญใผใใงใใๆฅ็ถใญใฐใ่ฆใใฐๆฅ็ถไธญใซไฝใ่ตทใใใใใใฎใพใพๅใใใพใใ
+
+
+
+
+**ใทใชใขใซๆฅ็ถ:**
+ใซใผใฟใผใในใคใใใใใคใณใณใชใฉใฎใทใชใขใซๆฉๅจใซใใใฉใฆใถใใในใฏใใใใขใใชใใๆฅ็ถใงใใพใใใใผใฌใผใใใใผใฟใใใใในใใใใใใใใใชใใฃใ่จญๅฎใงใใพใใๅฏพๅฟใใฉใฆใถใงใฏ Web Serial API ใใใในใฏใใใใขใใชใงใฏใใคใใฃใใฎใใใฏใจใณใใไฝฟใใพใใ
+
+
+
+
+
+
+**Tailscale:**
+tailnet ใใ็ซฏๆซใๅใ่พผใใงๆฐใฏใชใใฏใงใในใใจใใฆ่ฟฝๅ ใงใใTailscale SSH ใงๆฅ็ถใใใฐใขใฏใปในๅถๅพกใฏ tailnet ใฎ ACL ใซไปปใใใใ่ช่จผๆ
ๅ ฑใไฟๅญใใๅฟ
่ฆใใใใพใใใHeadscale ใ็ฌ่ชใฎใจใณใใใคใณใใซใๅฏพๅฟใใฆใใพใใ
+
+
+
+
+**Proxmox:**
+Proxmox ใฎใคใณในใฟใณในใใใใฎใพใพใในใใๅใ่พผใใพใใใใผใใใฒในใใฎ CPUใใกใขใชใในใใฌใผใธใชใฉใฎ็ถๆ
ใๅฐ็จใฎใฟใใง็ขบ่ชใงใใพใใ
+
+
+
+
+
+
+**ใฏใผใฏในใใผในใจใฟใ:**
+ใฟใใจๅๅฒใฌใคใขใฆใใฎใปใใใไฟๅญใใฆใใฏใณใฏใชใใฏใงใพใใใจ้ใ็ดใใพใใTermix ใฏๅๅใฎใปใใทใงใณใ่ฆใใฆใใใฎใงใๅ่ชญใฟ่พผใฟใใฆใ็ซฏๆซใๅคใใฆใใฟใใฏๆปใฃใฆใใพใใ
+
+
+
+
+**ใฌใคใไปใใปใใใขใใ:**
+็ญใใปใใใขใใใใ็ป้ขใฎใใชใปใใใใใผใใไฝฟใใใๆฉ่ฝใๆๅใฎใในใใฎ้ธๆใๆกๅ
ใใพใใใทใณใใซใขใผใใฏไฝฟใใชใใใฎใ้ ใใฆใใใพใใใปใใใขใใใฏใใคใงใใใ็ดใใพใใใใใชใปใใใๅใๆฟใใใใพใใ
+
+
+
+
+
+
+**ใในใฏใใใๅไฝๅฉ็จใจๅๆ:**
+ใในใฏใใใใขใใชใฏใญใผใซใซใฎใใใฏใจใณใใจใใผใฟใใผในใๆใกใใตใผใใผใชใใงๅไฝใงๅใใพใใTermix ใตใผใใผใซใคใชใใฐใใในใใ่ช่จผๆ
ๅ ฑใในใใใใใชใฉใๅๆนๅใงๅๆใงใใๆฅ็ถใใญใผใซใซใใๅงใใใใตใผใใผ็ต็ฑใซใใใใ้ธในใพใใ
+
+
+
+
+**ใณใใณใใฉใคใณใใผใซ:**
+ใทใงใซใในใฏใชใใใใไฝฟใใ `termix` CLI ใงใใใฟใผใใใซใ้ใใใในใ 1 ๅฐใพใใฏใใชใผใๅ
จไฝใงใณใใณใใๅฎ่กใใSFTP ใงใใกใคใซใ็งปๅใใใในใใในใใใใใ่ช่จผๆ
ๅ ฑใ็ฎก็ใงใใพใใ`npm install -g @termix-cli/cli` ใงๅ
ฅใใใใๅไฝใฎใใคใใชใไฝฟใฃใฆใใ ใใใ่ฉณใใใฏ [CLI ใใญใฅใกใณใ](https://docs.termix.site/cli)ใใ่ฆงใใ ใใใ
+
+
+
+
+
+
+**ใปใญใฅใชใใฃ:**
+ใในใฏใผใใ้ตใชใฉใฎ็งๅฏๆ
ๅ ฑใฏใฆใผใถใผใใจใซๆๅทๅใใใใใผใฟใใผในใฎใใกใคใซ่ชไฝใใใฃในใฏไธใงๆๅทๅใงใใพใใไป็ตใฟใฏ[ใใญใฅใกใณใ](https://docs.termix.site/security)ใใ่ฆงใใ ใใใ
**ๅค่จ่ชๅฏพๅฟ:**
-็ด30่จ่ชใฎ็ตใฟ่พผใฟใตใใผใ๏ผ[Crowdin](https://docs.termix.site/translations)ใง็ฎก็ใใใฆใใพใ๏ผใ
+็ด 30 ่จ่ชใซๅฏพๅฟใใฆใใใ[Crowdin](https://docs.termix.site/translations) ใง็ฎก็ใใฆใใพใใ
@@ -199,17 +255,20 @@ Tailnetใฎใใใคในใใชในใใใฆใในใใจใใฆใใฐใใ่ฟฝๅ ใ
ใใฎไปใฎๆฉ่ฝ
-- **ใใใทใฅใใผใ** - ใใใทใฅใใผใใงใตใผใใผๆ
ๅ ฑใไธ็ฎใง็ขบ่ชใงใใพใ
-- **APIใญใผ** - ่ชๅๅ/CI็จใซๆๅนๆ้ไปใใฎใฆใผใถใผในใณใผใAPIใญใผใไฝๆใงใใพใ
-- **ใใผใฟใฎใจใฏในใใผใ/ใคใณใใผใ** - SSHใในใใ่ช่จผๆ
ๅ ฑใใใกใคใซใใใผใธใฃใผใใผใฟใฎใจใฏในใใผใใจใคใณใใผใใๅฏ่ฝใงใ
-- **่ชๅSSL่จญๅฎ** - HTTPSใชใใคใฌใฏใไปใใฎ็ตใฟ่พผใฟSSL่จผๆๆธ็ๆใป็ฎก็ใๅฏ่ฝใงใ
-- **ใขใใณUI** - ReactใTailwind CSSใShadcnใงๆง็ฏใใใใใในใฏใใใ/ใขใใคใซๅฏพๅฟใฎใฏใชใผใณใชใคใณใฟใผใใงใผในใใฉใคใใใใผใฏใDraculaใชใฉใๅคใใฎ็ฐใชใUIใใผใใใ้ธๆๅฏ่ฝใURLใซใผใใงไปปๆใฎๆฅ็ถใใใซในใฏใชใผใณใง้ใใใจใใงใใพใใ
-- **ใณใใณใๅฑฅๆญด** - ้ๅปใซๅฎ่กใใSSHใณใใณใใฎ่ชๅ่ฃๅฎใจ่กจ็คบใๅฏ่ฝใงใ
-- **ใฏใคใใฏๆฅ็ถ** - ๆฅ็ถใใผใฟใไฟๅญใใใซใตใผใใผใซๆฅ็ถใงใใพใ
-- **ใณใใณใใใฌใใ** - ๅทฆShiftใญใผใ2ๅๆผใใใจใงใใญใผใใผใใใSSHๆฅ็ถใซ็ด ๆฉใใขใฏใปในใงใใพใ
-- **Proxmox็ตฑๅ** - Proxmoxใคใณในใฟใณในใใใในใใ่ชๅ็ใซTermixใซ่ฟฝๅ ใงใใพใ
-- **SSHๆฉ่ฝๅ
ๅฎ** - ใธใฃใณใใในใใWarpgateใTOTPใใผในใฎๆฅ็ถใSOCKS5ใใในใใญใผๆค่จผใใในใฏใผใ่ชๅๅ
ฅๅใ[OPKSSH](https://github.com/openpubkey/opkssh)ใtmuxใใใผใๆฒใ๏ผport knocking๏ผใใฟใผใใใซใญใฐ่จ้ฒใSSHใจใผใธใงใณใใใฉใฏใผใใฃใณใฐใBitwarden SSHใจใผใธใงใณใใHashiCorp Vault SSH็ฝฒๅใชใฉใซๅฏพๅฟใใฆใใพใ
-- **Termix ID** - Termixใซ็ตใฟ่พผใพใใsshid.io็ธๅฝใฎๆฉ่ฝใงใใใใณใใซใๅๅพใใใชใพใซใใผURLใงๅ
ฌ้SSHใญใผใๅ
ฌ้ใใ็ตใฟ่พผใฟCAใไฝฟ็จใใฆSSH่จผๆๆธใ็บ่กใงใใพใใ
+- **ใใใทใฅใใผใ** - ่ชๅใงไธฆในใใซใผใใงใตใผใใผใฎ็ถๆณใใฒใจ็ฎใงๆๆก
+- **ใใใใฏใผใฏๅณ** - ใในใใใใใผใ ใฉใใๅณใซใใฆใ็ถๆ
ใใชใขใซใฟใคใ ่กจ็คบ
+- **tmux ใขใใฟใผ** - tmux ใฎใปใใทใงใณใใฆใฃใณใใฆใใใคใณใใใฌใใฅใผใจๆค็ดขไปใใงไธ่ฆง
+- **API ใญใผ** - ในใฏใชใใใ CI ็จใฎใๆๅนๆ้ไปใใฆใผใถใผๅไฝใฎใญใผ
+- **ใจใฏในใใผใใจใคใณใใผใ** - ใในใใ่ช่จผๆ
ๅ ฑใใใกใคใซใใใผใธใฃใผใฎใใผใฟใๅบใๅ
ฅใ
+- **่ชๅ SSL** - ่จผๆๆธใฎ็บ่กใจๆดๆฐใHTTPS ใธใฎใชใใคใฌใฏใใ่ชๅใงใ่ชๅใฎ่จผๆๆธใไฝฟใใพใ
+- **ใใผใฟใใผใน** - ๆจๆบใฏ SQLiteใPostgreSQL ใจ MySQL ใซใๅฏพๅฟ
+- **ใขใใณใช UI** - ใในใฏใใใใงใใขใใคใซใงใไฝฟใใ React ใฎ็ป้ขใใฉใคใใใใผใฏใDracula ใชใฉใฎใใผใไปใใใฉใฎๆฅ็ถใ URL ใใใใซในใฏใชใผใณใง้ใใพใ
+- **ใณใใณใใใฌใใ** - ๅทฆ Shift ใฎ 2 ๅๆผใใงใใญใผใใผใใใใในใใธ็งปๅ
+- **ใญใผใใผใใทใงใผใใซใใ** - ใฟใใฎ็งปๅใ้ใใๆไฝใชใฉใใในใฆๅฒใๅฝใฆๅคๆดๅฏ่ฝ
+- **Wake-on-LAN** - Termix ใใใงใ่ชๅๅใฎในใใใใใใงใใใทใณใ่ตทๅ
+- **ไฟก้ ผๆธใฟใใญใญใท่ช่จผ** - ใชใใผในใใญใญใทใซใตใคใณใคใณใไปปใใใฆใผใถใผๆ
ๅ ฑใๅผใ็ถใ
+- **ๅ
ๅฎใใ SSH ๆฉ่ฝ** - ่ธใฟๅฐใในใใWarpgateใTOTP ใฎๅ
ฅๅใSOCKS5ใใในใ้ตใฎๆค่จผใใในใฏใผใใฎ่ชๅๅ
ฅๅใ[OPKSSH](https://github.com/openpubkey/opkssh)ใtmuxใใใผใใใใญใณใฐใใฟใผใใใซใฎใญใฐใใจใผใธใงใณใ่ปข้ใBitwarden SSH ใจใผใธใงใณใใHashiCorp Vault ใฎ SSH ็ฝฒๅใชใฉ
+- **Termix ID** - sshid.io ใฎใใใชไป็ตใฟใๅ
่ตใใใณใใซใๅๅพใใๅ
ฌ้้ตใใชใพใซใใผ URL ใงๅ
ฌ้ใใๅ
่ต CA ใใ SSH ่จผๆๆธใ็บ่กใงใใพใ
@@ -224,15 +283,15 @@ Tailnetใฎใใใคในใใชในใใใฆใในใใจใใฆใใฐใใ่ฟฝๅ ใ
Web
-ใใใใๆๆฐใใฉใฆใถ๏ผChromeใSafariใFirefox๏ผยท PWAๅฏพๅฟ
+ๆ่ฟใฎใใฉใฆใถๅ
จ่ฌ๏ผChromeใSafariใFirefox๏ผยท PWA ๅฏพๅฟ
Windows x64/ia32
-ใใผใฟใใซ็ ยท MSIใคใณในใใผใฉใผ ยท Chocolatey
+ใใผใฟใใซ ยท MSI ใคใณในใใผใฉใผ ยท Chocolatey
Linux x64/ia32
-ใใผใฟใใซ็ ยท AUR ยท AppImage ยท Deb ยท Flatpak
+ใใผใฟใใซ ยท AUR ยท AppImage ยท Deb ยท Flatpak
macOS x64/ia32, v12.0+
@@ -252,9 +311,9 @@ Tailnetใฎใใใคในใใชในใใใฆใในใใจใใฆใใฐใใ่ฟฝๅ ใ
## ใคใณในใใผใซ
-ใในใฆใฎใใฉใใใใฉใผใ ใธใฎTermixใฎใคใณในใใผใซๆนๆณใซใคใใฆใฏใ[Termixใใญใฅใกใณใ](https://docs.termix.site/install)ใใ่ฆงใใ ใใใ
+ใในใฆใฎใใฉใใใใฉใผใ ๅใใฎ่ฉณใใใคใณในใใผใซๆ้ ใฏ [Termix ใใญใฅใกใณใ](https://docs.termix.site/install)ใใ่ฆงใใ ใใใ
-ใตใณใใซDocker Composeใใกใคใซ๏ผใชใขใผใใในใฏใใใๆฉ่ฝใไฝฟ็จใใไบๅฎใใชใๅ ดๅใฏใ`guacd`ใจใใใใฏใผใฏใฎ่จญๅฎใ็็ฅใงใใพใ๏ผ๏ผ
+Docker Compose ใฎไพใงใ๏ผใชใขใผใใในใฏใใใๆฉ่ฝใไฝฟใใชใใชใ `guacd` ใจใใใใฏใผใฏใฎ้จๅใฏ็็ฅใงใใพใ๏ผ:
```yaml
services:
@@ -291,11 +350,37 @@ networks:
driver: bridge
```
+### ใณใใณใใฉใคใณใใผใซ
+
+Termix ใซใฏ CLI ใใใใฎใงใใฟใผใใใซใใใตใผใใผใ็ฎก็ใใใใ่ชๅใฎในใฏใชใใใซ็ตใฟ่พผใใ ใใงใใพใใ
+
+```bash
+npm install -g @termix-cli/cli
+termix login --url https://termix.example.com
+termix ssh 1
+```
+
+ใฟใผใใใซใ้ใใใในใ 1 ๅฐใพใใฏใใชใผใๅ
จไฝใงใณใใณใใๅฎ่กใใSFTP ใงใใกใคใซใ็งปๅใใใในใใในใใใใใ่ช่จผๆ
ๅ ฑใ็ฎก็ใงใใพใใ่ฉณใใ่ชฌๆใฏ [docs.termix.site/cli](https://docs.termix.site/cli) ใซใใใพใใ
+
+### ใฏใฉใฆใใงใฎ้็จ
+
+Termix ใฎใตใผใใผใฏ่ชๅใฎใใใใฏใผใฏๅ
ใงใฏใชใใVPS ใงๅใใใใจใใงใใพใใ็ฎก็ๅฏพ่ฑกใฎใใใใฏใผใฏไธใงๅใใใฆใใใจใ้ๅฎณใ่ตทใใใจใใซ Termix ใไธ็ทใซ่ฝใกใฆใใพใใ็ดใใใใจใใซ้ใฃใฆไฝฟใใชใใชใใพใใๅคใงๅใใใฆใใใฐใใคใงใๅฑใใพใใใๅบๅฎ IP ใๆใซๅ
ฅใใVPN ใใใผใ้ๆพใชใใงใฉใใใใงใๅ
ฅใใพใใ
+
+[GINERNET](https://docs.termix.site/install/ginernet) ใฏ Termix ใฎในใใณใตใผใงใๅ็คพใฎ VPS ใธใใใญใคใใๆ้ ใฏใใญใฅใกใณใใซ่ฉณใใ่ผใฃใฆใใพใใ
+
+
+
+## ใใฌใกใใชใผ
+
+Termix ใฏ 1 ๆฅ 1 ๅใๅฟๅใฎๅฐใใชใใผใฟใ้ใใพใใใฉใใใใใฎใคใณในใฟใณในใๅใใฆใใฆใใฉใฎๆฉ่ฝใไฝฟใใใฆใใใใๆๆกใใใใใฎใใฎใงใใๅซใพใใใฎใฏใฉใณใใ ใชใคใณในใฟใณใน IDใใฆใผใถใผใจใในใใฎๆฐใใขใใชใฎใใผใธใงใณใ็ด่ฟ 24 ๆ้ใซไฝฟใใใๆฉ่ฝ๏ผใฟใผใใใซใใใกใคใซใใใผใธใฃใผใใใณใใซใDocker ใชใฉ๏ผใ ใใงใใใฆใผใถใผๅใใในใๅใIP ใขใใฌในใ่ช่จผๆ
ๅ ฑใชใฉใใใชใใใตใผใใผใ็นๅฎใงใใใใฎใฏไธๅๅซใพใใพใใใ
+
+ๅๆ็ถๆ
ใงใฏๆๅนใงใใ็ฎก็่จญๅฎใฎใไธ่ฌใใใๆญขใใใใพใใใTermix ใ่ตทๅใใๅใซ `ENABLE_TELEMETRY=false` ใ่จญๅฎใใฆใใใใจใใงใใพใใ
+
## ๅฏไป
-Termixใฏ็กๆใฎใชใผใใณใฝใผในใใญใธใงใฏใใงใใใใตใในใฏใชใใทใงใณใๆๆใใฉใณใฏใใใพใใใไพฟๅฉใ ใจๆใใๅ ดๅใฏใใตใผใใผใณในใใใใกใคใณใ้็บๆ้ใ่ณใใใใฎๅฏไปใใๆค่จใใ ใใใๅฏไปใฏใSAMLใKubernetesใAgentใตใใผใใชใฉใฎๆฉ่ฝใๆง็ฏใใใใใซๅฟ
่ฆใช่ชฟๆปใจๅญฆ็ฟใฎๆ้ใ็ขบไฟใใใใจใซใๅฝน็ซใกใพใใไปฅไธใง้ฒๆใ็ขบ่ชใใๅฏไปใงใใพใใ
+Termix ใฏ็กๆใงใชใผใใณใฝใผในใงใใตใในใฏใชใใทใงใณใๆๆใใฉใณใใใใพใใใๅฝนใซ็ซใฃใฆใใใจๆใใใใใตใผใใผไปฃใใใกใคใณใ้็บๆ้ใๆฏใใใใใฎๅฏไปใใๆค่จใใ ใใใๅฏไปใฏ SAMLใKubernetesใใจใผใธใงใณใๅฏพๅฟใจใใฃใๆฉ่ฝใไฝใใใใฎ่ชฟๆปใๅญฆ็ฟใฎๆ้ใซใใใฆใใใพใใ้ฒใฟๅ
ทๅใฎ็ขบ่ชใจๅฏไปใฏไธ่จใใใฉใใใ
[ๅฏไปใใ](https://donate.termix.site/)
@@ -303,7 +388,7 @@ Termixใฏ็กๆใฎใชใผใใณใฝใผในใใญใธใงใฏใใงใใใใตใใน
## ในใใณใตใผ
-้็บใๆฏๆดใใใใใฎๆๆๆฒ่ผใซใ่ๅณใใใใพใใ๏ผ[mail@termix.site](mailto:mail@termix.site)ใพใงใกใผใซใใ้ใใใ ใใใ
+ๆๆๆฒ่ผใง้็บใๆฏๆดใใใใจใซใ่ๅณใใใใพใใใ[mail@termix.site](mailto:mail@termix.site) ใพใงใ้ฃ็ตกใใ ใใใ
@@ -325,10 +410,6 @@ Termixใฏ็กๆใฎใชใผใใณใฝใผในใใญใธใงใฏใใงใใใใตใใน
-
-
-
-
@@ -340,14 +421,17 @@ Termixใฏ็กๆใฎใชใผใใณใฝใผในใใญใธใงใฏใใงใใใใตใใน
-
+
+
+
+
## ใตใใผใ
-Termixใซ้ขใใใใซใใๆฉ่ฝใชใฏใจในใใๅฟ
่ฆใชๅ ดๅใฏใ[Issues](https://github.com/Termix-SSH/Support/issues)ใใผใธใซใขใฏใปในใใใญใฐใคใณใใฆ`New Issue`ใๆผใใฆใใ ใใใIssueใฏใงใใใ ใ่ฉณ็ดฐใซ่จ่ฟฐใใ่ฑ่ชใงใฎ่จ่ฟฐใๆใพใใใงใใใพใใ[Discord](https://discord.gg/jVQGdvHDrf)ใตใผใใผใซๅๅ ใใฆใตใใผใใใฃใณใใซใๅฉ็จใใใใจใใงใใพใใใๅฟ็ญๆ้ใ้ทใใชใๅ ดๅใใใใพใใ
+ๅฐใฃใใจใใๆฉ่ฝใฎ่ฆๆใใใใจใใฏใ[ๆฐใใ issue](https://github.com/Termix-SSH/Support/issues) ใไฝใฃใฆใใงใใใ ใ่ฉณใใใใงใใใฐ่ฑ่ชใงๆธใใฆใใ ใใใ[Discord](https://discord.gg/jVQGdvHDrf) ใฎใตใใผใใใฃใณใใซใงใ่ณชๅใงใใพใใใ่ฟไฟกใซใฏๆ้ใใใใใใจใใใใพใใ
@@ -359,7 +443,7 @@ Termixใซ้ขใใใใซใใๆฉ่ฝใชใฏใจในใใๅฟ
่ฆใชๅ ดๅใฏใ[Issu
[](https://www.youtube.com/@TermixSSH/videos)
-YouTubeใงใขใใใใผใใฎๆฆ่ฆใ่ฆ่ดใใ
+YouTube ใงใขใใใใผใใฎ็ดนไปใ่ฆใ
@@ -399,7 +483,7 @@ Termixใซ้ขใใใใซใใๆฉ่ฝใชใฏใจในใใๅฟ
่ฆใชๅ ดๅใฏใ[Issu
-ๅ็ปใ็ปๅใฎไธ้จใฏๆๆฐใงใฏใชใๅ ดๅใใๆฉ่ฝใๅฎๅ
จใซ็ดนไปใงใใฆใใชใๅ ดๅใใใใพใใ
+ๅ็ปใ็ปๅใฏๅคใใชใฃใฆใใใใๆฉ่ฝใๅๅใซไผใใใใฆใใชใๅ ดๅใใใใพใใ
@@ -407,10 +491,10 @@ Termixใซ้ขใใใใซใใๆฉ่ฝใชใฏใจในใใๅฟ
่ฆใชๅ ดๅใฏใ[Issu
## ไบๅฎใใใฆใใๆฉ่ฝ
-ใในใฆใฎไบๅฎๆฉ่ฝใซใคใใฆใฏ[Projects](https://github.com/orgs/Termix-SSH/projects/5)ใใ่ฆงใใ ใใใใณใณใใชใใฅใผใใใๅธๆใฎๆนใฏ[Contributing](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md)ใใ่ฆงใใ ใใใ
+ไบๅฎใใใฆใใๆฉ่ฝใฏใในใฆ [Projects](https://github.com/orgs/Termix-SSH/projects/5) ใซใใใพใใ่ฒข็ฎใใ่ใใฎๆนใฏ[ใณใณใใชใใฅใผใทใงใณใฌใคใ](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md)ใใ่ฆงใใ ใใใ
## ใฉใคใปใณใน
-Apache License Version 2.0ใฎใใจใง้
ๅธใใใฆใใพใใ่ฉณ็ดฐใฏ`LICENSE`ใใ่ฆงใใ ใใใ
+Apache License 2.0 ใฎใใจใง้
ๅธใใฆใใพใใ่ฉณใใใฏ `LICENSE` ใใ่ฆงใใ ใใใ
diff --git a/docs/readme/README-KO.md b/docs/readme/README-KO.md
index 8382f83..ba157af 100644
--- a/docs/readme/README-KO.md
+++ b/docs/readme/README-KO.md
@@ -4,7 +4,7 @@
Termix
-์
ํ ํธ์คํ
SSH ๊ด๋ฆฌ ๋ฐ ์๊ฒฉ ๋ฐ์คํฌํฑ ์ก์ธ์ค
+SSH์ ์๊ฒฉ ๋ฐ์คํฌํฑ๋ถํฐ ์๋ํ๊น์ง, ์
ํ ํธ์คํ
์๋ฒ ๊ด๋ฆฌ
English ยท
@@ -37,7 +37,7 @@
-Termix๋ ๋ฌด๋ฃ ์คํ์์ค ํ๋ก์ ํธ์
๋๋ค. ์ ์ฉํ๊ฒ ์ฌ์ฉํ๊ณ ์๋ค๋ฉด ์๋ฒ ๋น์ฉ๊ณผ ๊ฐ๋ฐ ์๊ฐ์ ์ํด [ํ์](https://donate.termix.site/)์ ๊ณ ๋ คํด ์ฃผ์ธ์.
+Termix๋ ๋ฌด๋ฃ์ด๋ฉฐ ์คํ ์์ค์
๋๋ค. ์ ์ฉํ๊ฒ ์ฐ๊ณ ๊ณ์๋ค๋ฉด ์๋ฒ ๋น์ฉ๊ณผ ๊ฐ๋ฐ ์๊ฐ์ ๋ณดํฌ์ด ๋๋๋ก [ํ์](https://donate.termix.site/)์ ๊ณ ๋ คํด ์ฃผ์ธ์.
@@ -58,7 +58,7 @@ Termix๋ ๋ฌด๋ฃ ์คํ์์ค ํ๋ก์ ํธ์
๋๋ค. ์ ์ฉํ๊ฒ ์ฌ์ฉํ๊ณ
## ๊ฐ์
-Termix๋ ์คํ ์์ค์ด๋ฉฐ ์๊ตฌ ๋ฌด๋ฃ์ธ ์
ํ ํธ์คํ
์ฌ์ธ์ ์๋ฒ ๊ด๋ฆฌ ํ๋ซํผ์
๋๋ค. ๋จ์ผ ์ง๊ด์ ์ธ ์ธํฐํ์ด์ค๋ฅผ ํตํด ์๋ฒ์ ์ธํ๋ผ๋ฅผ ๊ด๋ฆฌํ ์ ์๋ ๋ฉํฐ ํ๋ซํผ ์๋ฃจ์
์ ์ ๊ณตํฉ๋๋ค. Termix๋ SSH ํฐ๋ฏธ๋ ์ ์, ์๊ฒฉ ๋ฐ์คํฌํฑ ์ ์ด(RDP, VNC, Telnet), SSH ํฐ๋๋ง ๊ธฐ๋ฅ, ์๊ฒฉ SSH ํ์ผ ๊ด๋ฆฌ ๋ฐ ๊ธฐํ ๋ค์ํ ๋๊ตฌ๋ฅผ ์ ๊ณตํฉ๋๋ค. Termix๋ ๋ชจ๋ ํ๋ซํผ์์ ์ฌ์ฉ ๊ฐ๋ฅํ Termius์ ์๋ฒฝํ ๋ฌด๋ฃ ์
ํ ํธ์คํ
๋์์
๋๋ค.
+Termix๋ ๋ฌด๋ฃ ์คํ ์์ค ์
ํ ํธ์คํ
์๋ฒ ๊ด๋ฆฌ ํ๋ซํผ์
๋๋ค. SSH ํฐ๋ฏธ๋, ์๊ฒฉ ๋ฐ์คํฌํฑ(RDP, VNC, Telnet), ํ์ผ ์ ์ก, ํฐ๋, Docker, ์งํ, ์๋ํ๋ฅผ ํ๊ณณ์ ๋ชจ์ ์น๊ณผ ๋ฐ์คํฌํฑ, ๋ชจ๋ฐ์ผ์์ ์ธ ์ ์์ต๋๋ค. ๊ณ์ ๋ฌด๋ฃ๋ก ์ธ ์ ์๋ ์
ํ ํธ์คํ
Termius ๋์์
๋๋ค.
@@ -68,126 +68,182 @@ Termix๋ ์คํ ์์ค์ด๋ฉฐ ์๊ตฌ ๋ฌด๋ฃ์ธ ์
ํ ํธ์คํ
์ฌ์ธ์ ์๋ฒ
-**SSH ํฐ๋ฏธ๋ ์ ์:**
-๋ธ๋ผ์ฐ์ ์คํ์ผ ํญ ์์คํ
๊ณผ ๋ถํ ํ๋ฉด ์ง์(์ต๋ 4๊ฐ ํจ๋)์ ๊ฐ์ถ ์์ ํ ๊ธฐ๋ฅ์ ํฐ๋ฏธ๋. ์ผ๋ฐ ํฐ๋ฏธ๋ ํ
๋ง, ๊ธ๊ผด ๋ฐ ๊ธฐํ ๊ตฌ์ฑ ์์๋ฅผ ํฌํจํ ํฐ๋ฏธ๋ ์ฌ์ฉ์ ์ ์ ์ง์.
+**SSH ํฐ๋ฏธ๋:**
+๋ธ๋ผ์ฐ์ ๊ฐ์ ํญ๊ณผ ๋ถํ ํ๋ฉด์ ๊ฐ์ถ ์ ๋๋ก ๋ ํฐ๋ฏธ๋๋ก, ํ ๋ฒ์ ์ต๋ 6๊ฐ ํจ๋๊น์ง ๋์ธ ์ ์์ต๋๋ค. ํ
๋ง์ ๊ธ๊ผด, ์์ ๊ณจ๋ผ ์ธ ์ ์์ต๋๋ค. ๊ฐ ์ธ์
์์ ํด๋ฐ์๋ CPU, ๋ฉ๋ชจ๋ฆฌ, ๋์คํฌ๊ฐ ์ค์๊ฐ์ผ๋ก ํ์๋๊ณ , ํด๋น ํธ์คํธ์ ํ์ผ๊ณผ Docker, ํฐ๋, ์งํ๋ก ๋ฐ๋ก ๊ฐ ์ ์์ต๋๋ค.
-**์๊ฒฉ ๋ฐ์คํฌํฑ ์ ์:**
-์์ ํ ์ฌ์ฉ์ ์ ์์ ๋ถํ ํ๋ฉด์ ์ง์ํ๋ ๋ธ๋ผ์ฐ์ ๊ธฐ๋ฐ RDP, VNC, Telnet ์ง์.
+**์๊ฒฉ ๋ฐ์คํฌํฑ:**
+๋ธ๋ผ์ฐ์ ์์ RDP์ VNC, Telnet์ ์ธ ์ ์๊ณ ๋ค๋ฅธ ์ธ์
๊ณผ ๋๊ฐ์ด ํญ๊ณผ ๋ถํ ํ๋ฉด์ผ๋ก ๋ค๋ฃฐ ์ ์์ต๋๋ค. RDP ๋๋ผ์ด๋ธ์ฉ ํ์ผ ๋ธ๋ผ์ฐ์ ์ ๋์ด๋ค ๋๊ธฐ ์
๋ก๋๋ ์์ต๋๋ค. Windows ๋ฐ์คํฌํฑ์์๋ ํธ์คํธ๋ฅผ ๊ธฐ๋ณธ RDP ํด๋ผ์ด์ธํธ๋ก ์ด ์๋ ์์ต๋๋ค.
-**SSH ํฐ๋ ๊ด๋ฆฌ:**
-์๋ ์ฌ์ฐ๊ฒฐ, ์ํ ๋ชจ๋ํฐ๋ง, ๋ก์ปฌยท์๊ฒฉยท๋์ SOCKS ํฌ์๋ฉ์ ์ง์ํ๋ ์๋ฒ ๊ฐ SSH ํฐ๋ ์์ฑ ๋ฐ ๊ด๋ฆฌ. ๋ฐ์คํฌํฑ ํด๋ผ์ด์ธํธ-์๋ฒ ํฐ๋ ์ค์ ์ ๋ฐ์คํฌํฑ ์ค์น๋ณ๋ก ๋ก์ปฌ์ ์ ์ฅ๋๋ฉฐ, ์ ํ์ C2S ์ฌ์ ์ค์ ์ค๋
์ท์ ์๋ฒ์ ์ ์ฅยท์ด๋ฆ ๋ณ๊ฒฝยท๋ถ๋ฌ์ค๊ธฐยท์ญ์ ํ์ฌ ํด๋ผ์ด์ธํธ ๊ฐ ๋ก์ปฌ ํฐ๋ ๊ตฌ์ฑ์ ์ด๋ํ ์ ์์ต๋๋ค.
+**SSH ํฐ๋:**
+๋ก์ปฌ๊ณผ ์๊ฒฉ, ๋์ SOCKS ํฌ์๋ฉ์ ์ง์ํ๋ฉฐ ์๋ ์ฌ์ฐ๊ฒฐ๊ณผ ์ํ ํ์ธ์ด ๋ถ์ด ์์ต๋๋ค. ๋ฐ์คํฌํฑ ์ฑ์ ํด๋ผ์ด์ธํธ ๋ ์๋ฒ ํฐ๋์ ๊ทธ ์ปดํจํฐ์ ์ ์ฅ๋๊ณ , ํ๋ฆฌ์
์ ์๋ฒ์ ์ ์ฅํด ๋๋ฉด ๋ค๋ฅธ ์ปดํจํฐ๋ก ์ค์ ์ ์ฎ๊ธธ ์ ์์ต๋๋ค.
-**์๊ฒฉ ํ์ผ ๊ด๋ฆฌ์:**
-์ฝ๋, ์ด๋ฏธ์ง, ์ค๋์ค, ๋น๋์ค์ ๋ณด๊ธฐ ๋ฐ ํธ์ง์ ์ง์ํ์ฌ ์๊ฒฉ ์๋ฒ์์ ํ์ผ์ ์ง์ ๊ด๋ฆฌ. sudo ์ง์์ผ๋ก ํ์ผ ์
๋ก๋, ๋ค์ด๋ก๋, ์ด๋ฆ ๋ณ๊ฒฝ, ์ญ์ , ์ด๋์ ์ํํ๊ฒ ์ํ. ์๋ฒ ๊ฐ ํ์ผ ์ด๋๋ ์ง์ํฉ๋๋ค.
+**ํ์ผ ๊ด๋ฆฌ์:**
+SFTP๋ก ํ์ผ์ ์ดํด๋ณด๊ณ ํธ์งํ๊ณ ์ฌ๋ฆฌ๊ณ ๋ด๋ ค๋ฐ๊ณ ์ด๋ฆ์ ๋ฐ๊พธ๊ณ ์ฎ๊ธฐ๊ณ ์ง์ธ ์ ์์ผ๋ฉฐ sudo๋ ๋ฉ๋๋ค. ์ฝ๋์ ์ด๋ฏธ์ง, ์ค๋์ค, ๋น๋์ค๋ฅผ ๋ณด๊ณ ํธ์งํ ์ ์์ต๋๋ค. ์๋ฒ์์ ์๋ฒ๋ก ํ์ผ์ ๋ฐ๋ก ๋ณต์ฌํ ์ ์๋๋ฐ, ๊ฐ์ฅ ๋น ๋ฅธ ๊ฒฝ๋ก๊ฐ ์๋์ผ๋ก ์ ํ๋๊ณ ์ ์ก ๋ฌด๊ฒฐ์ฑ๋ ํ์ธํฉ๋๋ค.
-**Docker ๋ฐ Podman ๊ด๋ฆฌ:**
-์ปจํ
์ด๋ ์์, ์ค์ง, ์ผ์ ์ ์ง, ์ ๊ฑฐ. ์ปจํ
์ด๋ ํต๊ณ ๋ณด๊ธฐ. docker exec ํฐ๋ฏธ๋๋ก ์ปจํ
์ด๋ ์ ์ด. Docker์ Podman์ ๋ชจ๋ ์ปจํ
์ด๋ ๋ฐํ์์ผ๋ก ์ง์. Portainer๋ Dockge๋ฅผ ๋์ฒดํ๊ธฐ ์ํ ๊ฒ์ด ์๋๋ผ ์ปจํ
์ด๋ ์์ฑ๋ณด๋ค๋ ๊ฐํธํ ๊ด๋ฆฌ๋ฅผ ๋ชฉ์ ์ผ๋ก ํฉ๋๋ค.
+**Docker์ Podman:**
+์ปจํ
์ด๋๋ฅผ ์์ํ๊ณ ๋ฉ์ถ๊ณ ์ผ์ ์ ์งํ๊ณ ์ง์ธ ์ ์์ผ๋ฉฐ, ์ํ๋ฅผ ๋ณด๊ฑฐ๋ ์์์ ์
ธ์ ์ด ์ ์์ต๋๋ค. Docker์ Podman ๋ชจ๋์์ ๋์ํฉ๋๋ค. Portainer๋ Dockge๋ฅผ ๋์ ํ๋ ค๋ ๊ฒ์ด ์๋๋ผ, ์ด๋ฏธ ์๋ ์ปจํ
์ด๋๋ฅผ ๋ค๋ฃจ๊ธฐ ์ํ ๊ฒ์
๋๋ค.
-**SSH ํธ์คํธ ๊ด๋ฆฌ์:**
-ํ๊ทธ์ ํด๋(ํด๋ ์ฌ์ฉ์ ์ง์ ๋ฐ ์ค์ฒฉ ํด๋ ์ง์)๋ก SSH ์ฐ๊ฒฐ์ ์ ์ฅ, ์ ๋ฆฌ, ๊ด๋ฆฌํ๊ณ , ์ฌ์ฌ์ฉ ๊ฐ๋ฅํ ๋ก๊ทธ์ธ ์ ๋ณด๋ฅผ ์ฝ๊ฒ ์ ์ฅํ๋ฉด์ SSH ํค ๋ฐฐํฌ๋ฅผ ์๋ํ.
+**ํธ์คํธ ๊ด๋ฆฌ:**
+ํ๊ทธ์, ์ด๋ฆ๊ณผ ์์ ๋ถ์ผ ์ ์๋ ์ค์ฒฉ ํด๋๋ก ํธ์คํธ๋ฅผ ์ ๋ฆฌํฉ๋๋ค. ์ ์ฅํ ์๊ฒฉ ์ฆ๋ช
์ ์ฌ๋ฌ ํธ์คํธ์์ ๋ค์ ์ฐ๊ณ , SSH ํค๋ฅผ ์๋์ผ๋ก ๋ฐฐํฌํ๊ณ , ํธ์คํธ๋ฅผ ์์ ํธ์คํธ ์๋๋ก ๋ฌถ๊ณ , ํ๊บผ๋ฒ์ ํธ์งํ๊ฑฐ๋ ๋ด๋ณด๋ผ ์ ์์ต๋๋ค. ์ ์ฅํ๊ณ ์ถ์ง ์์ ์ผํ์ฑ ์ฐ๊ฒฐ์๋ ๋น ๋ฅธ ์ฐ๊ฒฐ์ ์ฐ๋ฉด ๋ฉ๋๋ค.
-**ํธ์คํธ ๋ฉํธ๋ฆญ:**
-๋๋ถ๋ถ์ Linux ๊ธฐ๋ฐ ์๋ฒ์์ CPU, ๋ฉ๋ชจ๋ฆฌ, ๋์คํฌ ์ฌ์ฉ๋, ๋คํธ์ํฌ, ์
ํ์, ์์คํ
์ ๋ณด, ๋ฐฉํ๋ฒฝ, ํฌํธ ๋ชจ๋ํฐ, ๋ก๊ทธ ๋ทฐ์ด, ์ฌ์ฉ์/๊ถํ, ์ธ์ฆ์ ๋ฑ ๋ค์ํ ์ ๋ณด๋ฅผ ํ์. ์๊ณ์ด ํ์คํ ๋ฆฌ ๊ทธ๋ํ์ ntfy ๋ฐ ์นํ
์ ์ง์ํ๋ ์๊ณ๊ฐ ๊ธฐ๋ฐ ์๋ฆผ์ ํฌํจํฉ๋๋ค.
+**ํธ์คํธ ์งํ:**
+๋๋ถ๋ถ์ ๋ฆฌ๋
์ค ์๋ฒ์์ CPU, ๋ฉ๋ชจ๋ฆฌ, ๋์คํฌ, ๋คํธ์ํฌ, ์จ๋, ๊ฐ๋ ์๊ฐ, ํ๋ก์ธ์ค, ํฌํธ, ๋ก๊ทธ์ธ, ์์คํ
์ ๋ณด๋ฅผ ๊ธฐ๋ก ๊ทธ๋ํ์ ํจ๊ป ๋ณผ ์ ์์ต๋๋ค. ๊ด๋ฆฌ ์นด๋๋ก ์๋น์ค์ cron ์์
, ํจํค์ง, ์ฌ์ฉ์, ๋ฐฉํ๋ฒฝ ๊ท์น, WireGuard, Tailscale, SSL ์ธ์ฆ์, ๋ก๊ทธ, ์ํ ํ์ธ์ Termix ์์์ ์ฒ๋ฆฌํ ์ ์์ต๋๋ค.
-**์ฌ์ฉ์ ์ธ์ฆ:**
-๊ด๋ฆฌ์ ์ ์ด(๋ค๋ฅธ ์ฌ์ฉ์ ์ ๋ณด ํธ์ง ๊ฐ๋ฅ)์ OIDC/LDAP/SSO(์ก์ธ์ค ์ ์ด ํฌํจ), 2FA(TOTP), ํจ์คํค(WebAuthn) ์ง์์ ํตํ ์์ ํ ์ฌ์ฉ์ ๊ด๋ฆฌ. ๋ชจ๋ ํ๋ซํผ์์ ํ์ฑ ์ฌ์ฉ์ ์ธ์
์ ๋ณด๊ณ ๊ถํ์ ์ทจ์ ๊ฐ๋ฅ. OIDC/๋ก์ปฌ ๊ณ์ ์ฐ๋. ๋ชจ๋ ์ฌ์ฉ์ ์์
์ ๊ฐ์ฌ ๋ก๊ทธ ์กฐํ.
+**์๋ํ:**
+๋จผ์ ์กฐ๊ฑด์ ๊ณ ๋ฅด๊ณ , ๋ฌด์จ ์ผ์ด ์ผ์ด๋ ์ง ์ ํ๋ฉด ๋ฉ๋๋ค. ์กฐ๊ฑด์๋ ์งํ๊ฐ ๊ธฐ์ค์ ๋์ ๋, ํธ์คํธ๊ฐ ์ฌ๋ผ์ค๊ฑฐ๋ ๋ด๋ ค๊ฐ ๋, ์ํ ํ์ธ ๊ฒฐ๊ณผ๊ฐ ๋ฐ๋ ๋, ์ ํด์ง ์ผ์ , ์ปจํ
์ด๋ ์ด๋ฒคํธ, ๋ค์ด์ค๋ ์นํ
์ด ์์ต๋๋ค. ๊ฐ ๋จ๊ณ์์ ๋ช
๋ น๊ณผ ์ค๋ํซ์ ์คํํ๊ณ , ์ปจํ
์ด๋์ ํฐ๋์ ์กฐ์ํ๊ณ , ํธ์คํธ๋ฅผ ๊นจ์ฐ๊ณ , URL์ ํธ์ถํ๊ณ , ๊ธฐ๋ค๋ฆฌ๊ณ , ์กฐ๊ฑด์ ๋ฐ๋ผ ๊ฐ๋ผ์ง๊ณ , ๋ค๋ฅธ ์๋ํ๋ฅผ ์คํํ๊ณ , ntfy๋ Discord, ์นํ
์ผ๋ก ์๋ฆด ์ ์์ต๋๋ค. ํ
์คํธ ์คํ์ผ๋ก ๋จผ์ ์์ ํ๊ฒ ์ํํด ๋ณผ ์ ์์ต๋๋ค.
-**Tailscale ํตํฉ:**
-Tailscale ๋คํธ์ํฌ์ ๊ธฐ๊ธฐ๋ฅผ ๋์ดํ์ฌ ํธ์คํธ๋ก ๋น ๋ฅด๊ฒ ์ถ๊ฐํ๊ณ , Tailscale SSH๋ฅผ ์ธ์ฆ ๋ฐฉ๋ฒ์ผ๋ก ์ฌ์ฉํ์ฌ ์ฐ๊ฒฐํจ์ผ๋ก์จ ์๊ฒฉ ์ฆ๋ช
์ ์ ์ฅํ์ง ์๊ณ ๋ ๋คํธ์ํฌ ACL์ด ๊ถํ ๋ถ์ฌ๋ฅผ ์ฒ๋ฆฌํ๋๋ก ํฉ๋๋ค.
+**ํ๋ฆฟ:**
+ํธ์คํธ๋ฅผ ์ง์ ๊ณ ๋ฅด๊ฑฐ๋ ํ๊ทธ ๊ท์น์ผ๋ก ํ๋ฆฟ์ ๋ฌถ์ผ๋ฉด ์ ํธ์คํธ๋ ์์์ ๋ค์ด์ต๋๋ค. ๋ชจ๋ ํธ์คํธ์์ ๊ฐ์ ๋ช
๋ น์ ํ ๋ฒ์ ์คํํ๊ณ , ์ ๋ถ์ ํ์ผ์ ๋ณด๋ด๊ณ ๊ฐ์ ธ์ค๊ณ , ํจํค์ง๋ฅผ ์ค์นํ๊ณ , OS์ ์ปค๋, ์ํคํ
์ฒ, ๊ฐ๋ ์๊ฐ ๋ชฉ๋ก์ ๋ชจ์ ์ ์์ต๋๋ค.
-**RBAC/๊ณต์ :**
-์ญํ ์ ์์ฑํ๊ณ ์ฌ์ฉ์/์ญํ ๊ฐ์ ํธ์คํธ๋ฅผ ๊ณต์ ํฉ๋๋ค. ๋ชจ๋ ์ธ์ฆ ์ ํ๊ณผ ๋ชจ๋ ํธ์คํธ ํ๋กํ ์ฝ์ ์ง์ํฉ๋๋ค.
+**AI ์ด์์คํดํธ:**
+์ ํ ๊ธฐ๋ฅ์ด๋ฉฐ ์ง์ ์ผ๊ธฐ ์ ๊น์ง๋ ๊บผ์ ธ ์์ต๋๋ค. OpenAI, Anthropic, Gemini, Ollama ๋๋ OpenAI ํธํ ์๋ํฌ์ธํธ๋ฅผ ์ฐ๊ฒฐํด ๋ด ํ๊ฒฝ์ ๋ํด ๋ฌผ์ด๋ณผ ์ ์์ต๋๋ค. ํธ์คํธ์ ํ๋ฆฟ, ์ค๋ํซ, ์๋ฆผ์ ์ฝ์ ์ ์์ง๋ง ์ง์ ๋ฐ๊พธ์ง ์๊ณ ์น์ธ๋ฐ์ ์ ์์ผ๋ก ๋ด๋์ต๋๋ค. ์๊ฒฉ ์ฆ๋ช
๊ณผ ์ฌ์ฉ์, ์ค์ ์๋ ์ ๋ ์ ๊ทผํ ์ ์์ต๋๋ค. ๊ด๋ฆฌ์๋ ์ธ์คํด์ค ์ ์ฒด์์ ๊บผ ๋ ์ ์๊ณ , ์ด๊ธฐ ์ค์ ์์ ์์ ์จ๊ธธ ์๋ ์์ต๋๋ค.
-**์๋ฆฌ์ผ ์ฐ๊ฒฐ:**
-๋ธ๋ผ์ฐ์ ๋๋ ๋ฐ์คํฌํฑ ์ฑ์์ ์ง์ ์๋ฆฌ์ผ ์ฅ์น(๋ผ์ฐํฐ, ์ค์์น, ๋ง์ดํฌ๋ก์ปจํธ๋กค๋ฌ ๋ฑ)์ ์ฐ๊ฒฐ. ๋ณด๋๋ ์ดํธ, ๋ฐ์ดํฐ ๋นํธ, ์คํฑ ๋นํธ, ํจ๋ฆฌํฐ ๊ตฌ์ฑ. ์ง์ ๋ธ๋ผ์ฐ์ ์์๋ Web Serial API๋ฅผ, Electron ์ฑ์์๋ ๋ค์ดํฐ๋ธ ๋ฐฑ์๋๋ฅผ ์ฌ์ฉํฉ๋๋ค.
+**๋ก๊ทธ์ธ๊ณผ ์ฌ์ฉ์:**
+๋ก์ปฌ ๊ณ์ ๊ณผ ํจ๊ป OIDC, LDAP, GitHub, Google ๋ก๊ทธ์ธ์ ์ง์ํ๊ณ 2๋จ๊ณ ์ธ์ฆ(TOTP), ํจ์คํค(WebAuthn), ์ ๋ขฐํ ์ ์๋ ๊ธฐ๊ธฐ๋ ์ธ ์ ์์ต๋๋ค. ๊ด๋ฆฌ์๋ ์ฌ์ฉ์๋ฅผ ๊ด๋ฆฌํ๊ณ , OIDC ๊ทธ๋ฃน์ ์ญํ ์ ์ฐ๊ฒฐํ๊ณ , ๋ชจ๋ ํ๋ซํผ์ ํ์ฑ ์ธ์
์ ๋ณด๊ณ ํด์งํ ์ ์์ต๋๋ค. ๋ก์ปฌ ๊ณ์ ๊ณผ OIDC ๊ณ์ ์ ์ฐ๊ฒฐํ ์ ์๊ณ , ๋๊ฐ ๋ฌด์์ ํ๋์ง๋ ๊ฐ์ฌ ๋ก๊ทธ์์ ํ์ธํฉ๋๋ค.
+**์ญํ ๊ณผ ๊ณต์ :**
+์ญํ ์ ๋ง๋ค๊ณ ์ฐ๊ฒฐ, ๋ณด๊ธฐ, ํธ์ง, ๊ด๋ฆฌ๋ผ๋ ๋ค ๋จ๊ณ๋ก ํธ์คํธ๋ฅผ ์ฌ์ฉ์๋ ์ญํ ์ ๊ณต์ ํ ์ ์์ต๋๋ค. ๋ชจ๋ ์ธ์ฆ ๋ฐฉ์๊ณผ ๋ชจ๋ ํ๋กํ ์ฝ์์ ๋์ํ๋ฉฐ, ๊ณต์ ํ ํธ์คํธ์ ์ธ ์๊ฒฉ ์ฆ๋ช
์ ๋ฐ๋ก ์ง์ ํ ์๋ ์์ต๋๋ค.
+
+
+
+
+
+
**์๋ฆผ:**
-ํธ์คํธ ๋ฉํธ๋ฆญ(CPU, ๋ฉ๋ชจ๋ฆฌ, ๋์คํฌ ๋ฑ)์ ๋ํ ์๊ณ๊ฐ ๊ธฐ๋ฐ ์๋ฆผ ๊ท์น์ ์ค์ ํ๊ณ ํธ๋ฆฌ๊ฑฐ๋ ๋ ntfy ๋๋ ์นํ
์ ํตํด ์๋ฆผ ์์ . ๊ธฐ๋ก ๋ก๊ทธ์์ ๋ฐ์ ์ค์ธ ์๋ฆผ๊ณผ ํด๊ฒฐ๋ ์๋ฆผ ํ์ธ.
+CPU์ ๋ฉ๋ชจ๋ฆฌ, ๋์คํฌ ๊ฐ์ ํธ์คํธ ์งํ์ ๊ท์น์ ๊ฑธ์ด ๋๊ณ ์กฐ๊ฑด์ด ๊ฑธ๋ฆฌ๋ฉด ntfy๋ Discord, ์นํ
์ผ๋ก ์๋ฆผ์ ๋ฐ์ต๋๋ค. ๋ฐ์ ์ค์ธ ์๋ฆผ๊ณผ ํด์ ๋ ์๋ฆผ์ ๊ธฐ๋ก์์ ๋ณด๊ณ , ์ ๊ฒฝ ์ฐ์ง ์์ ๊ฒ์ ์ง์ ๋ ์ ์์ต๋๋ค.
-
-
**ํํ์ด์ง:**
-๋๋๊ทธ ์ค ๋๋กญ ์์ ฏ ๊ทธ๋ฆฌ๋๋ฅผ ๊ฐ์ถ ์์ ๋ง์ถคํ ํํ์ด์ง. ํธ์คํธ ์ํ, ์๋น์ค ๋งํฌ, ์๊ณ, ๋ฉ๋ชจ, RSS ํผ๋, ๋ ์จ, Docker ์ปจํ
์ด๋, ํธ์คํธ ๋ฉํธ๋ฆญ ์ฐจํธ, ์๋ฒ ๋๋ ํฐ๋ฏธ๋, iframe ๋ฑ์ ์์ ฏ ์ถ๊ฐ ๊ฐ๋ฅ.
-
-
-
-
-**๋ฐ์ดํฐ๋ฒ ์ด์ค ์ํธํ:**
-๋ฐฑ์๋๊ฐ ์ํธํ๋ SQLite ๋ฐ์ดํฐ๋ฒ ์ด์ค ํ์ผ๋ก ์ ์ฅ๋จ. ์์ธํ ๋ด์ฉ์ [๋ฌธ์](https://docs.termix.site/security)๋ฅผ ์ฐธ์กฐํ์ธ์.
+์ง์ ๊พธ๋ฏธ๋ ๋์ด๋ค ๋๊ธฐ ์์ ฏ ํ๋ฉด์
๋๋ค. ํธ์คํธ ์ํ, ํ, ์๋น์ค ๋งํฌ, ๋ถ๋งํฌ, ๊ฒ์, ์๊ณ, ๋ฌ๋ ฅ, ์นด์ดํธ๋ค์ด, ๋ฉ๋ชจ, RSS, ๋ ์จ, ์ด๋ฏธ์ง, iframe, Docker, ํฐ๋, ์งํ ์ฐจํธ, ์ฌ์ฉ์ API, ์ฌ์ง์ด ์ด์ ์๋ ํฐ๋ฏธ๋๊น์ง ์์ ฏ์ผ๋ก ๋์ ์ ์์ต๋๋ค.
-**๋คํธ์ํฌ ๊ทธ๋ํ:**
-๋์๋ณด๋๋ฅผ ์ฌ์ฉ์ ์ ์ํ์ฌ SSH ์ฐ๊ฒฐ ๊ธฐ๋ฐ์ ํ๋ฉ ๋คํธ์ํฌ๋ฅผ ์ํ ํ์์ ํจ๊ป ์๊ฐํ.
+**์ค๋ํซ๊ณผ ๋๊ตฌ:**
+์์ฃผ ์ฐ๋ ๋ช
๋ น์ ์ ์ฅํด ๋๊ณ ํ ๋ฒ์ ์คํํ ์ ์์ผ๋ฉฐ, ํธ์คํธ ๊ฐ์ด๋ ์ง์ ๋ฃ๋ ๊ฐ์ ๋ณ์๋ก ์ธ ์ ์์ต๋๋ค. ์ด๋ ค ์๋ ๋ชจ๋ ํฐ๋ฏธ๋์์ ๊ฐ์ ๋ช
๋ น์ ํ๊บผ๋ฒ์ ์คํํ ์ ์๊ณ , ๋ช
๋ น ๊ธฐ๋ก๋ ์๋ ์์ฑ์ผ๋ก ์ฐพ์ ์ ์์ต๋๋ค.
-**SSH ๋๊ตฌ:**
-ํ ๋ฒ์ ํด๋ฆญ์ผ๋ก ์คํ ๊ฐ๋ฅํ ์ฌ์ฌ์ฉ ๊ฐ๋ฅ ๋ช
๋ น์ด ์ค๋ํซ ์์ฑ. ์ฌ๋ฌ ์ด๋ฆฐ ํฐ๋ฏธ๋์์ ๋์์ ํ๋์ ๋ช
๋ น์ด ์คํ.
+**์ธ์
๊ณต์ :**
+ํฐ๋ฏธ๋๊ณผ RDP, VNC, Telnet ์ธ์
์ ์ค์๊ฐ์ผ๋ก ๊ณต์ ํฉ๋๋ค. ๊ณ์ ์์ด ๋ค์ด์ฌ ์ ์๋ ๋งํฌ๋ฅผ ๋ณด๋ด๊ฑฐ๋ ํน์ Termix ์ฌ์ฉ์์ ๊ณต์ ํ ์ ์๊ณ , ๋ณด๊ธฐ๋ง ํ ์ง ์กฐ์๊น์ง ํ ์ง ๊ณ ๋ฅผ ์ ์์ต๋๋ค. ๊ณต์ ๋ ์์์ ๋ง๋ฃ๋๊ฒ ํ๊ฑฐ๋ ์ธ์ ๋ ์ทจ์ํ ์ ์๊ณ , ์ ์ฒด ๋๋ ํธ์คํธ๋ณ๋ก ๊บผ ๋ ์ ์์ต๋๋ค.
-**์ง์ ํญ:**
-์ฌ์ฉ์ ํ๋กํ์์ ํ์ฑํ๋ ๊ฒฝ์ฐ SSH ์ธ์
๋ฐ ํญ์ด ๊ธฐ๊ธฐ/์๋ก ๊ณ ์นจ ๊ฐ์ ์ด๋ฆฐ ์ํ ์ ์ง.
+**์ธ์
๋
นํ์ ๋ก๊ทธ:**
+ํฐ๋ฏธ๋๊ณผ RDP, VNC ์ธ์
์ ๋
นํํด ๋์๋ค๊ฐ ๋์ค์ ๋ค์ ๋ณผ ์ ์์ต๋๋ค. ์ธ์
์ ํ
์คํธ ๋ก๊ทธ๋ฅผ ๋ด๋ ค๋ฐ์ ์ ์๊ณ , ์ฐ๊ฒฐ ๋ก๊ทธ๋ฅผ ๋ณด๋ฉด ์ฐ๊ฒฐํ๋ ๋์ ๋ฌด์จ ์ผ์ด ์์๋์ง ๊ทธ๋๋ก ์ ์ ์์ต๋๋ค.
-**๋ค๊ตญ์ด ์ง์:**
-์ฝ 30๊ฐ ์ธ์ด ๋ด์ฅ ์ง์([Crowdin](https://docs.termix.site/translations)์ผ๋ก ๊ด๋ฆฌ).
+**์๋ฆฌ์ผ ์ฐ๊ฒฐ:**
+๋ผ์ฐํฐ์ ์ค์์น, ๋ง์ดํฌ๋ก์ปจํธ๋กค๋ฌ ๊ฐ์ ์๋ฆฌ์ผ ์ฅ์น์ ๋ธ๋ผ์ฐ์ ๋ ๋ฐ์คํฌํฑ ์ฑ์์ ์ ์ํ ์ ์์ต๋๋ค. ๋ณด๋๋ ์ดํธ์ ๋ฐ์ดํฐ ๋นํธ, ์คํฑ ๋นํธ, ํจ๋ฆฌํฐ๋ฅผ ์ค์ ํ ์ ์์ต๋๋ค. ์ง์๋๋ ๋ธ๋ผ์ฐ์ ์์๋ Web Serial API๋ฅผ, ๋ฐ์คํฌํฑ ์ฑ์์๋ ๋ค์ดํฐ๋ธ ๋ฐฑ์๋๋ฅผ ์๋๋ค.
+
+
+
+
+
+
+**Tailscale:**
+tailnet์์ ๊ธฐ๊ธฐ๋ฅผ ๊ฐ์ ธ์ ๋ช ๋ฒ์ ํด๋ฆญ์ผ๋ก ํธ์คํธ๋ก ์ถ๊ฐํ๊ณ , Tailscale SSH๋ก ์ ์ํ๋ฉด ์ ๊ทผ ๊ถํ์ tailnet ACL์ด ์ฒ๋ฆฌํ๋ฏ๋ก ์๊ฒฉ ์ฆ๋ช
์ ์ ์ฅํ ํ์๊ฐ ์์ต๋๋ค. Headscale๊ณผ ์ฌ์ฉ์ ์ง์ ์๋ํฌ์ธํธ๋ ๋ฉ๋๋ค.
+
+
+
+
+**Proxmox:**
+Proxmox ์ธ์คํด์ค์์ ํธ์คํธ๋ฅผ ๋ฐ๋ก ๊ฐ์ ธ์ค๊ณ , ๋
ธ๋์ ๊ฒ์คํธ์ CPU์ ๋ฉ๋ชจ๋ฆฌ, ์คํ ๋ฆฌ์ง ์ํ๋ฅผ ์ ์ฉ ํญ์์ ๋ณผ ์ ์์ต๋๋ค.
+
+
+
+
+
+
+**์ํฌ์คํ์ด์ค์ ํญ:**
+ํญ๊ณผ ๋ถํ ๋ฐฐ์น๋ฅผ ํต์งธ๋ก ์ ์ฅํด ๋๊ณ ํ ๋ฒ์ ๋ค์ ์ด ์ ์์ต๋๋ค. Termix๋ ๋ง์ง๋ง ์ธ์
๋ ๊ธฐ์ตํ๊ธฐ ๋๋ฌธ์ ์๋ก ๊ณ ์นจ์ ํ๊ฑฐ๋ ๊ธฐ๊ธฐ๋ฅผ ๋ฐ๊ฟ๋ ํญ์ด ๊ทธ๋๋ก ๋์์ต๋๋ค.
+
+
+
+
+**์ค์น ์๋ด:**
+์งง์ ์ค์ ๊ณผ์ ์ด ํ๋ฉด ํ๋ฆฌ์
๊ณผ ํ
๋ง, ์ฐ๊ณ ์ถ์ ๊ธฐ๋ฅ, ์ฒซ ํธ์คํธ๋ฅผ ๊ณ ๋ฅด๋๋ก ์๋ดํฉ๋๋ค. ๊ฐ๋จ ๋ชจ๋๋ ์ฐ์ง ์๋ ๊ฒ์ ์จ๊ฒจ ์ฃผ๊ณ , ์ค์ ์ ์ธ์ ๋ ๋ค์ ํ๊ฑฐ๋ ํ๋ฆฌ์
์ ๋ฐ๊ฟ ์ ์์ต๋๋ค.
+
+
+
+
+
+
+**๋ฐ์คํฌํฑ ๋จ๋
์คํ๊ณผ ๋๊ธฐํ:**
+๋ฐ์คํฌํฑ ์ฑ์ ์์ฒด ๋ฐฑ์๋์ ๋ฐ์ดํฐ๋ฒ ์ด์ค๋ก ์๋ฒ ์์ด ํผ์ ๋์๊ฐ๋๋ค. Termix ์๋ฒ์ ์ฐ๊ฒฐํ๋ฉด ํธ์คํธ์ ์๊ฒฉ ์ฆ๋ช
, ์ค๋ํซ ๋ฑ์ ์๋ฐฉํฅ์ผ๋ก ๋๊ธฐํํ ์ ์๊ณ , ์ฐ๊ฒฐ์ ๋ก์ปฌ์์ ์์ํ ์ง ์๋ฒ๋ฅผ ๊ฑฐ์น ์ง๋ ๊ณ ๋ฅผ ์ ์์ต๋๋ค.
+
+
+
+
+**๋ช
๋ น์ค ๋๊ตฌ:**
+์
ธ๊ณผ ์คํฌ๋ฆฝํธ์์ ์ฐ๋ `termix` CLI์
๋๋ค. ํฐ๋ฏธ๋์ ์ด๊ณ , ํธ์คํธ ํ๋๋ ํ๋ฆฟ ์ ์ฒด์์ ๋ช
๋ น์ ์คํํ๊ณ , SFTP๋ก ํ์ผ์ ์ฎ๊ธฐ๊ณ , ํธ์คํธ์ ์ค๋ํซ, ์๊ฒฉ ์ฆ๋ช
์ ๊ด๋ฆฌํ ์ ์์ต๋๋ค. `npm install -g @termix-cli/cli`๋ก ์ค์นํ๊ฑฐ๋ ๋จ๋
์คํ ํ์ผ์ ๋ฐ์ผ๋ฉด ๋ฉ๋๋ค. [CLI ๋ฌธ์](https://docs.termix.site/cli)๋ฅผ ์ฐธ๊ณ ํ์ธ์.
+
+
+
+
+
+
+**๋ณด์:**
+๋น๋ฐ๋ฒํธ์ ํค๋ฅผ ๋น๋กฏํ ๋น๋ฐ ์ ๋ณด๋ ์ฌ์ฉ์๋ณ๋ก ์ํธํ๋๊ณ , ๋ฐ์ดํฐ๋ฒ ์ด์ค ํ์ผ ์์ฒด๋ ๋์คํฌ์์ ์ํธํํ ์ ์์ต๋๋ค. ์ด๋ป๊ฒ ๋์ํ๋์ง๋ [๋ฌธ์](https://docs.termix.site/security)์์ ๋ณผ ์ ์์ต๋๋ค.
+
+
+
+
+**์ธ์ด:**
+์ฝ 30๊ฐ ์ธ์ด๊ฐ ๊ธฐ๋ณธ์ผ๋ก ๋ค์ด ์์ผ๋ฉฐ [Crowdin](https://docs.termix.site/translations)์ผ๋ก ๊ด๋ฆฌํฉ๋๋ค.
@@ -199,17 +255,20 @@ Tailscale ๋คํธ์ํฌ์ ๊ธฐ๊ธฐ๋ฅผ ๋์ดํ์ฌ ํธ์คํธ๋ก ๋น ๋ฅด๊ฒ ์ถ๊ฐ
๋ ๋ง์ ๊ธฐ๋ฅ
-- **๋์๋ณด๋** - ๋์๋ณด๋์์ ์๋ฒ ์ ๋ณด๋ฅผ ํ๋์ ํ์ธ
-- **API ํค** - ์๋ํ/CI์ ์ฌ์ฉํ ๋ง๋ฃ์ผ์ด ์๋ ์ฌ์ฉ์ ๋ฒ์ API ํค ์์ฑ
-- **๋ฐ์ดํฐ ๋ด๋ณด๋ด๊ธฐ/๊ฐ์ ธ์ค๊ธฐ** - SSH ํธ์คํธ, ์๊ฒฉ ์ฆ๋ช
, ํ์ผ ๊ด๋ฆฌ์ ๋ฐ์ดํฐ์ ๋ด๋ณด๋ด๊ธฐ ๋ฐ ๊ฐ์ ธ์ค๊ธฐ
-- **์๋ SSL ์ค์ ** - HTTPS ๋ฆฌ๋๋ ์
์ ํฌํจํ ๋ด์ฅ SSL ์ธ์ฆ์ ์์ฑ ๋ฐ ๊ด๋ฆฌ
-- **๋ชจ๋ UI** - React, Tailwind CSS, Shadcn์ผ๋ก ๊ตฌ์ถ๋ ๊น๋ํ ๋ฐ์คํฌํฑ/๋ชจ๋ฐ์ผ ์นํ์ ์ธํฐํ์ด์ค. ๋ผ์ดํธ, ๋คํฌ, ๋๋ผํ๋ผ ๋ฑ ๋ค์ํ UI ํ
๋ง ์ ํ ๊ฐ๋ฅ. URL ๋ผ์ฐํธ๋ฅผ ์ฌ์ฉํ์ฌ ๋ชจ๋ ์ฐ๊ฒฐ์ ์ ์ฒด ํ๋ฉด์ผ๋ก ์ด๊ธฐ ๊ฐ๋ฅ.
-- **๋ช
๋ น์ด ๊ธฐ๋ก** - ์ด์ ์ ์คํํ SSH ๋ช
๋ น์ด์ ์๋ ์์ฑ ๋ฐ ์กฐํ
-- **๋น ๋ฅธ ์ฐ๊ฒฐ** - ์ฐ๊ฒฐ ๋ฐ์ดํฐ๋ฅผ ์ ์ฅํ์ง ์๊ณ ์๋ฒ์ ์ ์
-- **๋ช
๋ น์ด ํ๋ ํธ** - ์ผ์ชฝ Shift ํค๋ฅผ ๋ ๋ฒ ๋๋ฌ ํค๋ณด๋๋ก SSH ์ฐ๊ฒฐ์ ๋น ๋ฅด๊ฒ ์ ๊ทผ
-- **Proxmox ํตํฉ** - Proxmox ์ธ์คํด์ค์์ Termix๋ก ํธ์คํธ๋ฅผ ์๋ ์ถ๊ฐ
-- **ํ๋ถํ SSH ๊ธฐ๋ฅ** - ์ ํ ํธ์คํธ, Warpgate, TOTP ๊ธฐ๋ฐ ์ฐ๊ฒฐ, SOCKS5, ํธ์คํธ ํค ๊ฒ์ฆ, ๋น๋ฐ๋ฒํธ ์๋ ์
๋ ฅ, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, ํฌํธ ๋
ธํน, ํฐ๋ฏธ๋ ๋ก๊น
, SSH ์์ด์ ํธ ํฌ์๋ฉ, Bitwarden SSH ์์ด์ ํธ, HashiCorp Vault SSH ์๋ช
๋ฑ ์ง์.
-- **Termix ID** - Termix์ ๋ด์ฅ๋ sshid.io์ ๋๋ฑํ ๊ธฐ๋ฅ. ํธ๋ค์ ๋ฑ๋กํ๊ณ , ๋ฆฌ์กธ๋ฒ URL์ ๊ณต๊ฐ SSH ํค๋ฅผ ๊ฒ์ํ๋ฉฐ, ๋ด์ฅ CA๋ฅผ ์ฌ์ฉํ์ฌ SSH ์ธ์ฆ์๋ฅผ ๋ฐ๊ธํ ์ ์์ต๋๋ค.
+- **๋์๋ณด๋** - ์ง์ ๋ฐฐ์นํ ์นด๋๋ก ์๋ฒ ์ํ๋ฅผ ํ๋์
+- **๋คํธ์ํฌ ๊ทธ๋ํ** - ํธ์คํธ๋ฅผ ๋ฐํ์ผ๋ก ํ๋ฉ์ ๊ทธ๋ ค ์ฃผ๊ณ ์ํ๋ฅผ ์ค์๊ฐ ํ์
+- **tmux ๋ชจ๋ํฐ** - tmux ์ธ์
๊ณผ ์ฐฝ, ํ์ธ์ ๋ฏธ๋ฆฌ๋ณด๊ธฐ์ ๊ฒ์์ผ๋ก ์ดํด๋ณด๊ธฐ
+- **API ํค** - ์คํฌ๋ฆฝํธ์ CI์ฉ, ๋ง๋ฃ์ผ์ด ์๋ ์ฌ์ฉ์๋ณ ํค
+- **๋ด๋ณด๋ด๊ธฐ์ ๊ฐ์ ธ์ค๊ธฐ** - ํธ์คํธ์ ์๊ฒฉ ์ฆ๋ช
, ํ์ผ ๊ด๋ฆฌ์ ๋ฐ์ดํฐ๋ฅผ ์ฎ๊ธฐ๊ธฐ
+- **์๋ SSL** - ์ธ์ฆ์ ๋ฐ๊ธ๊ณผ ๊ฐฑ์ , HTTPS ๋ฆฌ๋ค์ด๋ ํธ๋ฅผ ์์์. ์ง์ ๋ง๋ ์ธ์ฆ์๋ ์ธ ์ ์์ต๋๋ค
+- **๋ฐ์ดํฐ๋ฒ ์ด์ค** - ๊ธฐ๋ณธ์ SQLite, PostgreSQL๊ณผ MySQL๋ ์ง์
+- **ํ๋์ ์ธ UI** - ๋ฐ์คํฌํฑ๊ณผ ๋ชจ๋ฐ์ผ์์ ๋ชจ๋ ์ธ ์ ์๋ ๊น๋ํ React ํ๋ฉด. ๋ผ์ดํธ์ ๋คํฌ, Dracula ๊ฐ์ ํ
๋ง ์ ๊ณต. ์ด๋ค ์ฐ๊ฒฐ์ด๋ URL๋ก ์ ์ฒด ํ๋ฉด์์ ์ด ์ ์์ต๋๋ค
+- **๋ช
๋ น ํ๋ ํธ** - ์ผ์ชฝ Shift๋ฅผ ๋ ๋ฒ ๋๋ฌ ํค๋ณด๋๋ก ํธ์คํธ๋ก ์ด๋
+- **ํค๋ณด๋ ๋จ์ถํค** - ํญ ์ด๋๊ณผ ๋ซ๊ธฐ ๋ฑ, ๋ชจ๋ ๋ค์ ์ง์ ํ ์ ์์ต๋๋ค
+- **Wake-on-LAN** - Termix์์๋, ์๋ํ ๋จ๊ณ์์๋ ์ปดํจํฐ๋ฅผ ์ผ๊ธฐ
+- **์ ๋ขฐํ ์ ์๋ ํ๋ก์ ์ธ์ฆ** - ๋ฆฌ๋ฒ์ค ํ๋ก์๊ฐ ๋ก๊ทธ์ธ์ ์ฒ๋ฆฌํ๊ณ ์ฌ์ฉ์ ์ ๋ณด๋ฅผ ๋๊ฒจ์ฃผ๊ธฐ
+- **ํ๋ถํ SSH ๊ธฐ๋ฅ** - ์ ํ ํธ์คํธ, Warpgate, TOTP ์
๋ ฅ, SOCKS5, ํธ์คํธ ํค ํ์ธ, ๋น๋ฐ๋ฒํธ ์๋ ์
๋ ฅ, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, ํฌํธ ๋
ธํน, ํฐ๋ฏธ๋ ๋ก๊ทธ, ์์ด์ ํธ ํฌ์๋ฉ, Bitwarden SSH ์์ด์ ํธ, HashiCorp Vault SSH ์๋ช
๋ฑ
+- **Termix ID** - sshid.io ๊ฐ์ ๊ธฐ๋ฅ์ ๋ด์ฅํ์ต๋๋ค. ํธ๋ค์ ๋ฑ๋กํ๊ณ ๋ฆฌ์กธ๋ฒ URL์ ๊ณต๊ฐ ํค๋ฅผ ์ฌ๋ฆฌ๊ณ ๋ด์ฅ CA์์ SSH ์ธ์ฆ์๋ฅผ ๋ฐ๊ธํ ์ ์์ต๋๋ค
@@ -220,15 +279,15 @@ Tailscale ๋คํธ์ํฌ์ ๊ธฐ๊ธฐ๋ฅผ ๋์ดํ์ฌ ํธ์คํธ๋ก ๋น ๋ฅด๊ฒ ์ถ๊ฐ
ํ๋ซํผ
-๋ฐฐํฌํ
+๋ฐฐํฌ ํํ
Web
-๋ชจ๋ ์ต์ ๋ธ๋ผ์ฐ์ (Chrome, Safari, Firefox) ยท PWA ์ง์
+์ต์ ๋ธ๋ผ์ฐ์ ์ ๋ฐ(Chrome, Safari, Firefox) ยท PWA ์ง์
Windows x64/ia32
-ํฌํฐ๋ธ ยท MSI ์ค์น ํ๋ก๊ทธ๋จ ยท Chocolatey
+ํฌํฐ๋ธ ยท MSI ์ค์น ํ์ผ ยท Chocolatey
Linux x64/ia32
@@ -252,9 +311,9 @@ Tailscale ๋คํธ์ํฌ์ ๊ธฐ๊ธฐ๋ฅผ ๋์ดํ์ฌ ํธ์คํธ๋ก ๋น ๋ฅด๊ฒ ์ถ๊ฐ
## ์ค์น
-๋ชจ๋ ํ๋ซํผ์ Termix๋ฅผ ์ค์นํ๋ ๋ฐฉ๋ฒ์ ๋ํ ์์ธํ ๋ด์ฉ์ Termix [๋ฌธ์](https://docs.termix.site/install)๋ฅผ ๋ฐฉ๋ฌธํ์ธ์.
+๋ชจ๋ ํ๋ซํผ์ ์์ธํ ์ค์น ๋ฐฉ๋ฒ์ [Termix ๋ฌธ์](https://docs.termix.site/install)๋ฅผ ์ฐธ๊ณ ํ์ธ์.
-๋ค์์ Docker Compose ํ์ผ ์์์
๋๋ค(์๊ฒฉ ๋ฐ์คํฌํฑ ๊ธฐ๋ฅ์ ์ฌ์ฉํ ๊ณํ์ด ์๋ค๋ฉด guacd์ ๋คํธ์ํฌ๋ฅผ ์๋ตํ ์ ์์ต๋๋ค):
+Docker Compose ์์์
๋๋ค(์๊ฒฉ ๋ฐ์คํฌํฑ ๊ธฐ๋ฅ์ ์ฐ์ง ์๋๋ค๋ฉด `guacd`์ ๋คํธ์ํฌ ๋ถ๋ถ์ ๋นผ๋ ๋ฉ๋๋ค):
```yaml
services:
@@ -291,11 +350,37 @@ networks:
driver: bridge
```
+### ๋ช
๋ น์ค ๋๊ตฌ
+
+Termix์๋ CLI๋ ์์ด์ ํฐ๋ฏธ๋์์ ์๋ฒ๋ฅผ ๊ด๋ฆฌํ๊ฑฐ๋ Termix๋ฅผ ์๊ธฐ ์คํฌ๋ฆฝํธ์ ๋ฃ์ด ์ธ ์ ์์ต๋๋ค.
+
+```bash
+npm install -g @termix-cli/cli
+termix login --url https://termix.example.com
+termix ssh 1
+```
+
+ํฐ๋ฏธ๋์ ์ด๊ณ , ํธ์คํธ ํ๋๋ ํ๋ฆฟ ์ ์ฒด์์ ๋ช
๋ น์ ์คํํ๊ณ , SFTP๋ก ํ์ผ์ ์ฎ๊ธฐ๊ณ , ํธ์คํธ์ ์ค๋ํซ, ์๊ฒฉ ์ฆ๋ช
์ ๊ด๋ฆฌํ ์ ์์ต๋๋ค. ์ ์ฒด ๋ฌธ์๋ [docs.termix.site/cli](https://docs.termix.site/cli)์ ์์ต๋๋ค.
+
+### ํด๋ผ์ฐ๋ ํธ์คํ
+
+Termix ์๋ฒ๋ ์ง ์ ๋คํธ์ํฌ๊ฐ ์๋๋ผ VPS์์ ๋๋ฆด ์๋ ์์ต๋๋ค. ๊ด๋ฆฌ ๋์ ๋คํธ์ํฌ ์์์ ๋์๊ฐ๋ฉด ์ฅ์ ๊ฐ ๋ฌ์ ๋ Termix๋ ๊ฐ์ด ๋ฉ์ถฐ์, ์ ์ ๊ณ ์ณ์ผ ํ ๋ ์ธ ์ ์๊ฒ ๋ฉ๋๋ค. ๋ฐ์์ ๋๋ฆฌ๋ฉด ์ธ์ ๋ ์ ์ํ ์ ์๊ณ ๊ณ ์ IP๋ ์๊ธฐ๋ฉฐ, VPN์ด๋ ํฌํธ ํฌ์๋ฉ ์์ด ์ด๋์๋ ๋ค์ด๊ฐ ์ ์์ต๋๋ค.
+
+[GINERNET](https://docs.termix.site/install/ginernet)์ Termix๋ฅผ ํ์ํ๊ณ ์์ผ๋ฉฐ, ๋ฌธ์์ ์ด ํ์ฌ VPS์ ๋ฐฐํฌํ๋ ๋จ๊ณ๋ณ ์๋ด๊ฐ ์์ต๋๋ค.
+
+
+
+## ํ
๋ ๋ฉํธ๋ฆฌ
+
+Termix๋ ํ๋ฃจ์ ํ ๋ฒ ์ต๋ช
์ ์์ ๋ฐ์ดํฐ๋ฅผ ๋ณด๋
๋๋ค. ์ธ์คํด์ค๊ฐ ์ผ๋ง๋ ๋์๊ฐ๋์ง, ์ด๋ค ๊ธฐ๋ฅ์ด ์ฐ์ด๋์ง ํ์
ํ๊ธฐ ์ํ ๊ฒ์
๋๋ค. ์ฌ๊ธฐ์๋ ๋ฌด์์ ์ธ์คํด์ค ID, ์ฌ์ฉ์์ ํธ์คํธ ์, ์ฑ ๋ฒ์ , ์ต๊ทผ 24์๊ฐ ๋์ ์ด ๊ธฐ๋ฅ(ํฐ๋ฏธ๋, ํ์ผ ๊ด๋ฆฌ์, ํฐ๋, Docker ๋ฑ)๋ง ๋ค์ด๊ฐ๋๋ค. ์ฌ์ฉ์ ์ด๋ฆ๊ณผ ํธ์คํธ ์ด๋ฆ, IP ์ฃผ์, ์๊ฒฉ ์ฆ๋ช
์ฒ๋ผ ๋๋ ๋ด ์๋ฒ๋ฅผ ์์๋ณผ ์ ์๋ ๊ฒ์ ์ ํ ๋ด๊ธฐ์ง ์์ต๋๋ค.
+
+๊ธฐ๋ณธ์ผ๋ก ์ผ์ ธ ์์ต๋๋ค. ๊ด๋ฆฌ ์ค์ ์ ์ผ๋ฐ์์ ๋๊ฑฐ๋, Termix๋ฅผ ์์ํ๊ธฐ ์ ์ `ENABLE_TELEMETRY=false`๋ฅผ ์ง์ ํ๋ฉด ๋ฉ๋๋ค.
+
## ํ์
-Termix๋ ๊ตฌ๋
์ด๋ ์ ๋ฃ ์๊ธ์ ๊ฐ ์๋ ๋ฌด๋ฃ ์คํ์์ค ํ๋ก์ ํธ์
๋๋ค. ์ ์ฉํ๊ฒ ์ฌ์ฉํ๊ณ ์๋ค๋ฉด ์๋ฒ ๋น์ฉ, ๋๋ฉ์ธ, ๊ฐ๋ฐ ์๊ฐ์ ์ํด ํ์์ ๊ณ ๋ คํด ์ฃผ์ธ์. ํ์์ SAML, Kubernetes, ์์ด์ ํธ ์ง์๊ณผ ๊ฐ์ ๊ธฐ๋ฅ์ ๊ตฌ์ถํ๋ ๋ฐ ํ์ํ ์ฌํญ์ ์ฐ๊ตฌํ๊ณ ํ์ตํ๋ ์๊ฐ์๋ ์ฌ์ฉ๋ฉ๋๋ค. ์๋์์ ์งํ ์ํฉ์ ํ์ธํ๊ณ ํ์ํ ์ ์์ต๋๋ค.
+Termix๋ ๋ฌด๋ฃ ์คํ ์์ค์ด๊ณ ๊ตฌ๋
์ด๋ ์ ๋ฃ ์๊ธ์ ๊ฐ ์์ต๋๋ค. ์ ์ฉํ๊ฒ ์ฐ๊ณ ๊ณ์๋ค๋ฉด ์๋ฒ ๋น์ฉ๊ณผ ๋๋ฉ์ธ, ๊ฐ๋ฐ ์๊ฐ์ ๋ณดํฌ์ด ๋๋๋ก ํ์์ ๊ณ ๋ คํด ์ฃผ์ธ์. ํ์์ SAML๊ณผ Kubernetes, ์์ด์ ํธ ์ง์ ๊ฐ์ ๊ธฐ๋ฅ์ ๋ง๋ค๊ธฐ ์ํด ์์๋ณด๊ณ ๋ฐฐ์ฐ๋ ์๊ฐ์๋ ์ฐ์
๋๋ค. ์งํ ์ํฉ์ ๋ณด๊ณ ํ์ํ์๋ ค๋ฉด ์๋๋ฅผ ๋๋ฌ ์ฃผ์ธ์.
[ํ์ํ๊ธฐ](https://donate.termix.site/)
@@ -303,7 +388,7 @@ Termix๋ ๊ตฌ๋
์ด๋ ์ ๋ฃ ์๊ธ์ ๊ฐ ์๋ ๋ฌด๋ฃ ์คํ์์ค ํ๋ก์
## ์คํฐ์
-๊ฐ๋ฐ ์ง์์ ์ํ ์ ๋ฃ ๊ด๊ณ ์ ๊ด์ฌ์ด ์์ผ์ ๊ฐ์? [mail@termix.site](mailto:mail@termix.site)๋ก ์ด๋ฉ์ผ์ ๋ณด๋ด์ฃผ์ธ์.
+์ ๋ฃ ๊ฒ์ฌ๋ก ๊ฐ๋ฐ์ ์ง์ํ๊ณ ์ถ์ผ์ ๊ฐ์? [mail@termix.site](mailto:mail@termix.site)๋ก ๋ฉ์ผ์ ๋ณด๋ด ์ฃผ์ธ์.
@@ -325,10 +410,6 @@ Termix๋ ๊ตฌ๋
์ด๋ ์ ๋ฃ ์๊ธ์ ๊ฐ ์๋ ๋ฌด๋ฃ ์คํ์์ค ํ๋ก์
-
-
-
-
@@ -340,14 +421,17 @@ Termix๋ ๊ตฌ๋
์ด๋ ์ ๋ฃ ์๊ธ์ ๊ฐ ์๋ ๋ฌด๋ฃ ์คํ์์ค ํ๋ก์
-
+
+
+
+
## ์ง์
-Termix์ ๋ํ ๋์์ด ํ์ํ๊ฑฐ๋ ๊ธฐ๋ฅ์ ์์ฒญํ๋ ค๋ฉด [Issues](https://github.com/Termix-SSH/Support/issues) ํ์ด์ง๋ฅผ ๋ฐฉ๋ฌธํ์ฌ ๋ก๊ทธ์ธํ๊ณ `New Issue`๋ฅผ ๋๋ฅด์ธ์. ์ด์๋ ๊ฐ๋ฅํ ํ ์์ธํ๊ฒ ์์ฑํ๊ณ , ์์ด๋ก ์์ฑํ๋ ๊ฒ์ด ์ข์ต๋๋ค. [Discord](https://discord.gg/jVQGdvHDrf) ์๋ฒ์ ์ฐธ์ฌํ์ฌ ์ง์ ์ฑ๋์ ์ด์ฉํ ์๋ ์์ง๋ง, ์๋ต ์๊ฐ์ด ๋ ๊ธธ ์ ์์ต๋๋ค.
+๋์์ด ํ์ํ๊ฑฐ๋ ๊ธฐ๋ฅ์ ์ ์ํ๊ณ ์ถ์ผ์ ๊ฐ์? [์ ์ด์](https://github.com/Termix-SSH/Support/issues)๋ฅผ ์ฌ๋ฆฌ๋ฉด์ ๋๋๋ก ์์ธํ, ๊ฐ๋ฅํ๋ฉด ์์ด๋ก ์ ์ด ์ฃผ์ธ์. [Discord](https://discord.gg/jVQGdvHDrf) ์ง์ ์ฑ๋์์ ๋ฌผ์ด๋ด๋ ๋์ง๋ง ๋ต๋ณ์ด ๋ฆ์ ์ ์์ต๋๋ค.
@@ -359,7 +443,7 @@ Termix์ ๋ํ ๋์์ด ํ์ํ๊ฑฐ๋ ๊ธฐ๋ฅ์ ์์ฒญํ๋ ค๋ฉด [Issues](ht
[](https://www.youtube.com/@TermixSSH/videos)
-YouTube์์ ์
๋ฐ์ดํธ ๊ฐ์ ์์ฒญํ๊ธฐ
+YouTube์์ ์
๋ฐ์ดํธ ์๊ฐ ๋ณด๊ธฐ
@@ -399,7 +483,7 @@ Termix์ ๋ํ ๋์์ด ํ์ํ๊ฑฐ๋ ๊ธฐ๋ฅ์ ์์ฒญํ๋ ค๋ฉด [Issues](ht
-์ผ๋ถ ๋น๋์ค ๋ฐ ์ด๋ฏธ์ง๋ ์ต์ ์ด ์๋๊ฑฐ๋ ๊ธฐ๋ฅ์ ์๋ฒฝํ๊ฒ ๋ณด์ฌ์ฃผ์ง ์์ ์ ์์ต๋๋ค.
+์ผ๋ถ ์์๊ณผ ์ด๋ฏธ์ง๋ ์ค๋๋์๊ฑฐ๋ ๊ธฐ๋ฅ์ ์ ๋๋ก ๋ณด์ฌ ์ฃผ์ง ๋ชปํ ์ ์์ต๋๋ค.
@@ -407,10 +491,10 @@ Termix์ ๋ํ ๋์์ด ํ์ํ๊ฑฐ๋ ๊ธฐ๋ฅ์ ์์ฒญํ๋ ค๋ฉด [Issues](ht
## ๊ณํ๋ ๊ธฐ๋ฅ
-๋ชจ๋ ๊ณํ๋ ๊ธฐ๋ฅ์ [Projects](https://github.com/orgs/Termix-SSH/projects/5)๋ฅผ ์ฐธ์กฐํ์ธ์. ๊ธฐ์ฌ๋ฅผ ์ํ์๋ฉด [Contributing](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md)์ ์ฐธ์กฐํ์ธ์.
+๊ณํ๋ ๊ธฐ๋ฅ์ ๋ชจ๋ [Projects](https://github.com/orgs/Termix-SSH/projects/5)์ ์์ต๋๋ค. ๊ธฐ์ฌํ๊ณ ์ถ๋ค๋ฉด [๊ธฐ์ฌ ์๋ด](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md)๋ฅผ ๋ด ์ฃผ์ธ์.
## ๋ผ์ด์ ์ค
-Apache License Version 2.0์ ๋ฐ๋ผ ๋ฐฐํฌ๋ฉ๋๋ค. ์์ธํ ๋ด์ฉ์ `LICENSE`๋ฅผ ์ฐธ์กฐํ์ธ์.
+Apache License 2.0์ ๋ฐ๋ผ ๋ฐฐํฌํฉ๋๋ค. ์์ธํ ๋ด์ฉ์ `LICENSE`๋ฅผ ์ฐธ๊ณ ํ์ธ์.
diff --git a/docs/readme/README-PT.md b/docs/readme/README-PT.md
index c46606c..99884a3 100644
--- a/docs/readme/README-PT.md
+++ b/docs/readme/README-PT.md
@@ -4,7 +4,7 @@
Termix
-Gerenciamento SSH auto-hospedado e acesso a area de trabalho remota
+Gestรฃo de servidores auto-hospedada, do SSH e do desktop remoto ร s automaรงรตes
English ยท
@@ -37,7 +37,7 @@
-Termix รฉ gratuito e de cรณdigo aberto. Se o achar รบtil, considere [doar](https://donate.termix.site/) para ajudar a cobrir os custos de servidor e o tempo de desenvolvimento.
+O Termix รฉ gratuito e de cรณdigo aberto. Se ele te ajuda, considera [doar](https://donate.termix.site/) para ajudar a cobrir os custos de servidor e o tempo de desenvolvimento.
@@ -56,9 +56,9 @@ Termix รฉ gratuito e de cรณdigo aberto. Se o achar รบtil, considere [doar](https
-## Visao Geral
+## Visรฃo geral
-Termix e uma plataforma de gerenciamento de servidores tudo-em-um, de codigo aberto, sempre gratuita e auto-hospedada. Ela fornece uma solucao multiplataforma para gerenciar seus servidores e infraestrutura atraves de uma interface unica e intuitiva. Termix oferece acesso a terminal SSH, controle de desktop remoto (RDP, VNC, Telnet), capacidades de tunelamento SSH, gerenciamento remoto de arquivos SSH e muitas outras ferramentas. Termix e a alternativa perfeita, gratuita e auto-hospedada ao Termius, disponivel para todas as plataformas.
+O Termix รฉ uma plataforma gratuita, de cรณdigo aberto e auto-hospedada para gerenciar os teus servidores. Ele junta num sรณ lugar terminais SSH, desktops remotos (RDP, VNC, Telnet), transferรชncia de arquivos, tรบneis, Docker, mรฉtricas e automaรงรตes, na web, no desktop e no celular. ร uma alternativa auto-hospedada ao Termius que continua gratuita para sempre.
@@ -68,126 +68,182 @@ Termix e uma plataforma de gerenciamento de servidores tudo-em-um, de codigo abe
-**Acesso ao Terminal SSH:**
-Terminal completo com suporte a tela dividida (ate 4 paineis) com um sistema de abas similar ao navegador. Inclui suporte para personalizacao do terminal incluindo temas comuns de terminal, fontes e outros componentes.
+**Terminal SSH:**
+Um terminal completo com abas como as do navegador e tela dividida, atรฉ 6 painรฉis ao mesmo tempo. Escolhe o teu tema, a fonte e as cores. Acima de cada sessรฃo hรก uma barra com CPU, memรณria e disco ao vivo, alรฉm de atalhos para os arquivos, o Docker, os tรบneis e as mรฉtricas daquele host.
-**Acesso a Area de Trabalho Remota:**
-Suporte a RDP, VNC e Telnet pelo navegador com personalizacao completa e tela dividida.
+**Desktop remoto:**
+RDP, VNC e Telnet no navegador, em abas e tela dividida como qualquer outra sessรฃo. Inclui um navegador de arquivos para as unidades RDP e envio arrastando e soltando. No desktop Windows tambรฉm dรก para abrir um host no cliente RDP nativo.
-**Gerenciamento de Tuneis SSH:**
-Crie e gerencie tuneis SSH de servidor para servidor com reconexao automatica, monitoramento de saude e encaminhamento local, remoto ou SOCKS dinamico. As configuracoes de tunel de cliente desktop para servidor sao armazenadas localmente por instalacao de desktop, snapshots de predefinicoes C2S opcionais podem ser salvos no servidor, renomeados, carregados ou excluidos quando voce quiser mover uma configuracao de tunel local entre clientes.
+**Tรบneis SSH:**
+Encaminhamento local, remoto e SOCKS dinรขmico, com reconexรฃo automรกtica e verificaรงรฃo de estado. Os tรบneis de cliente para servidor do aplicativo de desktop ficam naquela mรกquina, e dรก para salvar predefiniรงรตes no servidor para levar uma configuraรงรฃo para outro computador.
-**Gerenciador Remoto de Arquivos:**
-Gerencie arquivos diretamente em servidores remotos com suporte para visualizar e editar codigo, imagens, audio e video. Faca upload, download, renomeie, exclua e mova arquivos facilmente com suporte sudo. Inclui suporte para mover arquivos de servidor para servidor.
+**Gerenciador de arquivos:**
+Navega, edita, envia, baixa, renomeia, move e apaga arquivos por SFTP, com suporte a sudo. Vรช e edita cรณdigo, imagens, รกudio e vรญdeo. Copia arquivos direto de um servidor para outro, com o caminho mais rรกpido escolhido para ti e a integridade das transferรชncias verificada.
-**Gerenciamento de Docker e Podman:**
-Inicie, pare, pause, remova conteineres. Visualize estatisticas de conteineres. Controle conteineres usando o terminal Docker Exec. Suporta Docker e Podman como ambiente de execucao de conteineres. Nao foi feito para substituir Portainer ou Dockge, mas sim para simplesmente gerenciar seus conteineres em vez de cria-los.
+**Docker e Podman:**
+Inicia, para, pausa e remove containers, acompanha as estatรญsticas e abre um shell dentro de um deles. Funciona tanto com Docker quanto com Podman. Nรฃo รฉ para substituir o Portainer ou o Dockge, sรณ para gerenciar os containers que jรก tens.
-**Gerenciador de Hosts SSH:**
-Salve, organize e gerencie suas conexoes SSH com tags e pastas (com personalizacao de pastas e suporte a pastas aninhadas), e salve facilmente informacoes de login reutilizaveis com a capacidade de automatizar a implantacao de chaves SSH.
+**Gerenciador de hosts:**
+Salva e organiza hosts com etiquetas e pastas aninhadas que podes nomear e colorir. Reaproveita credenciais salvas entre hosts, distribui chaves SSH automaticamente, agrupa hosts sob um host pai, edita e exporta em lote, e usa a conexรฃo rรกpida para conexรตes pontuais que nรฃo queres guardar.
-**Metricas do Host:**
-Visualize o uso de CPU, memoria e disco, rede, tempo de atividade, informacoes do sistema, firewall, monitor de portas, visualizador de logs, usuarios/permissoes, certificados e muito mais na maioria dos servidores baseados em Linux. Inclui graficos de historico em serie temporal e alertas baseados em limites com suporte a ntfy e webhook.
+**Mรฉtricas de host:**
+CPU, memรณria, disco, rede, temperatura, tempo ligado, processos, portas, logins e informaรงรตes do sistema na maioria dos servidores Linux, com grรกficos de histรณrico. Os cartรตes de gerenciamento deixam cuidar de serviรงos, tarefas cron, pacotes, usuรกrios, regras de firewall, WireGuard, Tailscale, certificados SSL, logs e verificaรงรตes de saรบde sem sair do Termix.
-**Autenticacao de Usuarios:**
-Gerenciamento seguro de usuarios com controles de administrador (podem editar informacoes de outros usuarios) e suporte para OIDC/LDAP/SSO (com controle de acesso), 2FA (TOTP) e passkey (WebAuthn). Visualize sessoes ativas de usuarios em todas as plataformas e revogue permissoes. Vincule suas contas OIDC/Locais entre si. Visualize o log de auditoria de todas as acoes dos usuarios.
+**Automaรงรตes:**
+Escolhe um gatilho e depois diz o que deve acontecer. Os gatilhos incluem uma mรฉtrica passando de um limite, um host caindo ou voltando, uma verificaรงรฃo de saรบde mudando, um agendamento, um evento de container ou um webhook recebido. Os passos podem rodar comandos e trechos, controlar containers e tรบneis, acordar um host, chamar uma URL, esperar, seguir por uma condiรงรฃo, rodar outra automaรงรฃo e te avisar por ntfy, Discord ou webhook. As execuรงรตes de teste deixam experimentar com seguranรงa primeiro.
-**Integracao com Tailscale:**
-Liste dispositivos da sua rede Tailscale para adicionรก-los rapidamente como hosts, e conecte-se usando Tailscale SSH como metodo de autenticacao, deixando as ACLs da sua rede gerenciar a autorizacao sem armazenar credenciais.
+**Frotas:**
+Junta hosts numa frota escolhendo um a um ou com regras de etiquetas, para que os novos entrem sozinhos. Roda um comando em todos os hosts de uma vez, envia e busca arquivos em todos eles, instala pacotes e reรบne um inventรกrio do sistema, do kernel, da arquitetura e do tempo ligado.
-**RBAC/Compartilhamento:**
-Crie funcoes e compartilhe hosts entre usuarios/funcoes. Suporta todos os tipos de autenticacao e todos os protocolos de host.
+**Assistente de IA:**
+ร opcional e fica desligado atรฉ tu ligares. Conecta OpenAI, Anthropic, Gemini, Ollama ou qualquer endpoint compatรญvel com OpenAI e pergunta sobre a tua instalaรงรฃo. Ele lรช hosts, frotas, trechos e alertas, e propรตe mudanรงas para tu aprovares em vez de fazer sozinho. Nunca consegue mexer em credenciais, usuรกrios ou configuraรงรตes. Os administradores podem deixar desligado para toda a instรขncia, e dรก para escondรช-lo jรก na configuraรงรฃo inicial.
-**Conexoes Seriais:**
-Conecte-se a dispositivos seriais (roteadores, switches, microcontroladores, etc.) diretamente do navegador ou do aplicativo desktop. Configure taxa de baud, bits de dados, bits de parada e paridade. Usa a Web Serial API em navegadores suportados ou um backend nativo no aplicativo Electron.
+**Login e usuรกrios:**
+Contas locais alรฉm de login por OIDC, LDAP, GitHub e Google, com dois fatores (TOTP), chaves de acesso (WebAuthn) e dispositivos confiรกveis. Os administradores podem gerenciar usuรกrios, ligar grupos do OIDC a papรฉis, ver todas as sessรตes ativas em qualquer plataforma e encerrรก-las. Liga a tua conta local com a do OIDC e consulta o registro de auditoria do que cada um fez.
+**Papรฉis e compartilhamento:**
+Cria papรฉis e compartilha hosts com usuรกrios ou papรฉis em quatro nรญveis: conectar, ver, editar e gerenciar. Funciona com todos os tipos de autenticaรงรฃo e todos os protocolos, e dรก para trocar as credenciais usadas num host compartilhado.
+
+
+
+
+
+
**Alertas:**
-Defina regras de alerta baseadas em limites para metricas do host (CPU, memoria, disco, etc.) e receba notificacoes via ntfy ou webhooks quando forem ativadas. Visualize alertas ativos e resolvidos em um historico de registros.
+Define regras em mรฉtricas de host como CPU, memรณria e disco, e recebe aviso por ntfy, Discord ou webhook quando elas disparam. Vรช os alertas ativos e resolvidos num histรณrico e dispensa os que nรฃo te interessam.
+
+
+
+
+**Pรกgina inicial:**
+Uma grade de widgets que tu mesmo montas arrastando e soltando. Tem widget para status de host, ping, links de serviรงos, favoritos, busca, relรณgios, calendรกrios, contagens regressivas, notas, RSS, previsรฃo do tempo, imagens, iframes, Docker, tรบneis, grรกficos de mรฉtricas, APIs prรณprias e atรฉ um terminal ao vivo.
-**Pagina Inicial:**
-Uma pagina inicial totalmente personalizavel com uma grade de widgets de arrastar e soltar. Adicione widgets para status do host, links de servicos, relogios, notas, feeds RSS, clima, conteineres Docker, graficos de metricas do host, terminais incorporados, iframes e mais.
+**Trechos e ferramentas:**
+Salva os comandos que usas sempre e dispara com um clique, com variรกveis para o host e para o que tu digitares. Roda um mesmo comando em todos os terminais abertos e pesquisa o teu histรณrico com preenchimento automรกtico.
-**Criptografia de Banco de Dados:**
-Backend armazenado como arquivos de banco de dados SQLite criptografados. Consulte a [documentacao](https://docs.termix.site/security) para mais informacoes.
+**Compartilhar sessรฃo:**
+Compartilha ao vivo uma sessรฃo de terminal, RDP, VNC ou Telnet. Manda um link que qualquer um entra sem conta, ou compartilha com um usuรกrio especรญfico do Termix, em somente leitura ou com escrita. Os compartilhamentos podem expirar sozinhos ou ser revogados, e dรก para desligar tudo de uma vez ou por host.
-**Grafico de Rede:**
-Personalize seu Dashboard para visualizar seu homelab baseado nas suas conexoes SSH com suporte de status.
+**Gravaรงรฃo e registros de sessรฃo:**
+Grava sessรตes de terminal, RDP e VNC e reproduz depois. Baixa registros de texto de uma sessรฃo e olha o registro de conexรฃo para ver exatamente o que aconteceu durante ela.
-**Ferramentas SSH:**
-Crie trechos de comandos reutilizaveis que sao executados com um unico clique. Execute um comando simultaneamente em multiplos terminais abertos.
+**Conexรตes seriais:**
+Fala com dispositivos seriais como roteadores, switches e microcontroladores pelo navegador ou pelo aplicativo de desktop. Define taxa de transmissรฃo, bits de dados, bits de parada e paridade. Usa a API Web Serial nos navegadores compatรญveis, ou um backend nativo no aplicativo de desktop.
-**Abas Persistentes:**
-Sessoes SSH e abas permanecem abertas entre dispositivos/atualizacoes se habilitado no perfil do usuario.
+**Tailscale:**
+Traz dispositivos da tua tailnet para adicionar como hosts em poucos cliques, e conecta com Tailscale SSH para que as ACLs da tailnet cuidem do acesso sem guardar credenciais. Headscale e endpoints personalizados tambรฉm funcionam.
+
+
+
+
+**Proxmox:**
+Importa hosts direto de uma instรขncia Proxmox e acompanha as estatรญsticas de nรณs e convidados, incluindo CPU, memรณria e armazenamento, numa aba prรณpria.
+
+
+
+
+
+
+**รreas de trabalho e abas:**
+Salva um conjunto de abas com a divisรฃo da tela e reabre tudo com um clique. O Termix tambรฉm lembra da tua รบltima sessรฃo, entรฃo as abas voltam depois de recarregar e em outros dispositivos.
+
+
+
+
+**Configuraรงรฃo guiada:**
+Uma configuraรงรฃo curta te leva por escolher uma predefiniรงรฃo de interface, o tema, as funcionalidades que queres e o teu primeiro host. O modo simples esconde o que nรฃo usas, e dรก para refazer a configuraรงรฃo ou trocar de predefiniรงรฃo quando quiseres.
+
+
+
+
+
+
+**Desktop independente e sincronizaรงรฃo:**
+O aplicativo de desktop roda sozinho, com backend e banco de dados locais, sem servidor. Tambรฉm dรก para ligar num servidor Termix e sincronizar nos dois sentidos hosts, credenciais, trechos e mais, e escolher se as conexรตes saem da tua mรกquina ou passam pelo servidor.
+
+
+
+
+**Linha de comando:**
+Um CLI `termix` para o teu shell e os teus scripts. Abre terminais, roda um comando num host ou numa frota inteira, move arquivos por SFTP e gerencia hosts, trechos e credenciais. Instala com `npm install -g @termix-cli/cli` ou pega um binรกrio independente. Vรช a [documentaรงรฃo do CLI](https://docs.termix.site/cli).
+
+
+
+
+
+
+**Seguranรงa:**
+Senhas, chaves e outros segredos sรฃo criptografados por usuรกrio, e os prรณprios arquivos do banco de dados podem ser criptografados em disco. Vรช a [documentaรงรฃo](https://docs.termix.site/security) para entender como funciona.
**Idiomas:**
-Suporte integrado para aproximadamente 30 idiomas (gerenciado pelo [Crowdin](https://docs.termix.site/translations)).
+Cerca de 30 idiomas incluรญdos, gerenciados pelo [Crowdin](https://docs.termix.site/translations).
@@ -199,40 +255,43 @@ Suporte integrado para aproximadamente 30 idiomas (gerenciado pelo [Crowdin](htt
Mais funcionalidades
-- **Dashboard** - Visualize informacoes do servidor de relance no seu dashboard
-- **Chaves de API** - Crie chaves de API com escopo de usuario e datas de expiracao para uso em automacao/CI
-- **Exportacao/Importacao de Dados** - Exporte e importe hosts SSH, credenciais e dados do gerenciador de arquivos
-- **Configuracao Automatica de SSL** - Geracao e gerenciamento integrado de certificados SSL com redirecionamentos HTTPS
-- **Interface Moderna** - Interface limpa compativel com desktop/mobile construida com React, Tailwind CSS e Shadcn. Escolha entre muitos temas de interface diferentes, incluindo claro, escuro, Dracula, etc. Use rotas de URL para abrir qualquer conexao em tela cheia.
-- **Historico de Comandos** - Autocompletar e visualizar comandos SSH executados anteriormente
-- **Conexao Rapida** - Conecte-se a um servidor sem precisar salvar os dados de conexao
-- **Paleta de Comandos** - Pressione duas vezes a tecla Shift esquerda para acessar rapidamente as conexoes SSH com seu teclado
-- **Integracao com Proxmox** - Adicione automaticamente hosts ao Termix a partir da sua instancia Proxmox
-- **SSH Rico em Funcionalidades** - Suporta jump hosts, Warpgate, conexoes baseadas em TOTP, SOCKS5, verificacao de chave do host, preenchimento automatico de senhas, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, port knocking, registro de terminal, encaminhamento de agente SSH, agente SSH do Bitwarden, assinatura SSH do HashiCorp Vault, e mais.
-- **Termix ID** - Um equivalente ao sshid.io integrado ao Termix. Reivindique um identificador, publique suas chaves SSH publicas em uma URL de resolucao e use uma CA integrada para emitir certificados SSH.
+- **Painel** - Os teus servidores num relance, com cartรตes que tu mesmo organizas
+- **Grรกfico de rede** - O teu homelab desenhado a partir dos teus hosts, com status ao vivo
+- **Monitor tmux** - Percorre sessรตes, janelas e painรฉis do tmux, com prรฉvia e busca
+- **Chaves de API** - Chaves por usuรกrio com data de validade para scripts e CI
+- **Exportar e importar** - Leva e traz hosts, credenciais e dados do gerenciador de arquivos
+- **SSL automรกtico** - Certificados gerados e renovados para ti, com redirecionamento para HTTPS, ou usa os teus
+- **Bancos de dados** - SQLite por padrรฃo, com PostgreSQL e MySQL tambรฉm suportados
+- **Interface moderna** - Interface React limpa que funciona no desktop e no celular, com temas como claro, escuro e Dracula. Qualquer conexรฃo abre em tela cheia por uma URL
+- **Paleta de comandos** - Toca duas vezes no Shift esquerdo para ir a um host pelo teclado
+- **Atalhos de teclado** - Trocar de aba, fechar abas e mais, tudo remapeรกvel
+- **Wake-on-LAN** - Liga uma mรกquina pelo Termix ou por um passo de automaรงรฃo
+- **Autenticaรงรฃo por proxy confiรกvel** - Deixa um proxy reverso cuidar do login e repassar o usuรกrio
+- **SSH bem completo** - Hosts de salto, Warpgate, pedidos de TOTP, SOCKS5, verificaรงรฃo de chave de host, preenchimento automรกtico de senha, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, port knocking, registro do terminal, encaminhamento de agente, agente SSH do Bitwarden, assinatura SSH com HashiCorp Vault e mais
+- **Termix ID** - Uma versรฃo embutida do sshid.io. Registra um identificador, publica as tuas chaves pรบblicas numa URL de resoluรงรฃo e emite certificados SSH pela CA embutida
-## Suporte a Plataformas
+## Plataformas suportadas
Plataforma
-Distribuicao
+Distribuiรงรฃo
Web
-Qualquer navegador moderno (Chrome, Safari, Firefox) ยท Suporte PWA
+Qualquer navegador moderno (Chrome, Safari, Firefox) ยท Suporte a PWA
Windows x64/ia32
-Portatil ยท Instalador MSI ยท Chocolatey
+Portรกtil ยท Instalador MSI ยท Chocolatey
Linux x64/ia32
-Portatil ยท AUR ยท AppImage ยท Deb ยท Flatpak
+Portรกtil ยท AUR ยท AppImage ยท Deb ยท Flatpak
macOS x64/ia32, v12.0+
@@ -250,11 +309,11 @@ Suporte integrado para aproximadamente 30 idiomas (gerenciado pelo [Crowdin](htt
-## Instalacao
+## Instalaรงรฃo
-Visite a [documentacao](https://docs.termix.site/install) do Termix para instrucoes completas de instalacao em todas as plataformas.
+Vรช a [documentaรงรฃo do Termix](https://docs.termix.site/install) para as instruรงรตes completas de instalaรงรฃo em todas as plataformas.
-Arquivo Docker Compose de exemplo (voce pode omitir o `guacd` e a rede se nao planeja usar recursos de area de trabalho remota):
+Exemplo de arquivo Docker Compose (dรก para tirar o `guacd` e a rede se nรฃo pretendes usar o desktop remoto):
```yaml
services:
@@ -291,11 +350,37 @@ networks:
driver: bridge
```
+### Linha de comando
+
+O Termix tambรฉm tem um CLI, para gerenciares os teus servidores pelo terminal e usares o Termix nos teus prรณprios scripts.
+
+```bash
+npm install -g @termix-cli/cli
+termix login --url https://termix.example.com
+termix ssh 1
+```
+
+Ele abre terminais, roda um comando num host ou numa frota inteira, move arquivos por SFTP e gerencia hosts, trechos e credenciais. A documentaรงรฃo completa estรก em [docs.termix.site/cli](https://docs.termix.site/cli).
+
+### Hospedagem na nuvem
+
+Dรก para rodar o servidor do Termix num VPS em vez de dentro da tua prรณpria rede. Se o Termix roda na rede que ele gerencia, uma queda leva ele junto, bem na hora em que precisas dele para resolver. Rodando fora ele continua acessรญvel, te dรก um IP fixo e dรก para entrar de qualquer lugar sem VPN nem abrir portas.
+
+A [GINERNET](https://docs.termix.site/install/ginernet) patrocina o Termix, e a documentaรงรฃo tem um guia passo a passo para publicar na plataforma de VPS deles.
+
+
+
+## Telemetria
+
+O Termix manda uma vez por dia um pequeno sinal anรดnimo, para eu saber quantas instรขncias estรฃo rodando e quais funcionalidades sรฃo usadas. Ele contรฉm um ID de instรขncia aleatรณrio, quantos usuรกrios e hosts tu tens, a versรฃo do aplicativo e quais funcionalidades (terminal, gerenciador de arquivos, tรบneis, docker, etc.) foram usadas nas รบltimas 24 horas. Nunca contรฉm nomes de usuรกrio, nomes de host, endereรงos IP, credenciais ou qualquer coisa que identifique ti ou os teus servidores.
+
+Vem ligado por padrรฃo. Podes desligar nas configuraรงรตes de administraรงรฃo, em Geral, ou definir `ENABLE_TELEMETRY=false` antes mesmo de iniciar o Termix.
+
## Doar
-Termix e gratuito e de codigo aberto, sem assinaturas ou planos pagos. Se o achar util, considere doar para ajudar a cobrir custos de servidor, dominios e tempo de desenvolvimento. As doacoes tambem ajudam a financiar o tempo de pesquisa e aprendizado necessario para construir funcionalidades como suporte a SAML, Kubernetes e Agent. Acompanhe o progresso e doe abaixo.
+O Termix รฉ gratuito e de cรณdigo aberto, sem assinaturas nem planos pagos. Se ele te ajuda, considera doar para ajudar com servidores, domรญnios e tempo de desenvolvimento. As doaรงรตes tambรฉm custeiam o tempo de pesquisar e aprender o necessรกrio para funcionalidades como SAML, Kubernetes e suporte a agentes. Acompanha o progresso e doa abaixo.
[Doar](https://donate.termix.site/)
@@ -303,7 +388,7 @@ Termix e gratuito e de codigo aberto, sem assinaturas ou planos pagos. Se o acha
## Patrocinadores
-Interessado em um espaco pago para apoiar o desenvolvimento? Envie um email para [mail@termix.site](mailto:mail@termix.site).
+Tens interesse num espaรงo pago para apoiar o desenvolvimento? Escreve para [mail@termix.site](mailto:mail@termix.site).
@@ -325,10 +410,6 @@ Interessado em um espaco pago para apoiar o desenvolvimento? Envie um email para
-
-
-
-
@@ -340,18 +421,21 @@ Interessado em um espaco pago para apoiar o desenvolvimento? Envie um email para
-
+
+
+
+
## Suporte
-Se voce precisa de ajuda ou deseja solicitar uma funcionalidade para o Termix, visite a pagina de [Issues](https://github.com/Termix-SSH/Support/issues), faca login e clique em `New Issue`. Por favor, seja o mais detalhado possivel no seu relato, preferencialmente escrito em ingles. Voce tambem pode entrar no servidor do [Discord](https://discord.gg/jVQGdvHDrf) e visitar o canal de suporte, porem, os tempos de resposta podem ser mais longos.
+Precisas de ajuda ou queres pedir uma funcionalidade? Abre uma [nova issue](https://github.com/Termix-SSH/Support/issues) com o mรกximo de detalhes possรญvel, em inglรชs se der. Tambรฉm podes perguntar no canal de suporte do [Discord](https://discord.gg/jVQGdvHDrf), embora as respostas por lรก possam demorar mais.
-## Capturas de Tela
+## Capturas de tela
@@ -359,7 +443,7 @@ Se voce precisa de ajuda ou deseja solicitar uma funcionalidade para o Termix, v
[](https://www.youtube.com/@TermixSSH/videos)
-Assista resumos de atualizacoes no YouTube
+Vรช as apresentaรงรตes das atualizaรงรตes no YouTube
@@ -399,18 +483,18 @@ Se voce precisa de ajuda ou deseja solicitar uma funcionalidade para o Termix, v
-Alguns videos e imagens podem estar desatualizados ou podem nao mostrar perfeitamente as funcionalidades.
+Alguns vรญdeos e imagens podem estar desatualizados ou nรฃo mostrar as funcionalidades perfeitamente.
-## Funcionalidades Planejadas
+## Funcionalidades planejadas
-Consulte [Projetos](https://github.com/orgs/Termix-SSH/projects/5) para todas as funcionalidades planejadas. Se voce deseja contribuir, consulte [Contribuir](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md).
+Todas as funcionalidades planejadas estรฃo em [Projects](https://github.com/orgs/Termix-SSH/projects/5). Se queres contribuir, vรช [Contributing](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md).
-## Licenca
+## Licenรงa
-Distribuido sob a Licenca Apache Versao 2.0. Consulte `LICENSE` para mais informacoes.
+Distribuรญdo sob a Licenรงa Apache versรฃo 2.0. Vรช `LICENSE` para mais informaรงรตes.
diff --git a/docs/readme/README-RU.md b/docs/readme/README-RU.md
index 7db61e9..2c9115a 100644
--- a/docs/readme/README-RU.md
+++ b/docs/readme/README-RU.md
@@ -4,7 +4,7 @@
Termix
-ะกะฐะผะพััะพััะตะปัะฝะพ ัะฐะทะผะตัะฐะตะผะพะต ัะฟัะฐะฒะปะตะฝะธะต SSH ะธ ะดะพัััะฟ ะบ ัะดะฐะปัะฝะฝะพะผั ัะฐะฑะพัะตะผั ััะพะปั
+ะฃะฟัะฐะฒะปะตะฝะธะต ัะตัะฒะตัะฐะผะธ ะฝะฐ ัะฒะพัะผ ั
ะพััะธะฝะณะต, ะพั SSH ะธ ัะดะฐะปัะฝะฝะพะณะพ ัะฐะฑะพัะตะณะพ ััะพะปะฐ ะดะพ ะฐะฒัะพะผะฐัะธะทะฐัะธะน
English ยท
@@ -37,7 +37,7 @@
-Termix โ ะฑะตัะฟะปะฐัะฝัะน ะฟัะพะตะบั ั ะพัะบััััะผ ะธัั
ะพะดะฝัะผ ะบะพะดะพะผ. ะัะปะธ ะพะฝ ะฒะฐะผ ะฟะพะปะตะทะตะฝ, ัะฐััะผะพััะธัะต ะฒะพะทะผะพะถะฝะพััั [ะฟะพะถะตััะฒะพะฒะฐะฝะธั](https://donate.termix.site/) ะดะปั ะฟะพะบัััะธั ัะฐัั
ะพะดะพะฒ ะฝะฐ ัะตัะฒะตัั ะธ ะฒัะตะผั ัะฐะทัะฐะฑะพัะบะธ.
+Termix ะฑะตัะฟะปะฐัะตะฝ ะธ ั ะพัะบััััะผ ะธัั
ะพะดะฝัะผ ะบะพะดะพะผ. ะัะปะธ ะพะฝ ะฒะฐะผ ะฟัะธะณะพะดะธะปัั, ะฟะพะดัะผะฐะนัะต ะพ [ะฟะพะถะตััะฒะพะฒะฐะฝะธะธ](https://donate.termix.site/), ััะพะฑั ะฟะพะผะพัั ะฟะพะบัััั ัะฐัั
ะพะดั ะฝะฐ ัะตัะฒะตัั ะธ ะฒัะตะผั ะฝะฐ ัะฐะทัะฐะฑะพัะบั.
@@ -49,7 +49,7 @@ Termix โ ะฑะตัะฟะปะฐัะฝัะน ะฟัะพะตะบั ั ะพัะบััััะผ ะธัั
ะพะดะฝั
- ะะพััะธะณะฝััะพ 1 ัะตะฝััะฑัั 2025 ะณะพะดะฐ
+ ะะพะปััะตะฝะพ 1 ัะตะฝััะฑัั 2025 ะณะพะดะฐ
@@ -58,7 +58,7 @@ Termix โ ะฑะตัะฟะปะฐัะฝัะน ะฟัะพะตะบั ั ะพัะบััััะผ ะธัั
ะพะดะฝั
## ะะฑะทะพั
-Termix - ััะพ ะฟะปะฐััะพัะผะฐ ะดะปั ัะฟัะฐะฒะปะตะฝะธั ัะตัะฒะตัะฐะผะธ ั ะพัะบััััะผ ะธัั
ะพะดะฝัะผ ะบะพะดะพะผ, ะฝะฐะฒัะตะณะดะฐ ะฑะตัะฟะปะฐัะฝะฐั ะธ ัะฐะทะผะตัะฐะตะผะฐั ะฝะฐ ัะพะฑััะฒะตะฝะฝะพะผ ัะตัะฒะตัะต. ะะฝะฐ ะฟัะตะดะพััะฐะฒะปัะตั ะผัะปััะธะฟะปะฐััะพัะผะตะฝะฝะพะต ัะตัะตะฝะธะต ะดะปั ัะฟัะฐะฒะปะตะฝะธั ะฒะฐัะธะผะธ ัะตัะฒะตัะฐะผะธ ะธ ะธะฝััะฐััััะบัััะพะน ัะตัะตะท ะตะดะธะฝัะน ะธะฝััะธัะธะฒะฝะพ ะฟะพะฝััะฝัะน ะธะฝัะตััะตะนั. Termix ะฟัะตะดะปะฐะณะฐะตั ะดะพัััะฟ ะบ SSH-ัะตัะผะธะฝะฐะปั, ัะฟัะฐะฒะปะตะฝะธะต ัะดะฐะปะตะฝะฝัะผ ัะฐะฑะพัะธะผ ััะพะปะพะผ (RDP, VNC, Telnet), ะฒะพะทะผะพะถะฝะพััะธ SSH-ััะฝะฝะตะปะธัะพะฒะฐะฝะธั, ัะดะฐะปะตะฝะฝะพะต ัะฟัะฐะฒะปะตะฝะธะต ัะฐะนะปะฐะผะธ SSH ะธ ะผะฝะพะถะตััะฒะพ ะดััะณะธั
ะธะฝััััะผะตะฝัะพะฒ. Termix - ััะพ ะธะดะตะฐะปัะฝะฐั ะฑะตัะฟะปะฐัะฝะฐั ะฐะปััะตัะฝะฐัะธะฒะฐ Termius ั ะฒะพะทะผะพะถะฝะพัััั ัะฐะทะผะตัะตะฝะธั ะฝะฐ ัะพะฑััะฒะตะฝะฝะพะผ ัะตัะฒะตัะต, ะดะพัััะฟะฝะฐั ะดะปั ะฒัะตั
ะฟะปะฐััะพัะผ.
+Termix ััะพ ะฑะตัะฟะปะฐัะฝะฐั ะฟะปะฐััะพัะผะฐ ั ะพัะบััััะผ ะธัั
ะพะดะฝัะผ ะบะพะดะพะผ ะดะปั ัะฟัะฐะฒะปะตะฝะธั ัะตัะฒะตัะฐะผะธ ะฝะฐ ัะฒะพัะผ ั
ะพััะธะฝะณะต. ะะฝะฐ ัะพะฑะธัะฐะตั ะฒ ะพะดะฝะพะผ ะผะตััะต SSH-ัะตัะผะธะฝะฐะปั, ัะดะฐะปัะฝะฝัะต ัะฐะฑะพัะธะต ััะพะปั (RDP, VNC, Telnet), ะฟะตัะตะดะฐัั ัะฐะนะปะพะฒ, ััะฝะฝะตะปะธ, Docker, ะผะตััะธะบะธ ะธ ะฐะฒัะพะผะฐัะธะทะฐัะธะธ, ะฒ ะฑัะฐัะทะตัะต, ะฝะฐ ะบะพะผะฟัััะตัะต ะธ ะฝะฐ ัะตะปะตัะพะฝะต. ะญัะพ self-hosted ะทะฐะผะตะฝะฐ Termius, ะบะพัะพัะฐั ะพััะฐัััั ะฑะตัะฟะปะฐัะฝะพะน ะฝะฐะฒัะตะณะดะฐ.
@@ -68,126 +68,182 @@ Termix - ััะพ ะฟะปะฐััะพัะผะฐ ะดะปั ัะฟัะฐะฒะปะตะฝะธั ัะตัะฒะตัะฐะผ
-**ะะพัััะฟ ะบ SSH-ัะตัะผะธะฝะฐะปั:**
-ะะพะปะฝะพััะฝะบัะธะพะฝะฐะปัะฝัะน ัะตัะผะธะฝะฐะป ั ะฟะพะดะดะตัะถะบะพะน ัะฐะทะดะตะปะตะฝะธั ัะบัะฐะฝะฐ (ะดะพ 4 ะฟะฐะฝะตะปะตะน) ะธ ัะธััะตะผะพะน ะฒะบะปะฐะดะพะบ, ะบะฐะบ ะฒ ะฑัะฐัะทะตัะต. ะะบะปััะฐะตั ะฟะพะดะดะตัะถะบั ะฝะฐัััะพะนะบะธ ัะตัะผะธะฝะฐะปะฐ, ะฒะบะปััะฐั ะฟะพะฟัะปััะฝัะต ัะตะผั, ััะธััั ะธ ะดััะณะธะต ะบะพะผะฟะพะฝะตะฝัั.
+**SSH-ัะตัะผะธะฝะฐะป:**
+ะะพะปะฝะพัะตะฝะฝัะน ัะตัะผะธะฝะฐะป ั ะฒะบะปะฐะดะบะฐะผะธ ะบะฐะบ ะฒ ะฑัะฐัะทะตัะต ะธ ัะฐะทะดะตะปะตะฝะธะตะผ ัะบัะฐะฝะฐ, ะดะพ 6 ะฟะฐะฝะตะปะตะน ะพะดะฝะพะฒัะตะผะตะฝะฝะพ. ะขะตะผั, ััะธัั ะธ ัะฒะตัะฐ ะฒัะฑะธัะฐะตัะต ะฒั. ะะฐะด ะบะฐะถะดะพะน ัะตััะธะตะน ะตััั ะฟะฐะฝะตะปั ั ัะตะบััะตะน ะทะฐะณััะทะบะพะน ะฟัะพัะตััะพัะฐ, ะฟะฐะผััะธ ะธ ะดะธัะบะฐ, ะฐ ัะฐะบะถะต ะฑัััััะต ัััะปะบะธ ะฝะฐ ัะฐะนะปั, Docker, ััะฝะฝะตะปะธ ะธ ะผะตััะธะบะธ ััะพะณะพ ั
ะพััะฐ.
-**ะะพัััะฟ ะบ ัะดะฐะปัะฝะฝะพะผั ัะฐะฑะพัะตะผั ััะพะปั:**
-ะะพะดะดะตัะถะบะฐ RDP, VNC ะธ Telnet ัะตัะตะท ะฑัะฐัะทะตั ั ะฟะพะปะฝะพะน ะฝะฐัััะพะนะบะพะน ะธ ัะฐะทะดะตะปะตะฝะธะตะผ ัะบัะฐะฝะฐ.
+**ะฃะดะฐะปัะฝะฝัะน ัะฐะฑะพัะธะน ััะพะป:**
+RDP, VNC ะธ Telnet ะฟััะผะพ ะฒ ะฑัะฐัะทะตัะต, ะฒะพ ะฒะบะปะฐะดะบะฐั
ะธ ั ัะฐะทะดะตะปะตะฝะธะตะผ ัะบัะฐะฝะฐ, ะบะฐะบ ะธ ะปัะฑะฐั ะดััะณะฐั ัะตััะธั. ะััั ะฟัะพัะผะพัั ัะฐะนะปะพะฒ ะฝะฐ ะดะธัะบะฐั
RDP ะธ ะทะฐะณััะทะบะฐ ะฟะตัะตัะฐัะบะธะฒะฐะฝะธะตะผ. ะ ะฒะตััะธะธ ะดะปั Windows ั
ะพัั ะผะพะถะฝะพ ะพัะบัััั ะธ ะฒ ะพะฑััะฝะพะผ ะบะปะธะตะฝัะต RDP.
-**ะฃะฟัะฐะฒะปะตะฝะธะต SSH-ััะฝะฝะตะปัะผะธ:**
-ะกะพะทะดะฐะฝะธะต ะธ ัะฟัะฐะฒะปะตะฝะธะต ะผะตะถัะตัะฒะตัะฝัะผะธ SSH-ััะฝะฝะตะปัะผะธ ั ะฐะฒัะพะผะฐัะธัะตัะบะธะผ ะฟะตัะตะฟะพะดะบะปััะตะฝะธะตะผ, ะผะพะฝะธัะพัะธะฝะณะพะผ ัะพััะพัะฝะธั ะธ ะปะพะบะฐะปัะฝะพะน, ัะดะฐะปัะฝะฝะพะน ะธะปะธ ะดะธะฝะฐะผะธัะตัะบะพะน SOCKS-ะฟะตัะตะฐะดัะตัะฐัะธะตะน. ะะฐัััะพะนะบะธ ััะฝะฝะตะปะตะน ยซะดะตัะบัะพะฟะฝัะน ะบะปะธะตะฝั - ัะตัะฒะตัยป ั
ัะฐะฝัััั ะปะพะบะฐะปัะฝะพ ะดะปั ะบะฐะถะดะพะน ัััะฐะฝะพะฒะบะธ; ะพะฟัะธะพะฝะฐะปัะฝัะต ัะฝะธะผะบะธ C2S-ะฟัะตัะตัะพะฒ ะผะพะถะฝะพ ัะพั
ัะฐะฝััั ะฝะฐ ัะตัะฒะตัะต, ะฟะตัะตะธะผะตะฝะพะฒัะฒะฐัั, ะทะฐะณััะถะฐัั ะธะปะธ ัะดะฐะปััั, ะบะพะณะดะฐ ะฒั ั
ะพัะธัะต ะฟะตัะตะฝะตััะธ ะปะพะบะฐะปัะฝัั ะบะพะฝัะธะณััะฐัะธั ััะฝะฝะตะปั ะผะตะถะดั ะบะปะธะตะฝัะฐะผะธ.
+**SSH-ััะฝะฝะตะปะธ:**
+ะะพะบะฐะปัะฝะฐั, ัะดะฐะปัะฝะฝะฐั ะธ ะดะธะฝะฐะผะธัะตัะบะฐั ะฟะตัะตะฐะดัะตัะฐัะธั SOCKS ั ะฐะฒัะพะผะฐัะธัะตัะบะธะผ ะฟะตัะตะฟะพะดะบะปััะตะฝะธะตะผ ะธ ะฟัะพะฒะตัะบะพะน ัะพััะพัะฝะธั. ะขัะฝะฝะตะปะธ ะพั ะบะปะธะตะฝัะฐ ะบ ัะตัะฒะตัั ะฒ ะฝะฐััะพะปัะฝะพะผ ะฟัะธะปะพะถะตะฝะธะธ ั
ัะฐะฝัััั ะฝะฐ ััะพะผ ะบะพะผะฟัััะตัะต, ะฐ ะฝะฐะฑะพัั ะฝะฐัััะพะตะบ ะผะพะถะฝะพ ัะพั
ัะฐะฝะธัั ะฝะฐ ัะตัะฒะตัะต, ััะพะฑั ะฟะตัะตะฝะตััะธ ะบะพะฝัะธะณััะฐัะธั ะฝะฐ ะดััะณัั ะผะฐัะธะฝั.
-**ะฃะดะฐะปัะฝะฝัะน ัะฐะนะปะพะฒัะน ะผะตะฝะตะดะถะตั:**
-ะฃะฟัะฐะฒะปะตะฝะธะต ัะฐะนะปะฐะผะธ ะฝะตะฟะพััะตะดััะฒะตะฝะฝะพ ะฝะฐ ัะดะฐะปัะฝะฝัั
ัะตัะฒะตัะฐั
ั ะฟะพะดะดะตัะถะบะพะน ะฟัะพัะผะพััะฐ ะธ ัะตะดะฐะบัะธัะพะฒะฐะฝะธั ะบะพะดะฐ, ะธะทะพะฑัะฐะถะตะฝะธะน, ะฐัะดะธะพ ะธ ะฒะธะดะตะพ. ะะฐะณััะทะบะฐ, ัะบะฐัะธะฒะฐะฝะธะต, ะฟะตัะตะธะผะตะฝะพะฒะฐะฝะธะต, ัะดะฐะปะตะฝะธะต ะธ ะฟะตัะตะผะตัะตะฝะธะต ัะฐะนะปะพะฒ ั ะฟะพะดะดะตัะถะบะพะน sudo. ะะบะปััะฐะตั ะฟะพะดะดะตัะถะบั ะฟะตัะตะผะตัะตะฝะธั ัะฐะนะปะพะฒ ั ัะตัะฒะตัะฐ ะฝะฐ ัะตัะฒะตั.
+**ะคะฐะนะปะพะฒัะน ะผะตะฝะตะดะถะตั:**
+ะัะพัะผะฐััะธะฒะฐะนัะต, ัะตะดะฐะบัะธััะนัะต, ะทะฐะณััะถะฐะนัะต, ัะบะฐัะธะฒะฐะนัะต, ะฟะตัะตะธะผะตะฝะพะฒัะฒะฐะนัะต, ะฟะตัะตะผะตัะฐะนัะต ะธ ัะดะฐะปัะนัะต ัะฐะนะปั ะฟะพ SFTP, ะฒ ัะพะผ ัะธัะปะต ัะตัะตะท sudo. ะกะผะพััะธัะต ะธ ะฟัะฐะฒััะต ะบะพะด, ะธะทะพะฑัะฐะถะตะฝะธั, ะฐัะดะธะพ ะธ ะฒะธะดะตะพ. ะะพะฟะธััะนัะต ัะฐะนะปั ะฝะฐะฟััะผัั ั ะพะดะฝะพะณะพ ัะตัะฒะตัะฐ ะฝะฐ ะดััะณะพะน: ัะฐะผัะน ะฑัััััะน ะผะฐััััั ะฟะพะดะฑะธัะฐะตััั ัะฐะผ, ะฐ ัะตะปะพััะฝะพััั ะฟะตัะตะดะฐัะธ ะฟัะพะฒะตััะตััั.
-**ะฃะฟัะฐะฒะปะตะฝะธะต Docker ะธ Podman:**
-ะะฐะฟััะบ, ะพััะฐะฝะพะฒะบะฐ, ะฟัะธะพััะฐะฝะพะฒะบะฐ, ัะดะฐะปะตะฝะธะต ะบะพะฝัะตะนะฝะตัะพะฒ. ะัะพัะผะพัั ััะฐัะธััะธะบะธ ะบะพะฝัะตะนะฝะตัะพะฒ. ะฃะฟัะฐะฒะปะตะฝะธะต ะบะพะฝัะตะนะฝะตัะพะผ ัะตัะตะท ัะตัะผะธะฝะฐะป docker exec. ะะพะดะดะตัะถะธะฒะฐะตั ะบะฐะบ Docker, ัะฐะบ ะธ Podman ะฒ ะบะฐัะตััะฒะต ััะตะดั ะฒัะฟะพะปะฝะตะฝะธั ะบะพะฝัะตะนะฝะตัะพะฒ. ะะต ะฟัะตะดะฝะฐะทะฝะฐัะตะฝ ะดะปั ะทะฐะผะตะฝั Portainer ะธะปะธ Dockge, ะฐ ัะบะพัะตะต ะดะปั ะฟัะพััะพะณะพ ัะฟัะฐะฒะปะตะฝะธั ะบะพะฝัะตะนะฝะตัะฐะผะธ ะฟะพ ััะฐะฒะฝะตะฝะธั ั ะธั
ัะพะทะดะฐะฝะธะตะผ.
+**Docker ะธ Podman:**
+ะะฐะฟััะบะฐะนัะต, ะพััะฐะฝะฐะฒะปะธะฒะฐะนัะต, ััะฐะฒััะต ะฝะฐ ะฟะฐัะทั ะธ ัะดะฐะปัะนัะต ะบะพะฝัะตะนะฝะตัั, ัะผะพััะธัะต ะธั
ะฝะฐะณััะทะบั ะธ ะพัะบััะฒะฐะนัะต ะพะฑะพะปะพัะบั ะฒะฝัััะธ. ะ ะฐะฑะพัะฐะตั ะธ ั Docker, ะธ ั Podman. ะญัะพ ะฝะต ะทะฐะผะตะฝะฐ Portainer ะธะปะธ Dockge, ะฐ ัะฟะพัะพะฑ ัะฟัะฐะฒะปััั ัะตะผะธ ะบะพะฝัะตะนะฝะตัะฐะผะธ, ััะพ ั ะฒะฐั ัะถะต ะตััั.
-**ะะตะฝะตะดะถะตั SSH-ั
ะพััะพะฒ:**
-ะกะพั
ัะฐะฝะตะฝะธะต, ะพัะณะฐะฝะธะทะฐัะธั ะธ ัะฟัะฐะฒะปะตะฝะธะต SSH-ะฟะพะดะบะปััะตะฝะธัะผะธ ั ะฟะพะผะพััั ัะตะณะพะฒ ะธ ะฟะฐะฟะพะบ (ั ะฝะฐัััะพะนะบะพะน ะฟะฐะฟะพะบ ะธ ะฟะพะดะดะตัะถะบะพะน ะฒะปะพะถะตะฝะฝัั
ะฟะฐะฟะพะบ), ั ะฒะพะทะผะพะถะฝะพัััั ัะพั
ัะฐะฝะตะฝะธั ะดะฐะฝะฝัั
ะดะปั ะฟะพะฒัะพัะฝะพะณะพ ะฒั
ะพะดะฐ ะธ ะฐะฒัะพะผะฐัะธะทะฐัะธะธ ัะฐะทะฒััััะฒะฐะฝะธั SSH-ะบะปััะตะน.
+**ะะตะฝะตะดะถะตั ั
ะพััะพะฒ:**
+ะฅัะฐะฝะธัะต ะธ ัะฟะพััะดะพัะธะฒะฐะนัะต ั
ะพััั ั ะฟะพะผะพััั ะผะตัะพะบ ะธ ะฒะปะพะถะตะฝะฝัั
ะฟะฐะฟะพะบ, ะบะพัะพััะผ ะผะพะถะฝะพ ะทะฐะดะฐัั ะธะผั ะธ ัะฒะตั. ะัะฟะพะปัะทัะนัะต ัะพั
ัะฐะฝัะฝะฝัะต ััััะฝัะต ะดะฐะฝะฝัะต ะฝะฐ ะฝะตัะบะพะปัะบะธั
ั
ะพััะฐั
, ัะฐะทะฒะพัะฐัะธะฒะฐะนัะต SSH-ะบะปััะธ ะฐะฒัะพะผะฐัะธัะตัะบะธ, ะณััะฟะฟะธััะนัะต ั
ะพััั ะฟะพะด ัะพะดะธัะตะปััะบะธะผ, ัะตะดะฐะบัะธััะนัะต ะธ ะฒัะณััะถะฐะนัะต ะฟะฐะบะตัะฝะพ, ะฐ ะดะปั ัะฐะทะพะฒัั
ะฟะพะดะบะปััะตะฝะธะน, ะบะพัะพััะต ะฝะต ั
ะพัะตััั ัะพั
ัะฐะฝััั, ะตััั ะฑััััะพะต ะฟะพะดะบะปััะตะฝะธะต.
-**ะะตััะธะบะธ ั
ะพััะฐ:**
-ะัะพัะผะพัั ะธัะฟะพะปัะทะพะฒะฐะฝะธั CPU, ะฟะฐะผััะธ ะธ ะดะธัะบะฐ, ัะตัะธ, ะฒัะตะผะตะฝะธ ัะฐะฑะพัั, ะธะฝัะพัะผะฐัะธะธ ะพ ัะธััะตะผะต, ัะฐะนัะฒะพะปะฐ, ะผะพะฝะธัะพัะฐ ะฟะพััะพะฒ, ะฟัะพัะผะพัััะธะบะฐ ะปะพะณะพะฒ, ะฟะพะปัะทะพะฒะฐัะตะปะตะน/ะฟัะฐะฒ ะดะพัััะฟะฐ, ัะตััะธัะธะบะฐัะพะฒ ะธ ะผะฝะพะณะพะณะพ ะดััะณะพะณะพ ะฝะฐ ะฑะพะปััะธะฝััะฒะต ัะตัะฒะตัะพะฒ ะฝะฐ ะฑะฐะทะต Linux. ะะบะปััะฐะตั ะณัะฐัะธะบะธ ะธััะพัะธะธ ะฒัะตะผะตะฝะฝัั
ััะดะพะฒ ะธ ะพะฟะพะฒะตัะตะฝะธั ะฝะฐ ะพัะฝะพะฒะต ะฟะพัะพะณะพะฒัั
ะทะฝะฐัะตะฝะธะน ั ะฟะพะดะดะตัะถะบะพะน ntfy ะธ ะฒะตะฑั
ัะบะพะฒ.
+**ะะตััะธะบะธ ั
ะพััะพะฒ:**
+ะัะพัะตััะพั, ะฟะฐะผััั, ะดะธัะบ, ัะตัั, ัะตะผะฟะตัะฐัััะฐ, ะฒัะตะผั ัะฐะฑะพัั, ะฟัะพัะตััั, ะฟะพััั, ะฒั
ะพะดั ะฒ ัะธััะตะผั ะธ ัะฒะตะดะตะฝะธั ะพ ัะธััะตะผะต ะฝะฐ ะฑะพะปััะธะฝััะฒะต ัะตัะฒะตัะพะฒ Linux, ั ะณัะฐัะธะบะฐะผะธ ะทะฐ ะฟัะพัะปัะต ะฟะตัะธะพะดั. ะะฐััะพัะบะธ ัะฟัะฐะฒะปะตะฝะธั ะฟะพะทะฒะพะปััั ัะฐะฑะพัะฐัั ัะพ ัะปัะถะฑะฐะผะธ, ะทะฐะดะฐัะฐะผะธ cron, ะฟะฐะบะตัะฐะผะธ, ะฟะพะปัะทะพะฒะฐัะตะปัะผะธ, ะฟัะฐะฒะธะปะฐะผะธ ะฑัะฐะฝะดะผะฐัััะฐ, WireGuard, Tailscale, ัะตััะธัะธะบะฐัะฐะผะธ SSL, ะถััะฝะฐะปะฐะผะธ ะธ ะฟัะพะฒะตัะบะฐะผะธ ัะพััะพัะฝะธั, ะฝะต ะฒัั
ะพะดั ะธะท Termix.
-**ะััะตะฝัะธัะธะบะฐัะธั ะฟะพะปัะทะพะฒะฐัะตะปะตะน:**
-ะะตะทะพะฟะฐัะฝะพะต ัะฟัะฐะฒะปะตะฝะธะต ะฟะพะปัะทะพะฒะฐัะตะปัะผะธ ั ะฐะดะผะธะฝะธัััะฐัะธะฒะฝัะผ ะบะพะฝััะพะปะตะผ (ะผะพะถะตั ัะตะดะฐะบัะธัะพะฒะฐัั ะธะฝัะพัะผะฐัะธั ะดััะณะธั
ะฟะพะปัะทะพะฒะฐัะตะปะตะน) ะธ ะฟะพะดะดะตัะถะบะพะน OIDC/LDAP/SSO (ั ะบะพะฝััะพะปะตะผ ะดะพัััะฟะฐ), 2FA (TOTP) ะธ ะฟะพะดะดะตัะถะบะพะน ะบะปััะตะน ะดะพัััะฟะฐ (WebAuthn). ะัะพัะผะพัั ะฐะบัะธะฒะฝัั
ัะตััะธะน ะฟะพะปัะทะพะฒะฐัะตะปะตะน ะฝะฐ ะฒัะตั
ะฟะปะฐััะพัะผะฐั
ะธ ะพัะทัะฒ ะฟัะฐะฒ ะดะพัััะฟะฐ. ะกะฒัะทัะฒะฐะฝะธะต ะฐะบะบะฐัะฝัะพะฒ OIDC/ะปะพะบะฐะปัะฝัั
ะฐะบะบะฐัะฝัะพะฒ. ะัะพัะผะพัั ะถััะฝะฐะปะฐ ะฐัะดะธัะฐ ะดะตะนััะฒะธะน ะฒัะตั
ะฟะพะปัะทะพะฒะฐัะตะปะตะน.
+**ะะฒัะพะผะฐัะธะทะฐัะธะธ:**
+ะัะฑะตัะธัะต ัะพะฑััะธะต, ะฐ ะทะฐัะตะผ ะพะฟะธัะธัะต, ััะพ ะดะพะปะถะฝะพ ะฟัะพะธะทะพะนัะธ. ะกะพะฑััะธะตะผ ะผะพะถะตั ะฑััั ะฟัะตะฒััะตะฝะธะต ะฟะพัะพะณะฐ ะผะตััะธะบะพะน, ั
ะพัั, ะบะพัะพััะน ัะฟะฐะป ะธะปะธ ะฒะตัะฝัะปัั, ะธะทะผะตะฝะตะฝะธะต ะฟัะพะฒะตัะบะธ ัะพััะพัะฝะธั, ัะฐัะฟะธัะฐะฝะธะต, ัะพะฑััะธะต ะบะพะฝัะตะนะฝะตัะฐ ะธะปะธ ะฒั
ะพะดััะธะน webhook. ะจะฐะณะธ ัะผะตัั ะฒัะฟะพะปะฝััั ะบะพะผะฐะฝะดั ะธ ัะฝะธะฟะฟะตัั, ัะฟัะฐะฒะปััั ะบะพะฝัะตะนะฝะตัะฐะผะธ ะธ ััะฝะฝะตะปัะผะธ, ะฑัะดะธัั ั
ะพัั, ะพะฑัะฐัะฐัััั ะฟะพ ะฐะดัะตัั, ะถะดะฐัั, ะฒะตัะฒะธัััั ะฟะพ ััะปะพะฒะธั, ะทะฐะฟััะบะฐัั ะดััะณัั ะฐะฒัะพะผะฐัะธะทะฐัะธั ะธ ะฟัะธััะปะฐัั ัะฒะตะดะพะผะปะตะฝะธั ัะตัะตะท ntfy, Discord ะธะปะธ webhook. ะขะตััะพะฒัะน ะทะฐะฟััะบ ะฟะพะทะฒะพะปัะตั ะฒัั ะฑะตะทะพะฟะฐัะฝะพ ะฟัะพะฒะตัะธัั.
-**ะะฝัะตะณัะฐัะธั ั Tailscale:**
-ะกะฟะธัะพะบ ััััะพะนััะฒ ะฒะฐัะตะน ัะตัะธ Tailscale ะดะปั ะฑััััะพะณะพ ะดะพะฑะฐะฒะปะตะฝะธั ะธั
ะฒ ะบะฐัะตััะฒะต ั
ะพััะพะฒ ะธ ะฟะพะดะบะปััะตะฝะธะต ัะตัะตะท Tailscale SSH ะฒ ะบะฐัะตััะฒะต ะผะตัะพะดะฐ ะฐััะตะฝัะธัะธะบะฐัะธะธ, ะฟะพะทะฒะพะปัั ACL ะฒะฐัะตะน ัะตัะธ ัะฟัะฐะฒะปััั ะฐะฒัะพัะธะทะฐัะธะตะน ะฑะตะท ั
ัะฐะฝะตะฝะธั ััััะฝัั
ะดะฐะฝะฝัั
.
+**ะคะปะพัั:**
+ะะฑัะตะดะธะฝัะนัะต ั
ะพััั ะฒะพ ัะปะพั ะฒัััะฝัั ะธะปะธ ะฟะพ ะฟัะฐะฒะธะปะฐะผ ะผะตัะพะบ, ััะพะฑั ะฝะพะฒัะต ั
ะพััั ะฟะพะฟะฐะดะฐะปะธ ััะดะฐ ัะฐะผะธ. ะัะฟะพะปะฝัะนัะต ะพะดะฝั ะบะพะผะฐะฝะดั ััะฐะทั ะฝะฐ ะฒัะตั
ั
ะพััะฐั
, ะพัะฟัะฐะฒะปัะนัะต ะธ ะทะฐะฑะธัะฐะนัะต ัะฐะนะปั ัะพ ะฒัะตั
, ัััะฐะฝะฐะฒะปะธะฒะฐะนัะต ะฟะฐะบะตัั ะธ ัะพะฑะธัะฐะนัะต ัะฒะพะดะบั ะฟะพ ัะธััะตะผะต, ัะดัั, ะฐัั
ะธัะตะบัััะต ะธ ะฒัะตะผะตะฝะธ ัะฐะฑะพัั.
-**RBAC/ะะฑัะธะน ะดะพัััะฟ:**
-ะกะพะทะดะฐะฝะธะต ัะพะปะตะน ะธ ะฟัะตะดะพััะฐะฒะปะตะฝะธะต ะพะฑัะตะณะพ ะดะพัััะฟะฐ ะบ ั
ะพััะฐะผ ะดะปั ะฟะพะปัะทะพะฒะฐัะตะปะตะน/ัะพะปะตะน. ะะพะดะดะตัะถะธะฒะฐะตั ะฒัะต ัะธะฟั ะฐััะตะฝัะธัะธะบะฐัะธะธ ะธ ะฒัะต ะฟัะพัะพะบะพะปั ั
ะพััะพะฒ.
+**ะะ-ะฟะพะผะพัะฝะธะบ:**
+ะะตะพะฑัะทะฐัะตะปัะฝะฐั ะฒะพะทะผะพะถะฝะพััั, ะฒัะบะปััะตะฝะฝะฐั ะดะพ ัะตั
ะฟะพั, ะฟะพะบะฐ ะฒั ัะฐะผะธ ะตั ะฝะต ะฒะบะปััะธัะต. ะะพะดะบะปััะธัะต OpenAI, Anthropic, Gemini, Ollama ะธะปะธ ะปัะฑะพะน ัะพะฒะผะตััะธะผัะน ั OpenAI ะฐะดัะตั ะธ ัะฟัะฐัะธะฒะฐะนัะต ะพ ัะฒะพะตะน ัะธััะตะผะต. ะะฝ ัะธัะฐะตั ั
ะพััั, ัะปะพัั, ัะฝะธะฟะฟะตัั ะธ ะพะฟะพะฒะตัะตะฝะธั ะธ ะฟัะตะดะปะฐะณะฐะตั ะธะทะผะตะฝะตะฝะธั ะฝะฐ ะฒะฐัะต ััะฒะตัะถะดะตะฝะธะต, ะฐ ะฝะต ะฒะฝะพัะธั ะธั
ัะฐะผ. ะะพ ััััะฝัั
ะดะฐะฝะฝัั
, ะฟะพะปัะทะพะฒะฐัะตะปะตะน ะธ ะฝะฐัััะพะตะบ ะพะฝ ะฝะต ะดะพะฑะตััััั ะฝะธะบะพะณะดะฐ. ะะดะผะธะฝะธัััะฐัะพัั ะผะพะณัั ะพััะฐะฒะธัั ะตะณะพ ะฒัะบะปััะตะฝะฝัะผ ะดะปั ะฒัะตะน ัััะฐะฝะพะฒะบะธ, ะฐ ะฒั ะผะพะถะตัะต ัะบัััั ะตะณะพ ะตัั ะฟัะธ ะฟะตัะฒะธัะฝะพะน ะฝะฐัััะพะนะบะต.
-**ะะพัะปะตะดะพะฒะฐัะตะปัะฝัะต ะฟะพะดะบะปััะตะฝะธั:**
-ะะพะดะบะปััะตะฝะธะต ะบ ะฟะพัะปะตะดะพะฒะฐัะตะปัะฝัะผ ััััะพะนััะฒะฐะผ (ะผะฐัััััะธะทะฐัะพัั, ะบะพะผะผััะฐัะพัั, ะผะธะบัะพะบะพะฝััะพะปะปะตัั ะธ ั. ะด.) ะฝะฐะฟััะผัั ะธะท ะฑัะฐัะทะตัะฐ ะธะปะธ ะฟัะธะปะพะถะตะฝะธั ะดะปั ัะฐะฑะพัะตะณะพ ััะพะปะฐ. ะะฐัััะพะนะบะฐ ัะบะพัะพััะธ ะฟะตัะตะดะฐัะธ ะดะฐะฝะฝัั
, ะฑะธัะพะฒ ะดะฐะฝะฝัั
, ััะพะฟ-ะฑะธัะพะฒ ะธ ัััะฝะพััะธ. ะัะฟะพะปัะทัะตั Web Serial API ะฒ ะฟะพะดะดะตัะถะธะฒะฐะตะผัั
ะฑัะฐัะทะตัะฐั
ะธะปะธ ะฝะฐัะธะฒะฝัะน ะฑัะบะตะฝะด ะฒ ะฟัะธะปะพะถะตะฝะธะธ Electron.
+**ะั
ะพะด ะธ ะฟะพะปัะทะพะฒะฐัะตะปะธ:**
+ะะพะบะฐะปัะฝัะต ััััะฝัะต ะทะฐะฟะธัะธ, ะฐ ัะฐะบะถะต ะฒั
ะพะด ัะตัะตะท OIDC, LDAP, GitHub ะธ Google, ั ะดะฒัั
ัะฐะบัะพัะฝะพะน ะฟัะพะฒะตัะบะพะน (TOTP), ะบะปััะฐะผะธ ะดะพัััะฟะฐ (WebAuthn) ะธ ะดะพะฒะตัะตะฝะฝัะผะธ ััััะพะนััะฒะฐะผะธ. ะะดะผะธะฝะธัััะฐัะพัั ะผะพะณัั ัะฟัะฐะฒะปััั ะฟะพะปัะทะพะฒะฐัะตะปัะผะธ, ัะพะฟะพััะฐะฒะปััั ะณััะฟะฟั OIDC ั ัะพะปัะผะธ, ะฒะธะดะตัั ะฒัะต ะฐะบัะธะฒะฝัะต ัะตััะธะธ ะฝะฐ ะฒัะตั
ะฟะปะฐััะพัะผะฐั
ะธ ะทะฐะฒะตััะฐัั ะธั
. ะกะฒัะถะธัะต ะปะพะบะฐะปัะฝัั ััััะฝัั ะทะฐะฟะธัั ั OIDC ะธ ัะผะพััะธัะต ะถััะฝะฐะป ะฐัะดะธัะฐ ะดะตะนััะฒะธะน ะบะฐะถะดะพะณะพ.
+**ะ ะพะปะธ ะธ ะพะฑัะธะน ะดะพัััะฟ:**
+ะกะพะทะดะฐะฒะฐะนัะต ัะพะปะธ ะธ ะดะตะปะธัะตัั ั
ะพััะฐะผะธ ั ะฟะพะปัะทะพะฒะฐัะตะปัะผะธ ะธะปะธ ัะพะปัะผะธ ะฝะฐ ัะตััััั
ััะพะฒะฝัั
: ะฟะพะดะบะปััะตะฝะธะต, ะฟัะพัะผะพัั, ะธะทะผะตะฝะตะฝะธะต ะธ ัะฟัะฐะฒะปะตะฝะธะต. ะ ะฐะฑะพัะฐะตั ัะพ ะฒัะตะผะธ ัะฟะพัะพะฑะฐะผะธ ะฐััะตะฝัะธัะธะบะฐัะธะธ ะธ ะฒัะตะผะธ ะฟัะพัะพะบะพะปะฐะผะธ, ะฐ ััััะฝัะต ะดะฐะฝะฝัะต ะดะปั ะพะฑัะตะณะพ ั
ะพััะฐ ะผะพะถะฝะพ ะฟะตัะตะพะฟัะตะดะตะปะธัั.
+
+
+
+
+
+
**ะะฟะพะฒะตัะตะฝะธั:**
-ะะฐัััะพะนัะต ะฟัะฐะฒะธะปะฐ ะพะฟะพะฒะตัะตะฝะธะน ะฝะฐ ะพัะฝะพะฒะต ะฟะพัะพะณะพะฒัั
ะทะฝะฐัะตะฝะธะน ะดะปั ะผะตััะธะบ ั
ะพััะฐ (CPU, ะฟะฐะผััั, ะดะธัะบ ะธ ั. ะด.) ะธ ะฟะพะปััะฐะนัะต ัะฒะตะดะพะผะปะตะฝะธั ัะตัะตะท ntfy ะธะปะธ ะฒะตะฑั
ัะบะธ ะฟัะธ ะธั
ััะฐะฑะฐััะฒะฐะฝะธะธ. ะัะพัะผะฐััะธะฒะฐะนัะต ะฐะบัะธะฒะฝัะต ะธ ัะฐะทัะตััะฝะฝัะต ะพะฟะพะฒะตัะตะฝะธั ะฒ ะถััะฝะฐะปะต ะธััะพัะธะธ.
+ะะฐะดะฐะนัะต ะฟัะฐะฒะธะปะฐ ะฟะพ ะผะตััะธะบะฐะผ ั
ะพััะพะฒ, ะฝะฐะฟัะธะผะตั ะฟัะพัะตััะพัั, ะฟะฐะผััะธ ะธ ะดะธัะบั, ะธ ะฟะพะปััะฐะนัะต ัะฒะตะดะพะผะปะตะฝะธั ัะตัะตะท ntfy, Discord ะธะปะธ webhook, ะบะพะณะดะฐ ะพะฝะธ ััะฐะฑะฐััะฒะฐัั. ะกะผะพััะธัะต ะฐะบัะธะฒะฝัะต ะธ ัะถะต ัะฝัััะต ะพะฟะพะฒะตัะตะฝะธั ะฒ ะถััะฝะฐะปะต ะธ ัะฑะธัะฐะนัะต ัะต, ััะพ ะฒะฐะผ ะฝะต ะฝัะถะฝั.
-
-
**ะะพะผะฐัะฝัั ัััะฐะฝะธัะฐ:**
-ะะพะปะฝะพัััั ะฝะฐัััะฐะธะฒะฐะตะผะฐั ะดะพะผะฐัะฝัั ัััะฐะฝะธัะฐ ั ัะตัะบะพะน ะฒะธะดะถะตัะพะฒ ั ะฟะตัะตัะฐัะบะธะฒะฐะฝะธะตะผ. ะะพะฑะฐะฒะปัะนัะต ะฒะธะดะถะตัั ะดะปั ััะฐัััะฐ ั
ะพััะฐ, ัััะปะพะบ ะฝะฐ ัะตัะฒะธัั, ัะฐัะพะฒ, ะทะฐะผะตัะพะบ, RSS-ะปะตะฝั, ะฟะพะณะพะดั, ะบะพะฝัะตะนะฝะตัะพะฒ Docker, ะณัะฐัะธะบะพะฒ ะผะตััะธะบ ั
ะพััะฐ, ะฒัััะพะตะฝะฝัั
ัะตัะผะธะฝะฐะปะพะฒ, iframe ะธ ะผะฝะพะณะพะณะพ ะดััะณะพะณะพ.
-
-
-
-
-**ะจะธััะพะฒะฐะฝะธะต ะฑะฐะทั ะดะฐะฝะฝัั
:**
-ะัะบะตะฝะด ั
ัะฐะฝะธััั ะฒ ะฒะธะดะต ะทะฐัะธััะพะฒะฐะฝะฝัั
ัะฐะนะปะพะฒ ะฑะฐะทั ะดะฐะฝะฝัั
SQLite. ะะพะดัะพะฑะฝะตะต ะฒ [ะดะพะบัะผะตะฝัะฐัะธะธ](https://docs.termix.site/security).
+ะกะตัะบะฐ ะฒะธะดะถะตัะพะฒ, ะบะพัะพััั ะฒั ัะพะฑะธัะฐะตัะต ัะฐะผะธ ะฟะตัะตัะฐัะบะธะฒะฐะฝะธะตะผ. ะััั ะฒะธะดะถะตัั ะดะปั ัะพััะพัะฝะธั ั
ะพััะพะฒ, ะฟะธะฝะณะพะฒ, ัััะปะพะบ ะฝะฐ ัะตัะฒะธัั, ะทะฐะบะปะฐะดะพะบ, ะฟะพะธัะบะฐ, ัะฐัะพะฒ, ะบะฐะปะตะฝะดะฐัะตะน, ะพะฑัะฐัะฝะพะณะพ ะพัััััะฐ, ะทะฐะผะตัะพะบ, RSS, ะฟะพะณะพะดั, ะธะทะพะฑัะฐะถะตะฝะธะน, ะฒัััะพะตะฝะฝัั
ัััะฐะฝะธั, Docker, ััะฝะฝะตะปะตะน, ะณัะฐัะธะบะพะฒ ะผะตััะธะบ, ัะฒะพะธั
API ะธ ะดะฐะถะต ะถะธะฒะพะณะพ ัะตัะผะธะฝะฐะปะฐ.
-**ะกะตัะตะฒะพะน ะณัะฐั:**
-ะะฐัััะพะนัะต ะฟะฐะฝะตะปั ัะฟัะฐะฒะปะตะฝะธั ะดะปั ะฒะธะทัะฐะปะธะทะฐัะธะธ ะฒะฐัะตะน ะดะพะผะฐัะฝะตะน ะปะฐะฑะพัะฐัะพัะธะธ ะฝะฐ ะพัะฝะพะฒะต SSH-ะฟะพะดะบะปััะตะฝะธะน ั ะฟะพะดะดะตัะถะบะพะน ััะฐัััะพะฒ.
+**ะกะฝะธะฟะฟะตัั ะธ ะธะฝััััะผะตะฝัั:**
+ะกะพั
ัะฐะฝัะนัะต ะบะพะผะฐะฝะดั, ะบะพัะพััะต ัะฐััะพ ะฝะฐะฑะธัะฐะตัะต, ะธ ะทะฐะฟััะบะฐะนัะต ะธั
ะพะดะฝะธะผ ะฝะฐะถะฐัะธะตะผ, ั ะฟะตัะตะผะตะฝะฝัะผะธ ะดะปั ั
ะพััะฐ ะธ ะดะปั ัะพะฑััะฒะตะฝะฝะพะณะพ ะฒะฒะพะดะฐ. ะัะฟะพะปะฝัะนัะต ะพะดะฝั ะบะพะผะฐะฝะดั ััะฐะทั ะฒะพ ะฒัะตั
ะพัะบััััั
ัะตัะผะธะฝะฐะปะฐั
ะธ ะธัะธัะต ะฟะพ ะธััะพัะธะธ ะบะพะผะฐะฝะด ั ะฐะฒัะพะดะพะฟะพะปะฝะตะฝะธะตะผ.
-**ะะฝััััะผะตะฝัั SSH:**
-ะกะพะทะดะฐะฝะธะต ะฟะตัะตะธัะฟะพะปัะทัะตะผัั
ััะฐะณะผะตะฝัะพะฒ ะบะพะผะฐะฝะด, ะฒัะฟะพะปะฝัะตะผัั
ะพะดะฝะธะผ ะฝะฐะถะฐัะธะตะผ. ะะฐะฟััะบ ะพะดะฝะพะน ะบะพะผะฐะฝะดั ะพะดะฝะพะฒัะตะผะตะฝะฝะพ ะฒ ะฝะตัะบะพะปัะบะธั
ะพัะบััััั
ัะตัะผะธะฝะฐะปะฐั
.
+**ะะฑัะธะน ะดะพัััะฟ ะบ ัะตััะธะธ:**
+ะะตะปะธัะตัั ะถะธะฒะพะน ัะตััะธะตะน ัะตัะผะธะฝะฐะปะฐ, RDP, VNC ะธะปะธ Telnet. ะัะฟัะฐะฒััะต ัััะปะบั, ะฟะพ ะบะพัะพัะพะน ะผะพะถะฝะพ ะฟะพะดะบะปััะธัััั ะฑะตะท ััััะฝะพะน ะทะฐะฟะธัะธ, ะธะปะธ ะฟะพะดะตะปะธัะตัั ั ะบะพะฝะบัะตัะฝัะผ ะฟะพะปัะทะพะฒะฐัะตะปะตะผ Termix, ัะพะปัะบะพ ะดะปั ะฟัะพัะผะพััะฐ ะธะปะธ ั ะฟัะฐะฒะพะผ ะฒะฒะพะดะฐ. ะะพัััะฟ ะผะพะถะตั ะธััะตะบะฐัั ัะฐะผ ะธะปะธ ะพัะทัะฒะฐัััั ะฒ ะปัะฑะพะน ะผะพะผะตะฝั, ะธ ะตะณะพ ะผะพะถะฝะพ ะพัะบะปััะธัั ะฟะพะปะฝะพัััั ะธะปะธ ะดะปั ะพัะดะตะปัะฝะพะณะพ ั
ะพััะฐ.
-**ะะพััะพัะฝะฝัะต ะฒะบะปะฐะดะบะธ:**
-SSH-ัะตััะธะธ ะธ ะฒะบะปะฐะดะบะธ ะพััะฐัััั ะพัะบััััะผะธ ะฝะฐ ะฒัะตั
ััััะพะนััะฒะฐั
/ะฟัะธ ะพะฑะฝะพะฒะปะตะฝะธะธ ัััะฐะฝะธัั, ะตัะปะธ ะฒะบะปััะตะฝะพ ะฒ ะฟัะพัะธะปะต ะฟะพะปัะทะพะฒะฐัะตะปั.
+**ะะฐะฟะธัั ัะตััะธะน ะธ ะถััะฝะฐะปั:**
+ะะฐะฟะธััะฒะฐะนัะต ัะตััะธะธ ัะตัะผะธะฝะฐะปะฐ, RDP ะธ VNC ะธ ะฟัะพัะผะฐััะธะฒะฐะนัะต ะธั
ะฟะพะทะถะต. ะกะบะฐัะธะฒะฐะนัะต ัะตะบััะพะฒัะต ะถััะฝะฐะปั ัะตััะธะธ ะธ ะทะฐะณะปัะดัะฒะฐะนัะต ะฒ ะถััะฝะฐะป ะฟะพะดะบะปััะตะฝะธั, ััะพะฑั ัะฒะธะดะตัั, ััะพ ะธะผะตะฝะฝะพ ะฟัะพะธัั
ะพะดะธะปะพ ะฒะพ ะฒัะตะผั ัะพะตะดะธะฝะตะฝะธั.
+
+
+
+
+**ะะพัะปะตะดะพะฒะฐัะตะปัะฝัะต ะฟะพะดะบะปััะตะฝะธั:**
+ะะฑัะฐะนัะตัั ั ะฟะพัะปะตะดะพะฒะฐัะตะปัะฝัะผะธ ััััะพะนััะฒะฐะผะธ ะฒัะพะดะต ะผะฐัััััะธะทะฐัะพัะพะฒ, ะบะพะผะผััะฐัะพัะพะฒ ะธ ะผะธะบัะพะบะพะฝััะพะปะปะตัะพะฒ ะธะท ะฑัะฐัะทะตัะฐ ะธะปะธ ะฝะฐััะพะปัะฝะพะณะพ ะฟัะธะปะพะถะตะฝะธั. ะะฐัััะฐะธะฒะฐะนัะต ัะบะพัะพััั, ะฑะธัั ะดะฐะฝะฝัั
, ััะพะฟะพะฒัะต ะฑะธัั ะธ ัััะฝะพััั. ะ ะฟะพะดั
ะพะดััะธั
ะฑัะฐัะทะตัะฐั
ะธัะฟะพะปัะทัะตััั Web Serial API, ะฐ ะฒ ะฝะฐััะพะปัะฝะพะผ ะฟัะธะปะพะถะตะฝะธะธ ัะพะฑััะฒะตะฝะฝัะน ะฑัะบะตะฝะด.
+
+
+
+
+
+
+**Tailscale:**
+ะะพะดััะณะธะฒะฐะนัะต ััััะพะนััะฒะฐ ะธะท ัะฒะพะตะน tailnet, ััะพะฑั ะดะพะฑะฐะฒะธัั ะธั
ะบะฐะบ ั
ะพััั ะฒ ะฟะฐัั ะฝะฐะถะฐัะธะน, ะธ ะฟะพะดะบะปััะฐะนัะตัั ัะตัะตะท Tailscale SSH: ะดะพัััะฟะพะผ ะทะฐะนะผัััั ะฟัะฐะฒะธะปะฐ tailnet, ะฐ ััััะฝัะต ะดะฐะฝะฝัะต ั
ัะฐะฝะธัั ะฝะต ะฟัะธะดัััั. Headscale ะธ ัะฒะพะธ ะฐะดัะตัะฐ ัะพะถะต ัะฐะฑะพัะฐัั.
+
+
+
+
+**Proxmox:**
+ะะผะฟะพััะธััะนัะต ั
ะพััั ะฟััะผะพ ะธะท ัััะฐะฝะพะฒะบะธ Proxmox ะธ ัะปะตะดะธัะต ะทะฐ ะฟะพะบะฐะทะฐัะตะปัะผะธ ัะทะปะพะฒ ะธ ะณะพััะตะฒัั
ะผะฐัะธะฝ, ะฒะบะปััะฐั ะฟัะพัะตััะพั, ะฟะฐะผััั ะธ ั
ัะฐะฝะธะปะธัะต, ะฝะฐ ะพัะดะตะปัะฝะพะน ะฒะบะปะฐะดะบะต.
+
+
+
+
+
+
+**ะ ะฐะฑะพัะธะต ะฟัะพัััะฐะฝััะฒะฐ ะธ ะฒะบะปะฐะดะบะธ:**
+ะกะพั
ัะฐะฝะธัะต ะฝะฐะฑะพั ะฒะบะปะฐะดะพะบ ะฒะผะตััะต ั ัะฐะทะดะตะปะตะฝะธะตะผ ัะบัะฐะฝะฐ ะธ ะพัะบัะพะนัะต ะฒัั ััะพ ะพะดะฝะธะผ ะฝะฐะถะฐัะธะตะผ. Termix ะฟะพะผะฝะธั ะธ ะฟะพัะปะตะดะฝัั ัะตััะธั, ะฟะพััะพะผั ะฒะบะปะฐะดะบะธ ะฒะพะทะฒัะฐัะฐัััั ะฟะพัะปะต ะพะฑะฝะพะฒะปะตะฝะธั ัััะฐะฝะธัั ะธ ะฝะฐ ะดััะณะธั
ััััะพะนััะฒะฐั
.
+
+
+
+
+**ะะพัะฐะณะพะฒะฐั ะฝะฐัััะพะนะบะฐ:**
+ะะพัะพัะบะฐั ะฝะฐัััะพะนะบะฐ ะฟะพะผะพะถะตั ะฒัะฑัะฐัั ัะฐะฑะปะพะฝ ะธะฝัะตััะตะนัะฐ, ัะตะผั, ะฝัะถะฝัะต ะฒะพะทะผะพะถะฝะพััะธ ะธ ะฟะตัะฒัะน ั
ะพัั. ะัะพััะพะน ัะตะถะธะผ ัะบััะฒะฐะตั ัะพ, ัะตะผ ะฒั ะฝะต ะฟะพะปัะทัะตัะตัั, ะฐ ะฝะฐัััะพะนะบั ะผะพะถะฝะพ ะฟัะพะนัะธ ะทะฐะฝะพะฒะพ ะธะปะธ ัะผะตะฝะธัั ัะฐะฑะปะพะฝ ะฒ ะปัะฑะพะน ะผะพะผะตะฝั.
+
+
+
+
+
+
+**ะะฒัะพะฝะพะผะฝัะน ะบะปะธะตะฝั ะธ ัะธะฝั
ัะพะฝะธะทะฐัะธั:**
+ะะฐััะพะปัะฝะพะต ะฟัะธะปะพะถะตะฝะธะต ัะฐะฑะพัะฐะตั ัะฐะผะพ ะฟะพ ัะตะฑะต, ัะพ ัะฒะพะธะผ ะฑัะบะตะฝะดะพะผ ะธ ะฑะฐะทะพะน ะดะฐะฝะฝัั
, ะฑะตะท ัะตัะฒะตัะฐ. ะะณะพ ะผะพะถะฝะพ ะฟะพะดะบะปััะธัั ะบ ัะตัะฒะตัั Termix, ััะพะฑั ะฒ ะพะฑะต ััะพัะพะฝั ัะธะฝั
ัะพะฝะธะทะธัะพะฒะฐัั ั
ะพััั, ััััะฝัะต ะดะฐะฝะฝัะต, ัะฝะธะฟะฟะตัั ะธ ะพััะฐะปัะฝะพะต, ะธ ะฒัะฑัะฐัั, ะพัะบัะดะฐ ะธะดัั ะฟะพะดะบะปััะตะฝะธั: ั ะฒะฐัะตะณะพ ะบะพะผะฟัััะตัะฐ ะธะปะธ ัะตัะตะท ัะตัะฒะตั.
+
+
+
+
+**ะะพะผะฐะฝะดะฝะฐั ัััะพะบะฐ:**
+CLI `termix` ะดะปั ะฒะฐัะตะน ะพะฑะพะปะพัะบะธ ะธ ะฒะฐัะธั
ัะบัะธะฟัะพะฒ. ะัะบััะฒะฐะนัะต ัะตัะผะธะฝะฐะปั, ะฒัะฟะพะปะฝัะนัะต ะบะพะผะฐะฝะดั ะฝะฐ ะพะดะฝะพะผ ั
ะพััะต ะธะปะธ ะฝะฐ ัะตะปะพะผ ัะปะพัะต, ะฟะตัะตะผะตัะฐะนัะต ัะฐะนะปั ะฟะพ SFTP ะธ ัะฟัะฐะฒะปัะนัะต ั
ะพััะฐะผะธ, ัะฝะธะฟะฟะตัะฐะผะธ ะธ ััััะฝัะผะธ ะดะฐะฝะฝัะผะธ. ะฃััะฐะฝะพะฒะธัะต ัะตัะตะท `npm install -g @termix-cli/cli` ะธะปะธ ะฒะพะทัะผะธัะต ะพัะดะตะปัะฝัะน ะธัะฟะพะปะฝัะตะผัะน ัะฐะนะป. ะกะผะพััะธัะต [ะดะพะบัะผะตะฝัะฐัะธั CLI](https://docs.termix.site/cli).
+
+
+
+
+
+
+**ะะตะทะพะฟะฐัะฝะพััั:**
+ะะฐัะพะปะธ, ะบะปััะธ ะธ ะดััะณะธะต ัะตะบัะตัั ัะธััััััั ะดะปั ะบะฐะถะดะพะณะพ ะฟะพะปัะทะพะฒะฐัะตะปั, ะฐ ัะฐะผะธ ัะฐะนะปั ะฑะฐะทั ะดะฐะฝะฝัั
ะผะพะถะฝะพ ะทะฐัะธััะพะฒะฐัั ะฝะฐ ะดะธัะบะต. ะะฐะบ ััะพ ััััะพะตะฝะพ, ะพะฟะธัะฐะฝะพ ะฒ [ะดะพะบัะผะตะฝัะฐัะธะธ](https://docs.termix.site/security).
**ะฏะทัะบะธ:**
-ะัััะพะตะฝะฝะฐั ะฟะพะดะดะตัะถะบะฐ ะพะบะพะปะพ 30 ัะทัะบะพะฒ (ัะฟัะฐะฒะปัะตััั ัะตัะตะท [Crowdin](https://docs.termix.site/translations)).
+ะะบะพะปะพ 30 ะฒัััะพะตะฝะฝัั
ัะทัะบะพะฒ, ะบะพัะพััะต ะฒะตะดัััั ัะตัะตะท [Crowdin](https://docs.termix.site/translations).
@@ -196,20 +252,23 @@ SSH-ัะตััะธะธ ะธ ะฒะบะปะฐะดะบะธ ะพััะฐัััั ะพัะบััััะผะธ ะฝะฐ ะฒั
-ะะพะปััะต ะฒะพะทะผะพะถะฝะพััะตะน
+ะััะณะธะต ะฒะพะทะผะพะถะฝะพััะธ
-- **ะะฐะฝะตะปั ัะฟัะฐะฒะปะตะฝะธั** - ะัะพัะผะพัั ะธะฝัะพัะผะฐัะธะธ ะพ ัะตัะฒะตัะต ะฝะฐ ะฟะฐะฝะตะปะธ ัะฟัะฐะฒะปะตะฝะธั ะพะดะฝะธะผ ะฒะทะณะปัะดะพะผ
-- **API-ะบะปััะธ** - ะกะพะทะดะฐะฝะธะต API-ะบะปััะตะน ั ะพะฑะปะฐัััั ะฒะธะดะธะผะพััะธ ะฟะพะปัะทะพะฒะฐัะตะปั ะธ ััะพะบะฐะผะธ ะดะตะนััะฒะธั ะดะปั ะธัะฟะพะปัะทะพะฒะฐะฝะธั ะฒ ะฐะฒัะพะผะฐัะธะทะฐัะธะธ/CI
-- **ะญะบัะฟะพัั/ะธะผะฟะพัั ะดะฐะฝะฝัั
** - ะญะบัะฟะพัั ะธ ะธะผะฟะพัั SSH-ั
ะพััะพะฒ, ััััะฝัั
ะดะฐะฝะฝัั
ะธ ะดะฐะฝะฝัั
ัะฐะนะปะพะฒะพะณะพ ะผะตะฝะตะดะถะตัะฐ
-- **ะะฒัะพะผะฐัะธัะตัะบะฐั ะฝะฐัััะพะนะบะฐ SSL** - ะัััะพะตะฝะฝะฐั ะณะตะฝะตัะฐัะธั ะธ ัะฟัะฐะฒะปะตะฝะธะต SSL-ัะตััะธัะธะบะฐัะฐะผะธ ั ะฟะตัะตะฝะฐะฟัะฐะฒะปะตะฝะธะตะผ ะฝะฐ HTTPS
-- **ะกะพะฒัะตะผะตะฝะฝัะน ะธะฝัะตััะตะนั** - ะงะธัััะน ะธะฝัะตััะตะนั ะดะปั ะดะตัะบัะพะฟะฐ ะธ ะผะพะฑะธะปัะฝัั
ััััะพะนััะฒ, ะฟะพัััะพะตะฝะฝัะน ะฝะฐ React, Tailwind CSS ะธ Shadcn. ะัะฑะพั ะผะตะถะดั ะผะฝะพะถะตััะฒะพะผ ัะฐะทะปะธัะฝัั
ัะตะผ ะธะฝัะตััะตะนัะฐ, ะฒะบะปััะฐั ัะฒะตัะปัั, ััะผะฝัั, Dracula ะธ ั. ะด. ะัะฟะพะปัะทะพะฒะฐะฝะธะต URL-ะผะฐัััััะพะฒ ะดะปั ะพัะบัััะธั ะปัะฑะพะณะพ ะฟะพะดะบะปััะตะฝะธั ะฒ ะฟะพะปะฝะพัะบัะฐะฝะฝะพะผ ัะตะถะธะผะต.
-- **ะััะพัะธั ะบะพะผะฐะฝะด** - ะะฒัะพะดะพะฟะพะปะฝะตะฝะธะต ะธ ะฟัะพัะผะพัั ัะฐะฝะตะต ะฒัะฟะพะปะฝะตะฝะฝัั
SSH-ะบะพะผะฐะฝะด
-- **ะััััะพะต ะฟะพะดะบะปััะตะฝะธะต** - ะะพะดะบะปััะตะฝะธะต ะบ ัะตัะฒะตัั ะฑะตะท ะฝะตะพะฑั
ะพะดะธะผะพััะธ ัะพั
ัะฐะฝะตะฝะธั ะดะฐะฝะฝัั
ะฟะพะดะบะปััะตะฝะธั
-- **ะะพะผะฐะฝะดะฝะฐั ะฟะฐะปะธััะฐ** - ะะฒะพะนะฝะพะต ะฝะฐะถะฐัะธะต ะปะตะฒะพะณะพ Shift ะดะปั ะฑััััะพะณะพ ะดะพัััะฟะฐ ะบ SSH-ะฟะพะดะบะปััะตะฝะธัะผ ั ะบะปะฐะฒะธะฐัััั
-- **ะะฝัะตะณัะฐัะธั ั Proxmox** - ะะฒัะพะผะฐัะธัะตัะบะพะต ะดะพะฑะฐะฒะปะตะฝะธะต ั
ะพััะพะฒ ะฒ Termix ะธะท ะฒะฐัะตะณะพ ัะบะทะตะผะฟะปััะฐ Proxmox
-- **ะะพะณะฐััะน ััะฝะบัะธะพะฝะฐะป SSH** - ะะพะดะดะตัะถะบะฐ jump-ั
ะพััะพะฒ, Warpgate, ะฟะพะดะบะปััะตะฝะธะน ะฝะฐ ะพัะฝะพะฒะต TOTP, SOCKS5, ะฒะตัะธัะธะบะฐัะธะธ ะบะปััะตะน ั
ะพััะฐ, ะฐะฒัะพะทะฐะฟะพะปะฝะตะฝะธั ะฟะฐัะพะปะตะน, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, port knocking, ะปะพะณะธัะพะฒะฐะฝะธั ัะตัะผะธะฝะฐะปะฐ, ะฟะตัะตะฐะดัะตัะฐัะธะธ SSH-ะฐะณะตะฝัะฐ, SSH-ะฐะณะตะฝัะฐ Bitwarden, ะฟะพะดะฟะธัะธ SSH ัะตัะตะท HashiCorp Vault ะธ ะผะฝะพะณะพะณะพ ะดััะณะพะณะพ.
-- **Termix ID** - ะะฝะฐะปะพะณ sshid.io, ะฒัััะพะตะฝะฝัะน ะฒ Termix. ะะฐัะตะณะธัััะธััะนัะต ะธะผั ะฟะพะปัะทะพะฒะฐัะตะปั, ะพะฟัะฑะปะธะบัะนัะต ัะฒะพะธ ะฟัะฑะปะธัะฝัะต SSH-ะบะปััะธ ะฟะพ URL ัะตะทะพะปะฒะตัะฐ ะธ ะธัะฟะพะปัะทัะนัะต ะฒัััะพะตะฝะฝัะน ะฆะก ะดะปั ะฒัะดะฐัะธ SSH-ัะตััะธัะธะบะฐัะพะฒ.
+- **ะะฐะฝะตะปั** - ะะฐัะธ ัะตัะฒะตัั ะพะดะฝะธะผ ะฒะทะณะปัะดะพะผ, ะบะฐััะพัะบะธ ัะฐัััะฐะฒะปัะตัะต ะฒั ัะฐะผะธ
+- **ะกั
ะตะผะฐ ัะตัะธ** - ะะฐัะฐ ะดะพะผะฐัะฝัั ะปะฐะฑะพัะฐัะพัะธั, ะฝะฐัะธัะพะฒะฐะฝะฝะฐั ะฟะพ ั
ะพััะฐะผ, ั ัะพััะพัะฝะธะตะผ ะฒ ัะตะฐะปัะฝะพะผ ะฒัะตะผะตะฝะธ
+- **ะะพะฝะธัะพั tmux** - ะัะพัะผะพัั ัะตััะธะน, ะพะบะพะฝ ะธ ะฟะฐะฝะตะปะตะน tmux ั ะฟัะตะดะฟัะพัะผะพััะพะผ ะธ ะฟะพะธัะบะพะผ
+- **ะะปััะธ API** - ะะปััะธ ะดะปั ะบะพะฝะบัะตัะฝะพะณะพ ะฟะพะปัะทะพะฒะฐัะตะปั ัะพ ััะพะบะพะผ ะดะตะนััะฒะธั, ะดะปั ัะบัะธะฟัะพะฒ ะธ CI
+- **ะญะบัะฟะพัั ะธ ะธะผะฟะพัั** - ะะตัะตะฝะพั ั
ะพััะพะฒ, ััััะฝัั
ะดะฐะฝะฝัั
ะธ ะดะฐะฝะฝัั
ัะฐะนะปะพะฒะพะณะพ ะผะตะฝะตะดะถะตัะฐ
+- **ะะฒัะพะผะฐัะธัะตัะบะธะน SSL** - ะกะตััะธัะธะบะฐัั ะฒัะฟััะบะฐัััั ะธ ะพะฑะฝะพะฒะปััััั ะทะฐ ะฒะฐั, ั ะฟะตัะตั
ะพะดะพะผ ะฝะฐ HTTPS, ะปะธะฑะพ ะธัะฟะพะปัะทัะนัะต ัะฒะพะธ
+- **ะะฐะทั ะดะฐะฝะฝัั
** - ะะพ ัะผะพะปัะฐะฝะธั SQLite, ะฟะพะดะดะตัะถะธะฒะฐัััั ัะฐะบะถะต PostgreSQL ะธ MySQL
+- **ะกะพะฒัะตะผะตะฝะฝัะน ะธะฝัะตััะตะนั** - ะะบะบััะฐัะฝัะน ะธะฝัะตััะตะนั ะฝะฐ React ะดะปั ะบะพะผะฟัััะตัะฐ ะธ ัะตะปะตัะพะฝะฐ, ั ัะตะผะฐะผะธ ะฒัะพะดะต ัะฒะตัะปะพะน, ััะผะฝะพะน ะธ Dracula. ะัะฑะพะต ะฟะพะดะบะปััะตะฝะธะต ะพัะบััะฒะฐะตััั ะฝะฐ ะฒะตัั ัะบัะฐะฝ ะฟะพ ัััะปะบะต
+- **ะะฐะปะธััะฐ ะบะพะผะฐะฝะด** - ะะฒะพะนะฝะพะต ะฝะฐะถะฐัะธะต ะปะตะฒะพะณะพ Shift, ััะพะฑั ะฟะตัะตะนัะธ ะบ ั
ะพััั ั ะบะปะฐะฒะธะฐัััั
+- **ะกะพัะตัะฐะฝะธั ะบะปะฐะฒะธั** - ะะตัะตั
ะพะด ะผะตะถะดั ะฒะบะปะฐะดะบะฐะผะธ, ะธั
ะทะฐะบัััะธะต ะธ ะดััะณะพะต, ะฒัั ะผะพะถะฝะพ ะฟะตัะตะฝะฐะทะฝะฐัะธัั
+- **Wake-on-LAN** - ะ ะฐะทะฑัะดะธัะต ะผะฐัะธะฝั ะธะท Termix ะธะปะธ ะธะท ัะฐะณะฐ ะฐะฒัะพะผะฐัะธะทะฐัะธะธ
+- **ะะพะฒะตัะตะฝะฝัะน ะฟัะพะบัะธ** - ะัััั ะพะฑัะฐัะฝัะน ะฟัะพะบัะธ ะฒะพะทัะผัั ะฒั
ะพะด ะฝะฐ ัะตะฑั ะธ ะฟะตัะตะดะฐัั ะฟะพะปัะทะพะฒะฐัะตะปั
+- **ะะพะณะฐััะต ะฒะพะทะผะพะถะฝะพััะธ SSH** - ะัะพะผะตะถััะพัะฝัะต ั
ะพััั, Warpgate, ะทะฐะฟัะพัั TOTP, SOCKS5, ะฟัะพะฒะตัะบะฐ ะบะปััะตะน ั
ะพััะฐ, ะฐะฒัะพะทะฐะฟะพะปะฝะตะฝะธะต ะฟะฐัะพะปะตะน, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, port knocking, ะถััะฝะฐะปั ัะตัะผะธะฝะฐะปะฐ, ะฟัะพะฑัะพั ะฐะณะตะฝัะฐ, SSH-ะฐะณะตะฝั Bitwarden, ะฟะพะดะฟะธัั SSH ัะตัะตะท HashiCorp Vault ะธ ะดััะณะพะต
+- **Termix ID** - ะัััะพะตะฝะฝัะน ะฐะฝะฐะปะพะณ sshid.io. ะะฐะนะผะธัะต ะธะผั, ะพะฟัะฑะปะธะบัะนัะต ะพัะบััััะต ะบะปััะธ ะฟะพ ะฐะดัะตัั ัะฐัะฟะพะทะฝะฐะฒะฐัะตะปั ะธ ะฒัะฟััะบะฐะนัะต SSH-ัะตััะธัะธะบะฐัั ัะตัะตะท ะฒัััะพะตะฝะฝัะน ัะตะฝัั ัะตััะธัะธะบะฐัะธะธ
@@ -220,7 +279,7 @@ SSH-ัะตััะธะธ ะธ ะฒะบะปะฐะดะบะธ ะพััะฐัััั ะพัะบััััะผะธ ะฝะฐ ะฒั
ะะปะฐััะพัะผะฐ
-ะะธัััะธะฑััะธะฒ
+ะกะฟะพัะพะฑ ัััะฐะฝะพะฒะบะธ
Web
@@ -252,9 +311,9 @@ SSH-ัะตััะธะธ ะธ ะฒะบะปะฐะดะบะธ ะพััะฐัััั ะพัะบััััะผะธ ะฝะฐ ะฒั
## ะฃััะฐะฝะพะฒะบะฐ
-ะะพัะตัะธัะต [ะดะพะบัะผะตะฝัะฐัะธั](https://docs.termix.site/install) Termix ะดะปั ะฟะพะปััะตะฝะธั ะฟะพะปะฝัั
ะธะฝััััะบัะธะน ะฟะพ ัััะฐะฝะพะฒะบะต ะฝะฐ ะฒัะตั
ะฟะปะฐััะพัะผะฐั
.
+ะะพะปะฝัะต ะธะฝััััะบัะธะธ ะฟะพ ัััะฐะฝะพะฒะบะต ะดะปั ะฒัะตั
ะฟะปะฐััะพัะผ ัะผะพััะธัะต ะฒ [ะดะพะบัะผะตะฝัะฐัะธะธ Termix](https://docs.termix.site/install).
-ะัะธะผะตั ัะฐะนะปะฐ Docker Compose (ะฒั ะผะพะถะตัะต ะพะฟัััะธัั `guacd` ะธ ัะตัั, ะตัะปะธ ะฝะต ะฟะปะฐะฝะธััะตัะต ะธัะฟะพะปัะทะพะฒะฐัั ััะฝะบัะธะธ ัะดะฐะปะตะฝะฝะพะณะพ ัะฐะฑะพัะตะณะพ ััะพะปะฐ):
+ะัะธะผะตั ัะฐะนะปะฐ Docker Compose (`guacd` ะธ ัะตัั ะผะพะถะฝะพ ัะฑัะฐัั, ะตัะปะธ ัะดะฐะปัะฝะฝัะน ัะฐะฑะพัะธะน ััะพะป ะฒะฐะผ ะฝะต ะฝัะถะตะฝ):
```yaml
services:
@@ -291,19 +350,45 @@ networks:
driver: bridge
```
+### ะะพะผะฐะฝะดะฝะฐั ัััะพะบะฐ
+
+ะฃ Termix ะตััั ะธ CLI, ัะฐะบ ััะพ ัะตัะฒะตัะฐะผะธ ะผะพะถะฝะพ ัะฟัะฐะฒะปััั ะธะท ัะตัะผะธะฝะฐะปะฐ ะธ ะธัะฟะพะปัะทะพะฒะฐัั Termix ะฒ ัะฒะพะธั
ัะบัะธะฟัะฐั
.
+
+```bash
+npm install -g @termix-cli/cli
+termix login --url https://termix.example.com
+termix ssh 1
+```
+
+ะะฝ ัะผะตะตั ะพัะบััะฒะฐัั ัะตัะผะธะฝะฐะปั, ะฒัะฟะพะปะฝััั ะบะพะผะฐะฝะดั ะฝะฐ ะพะดะฝะพะผ ั
ะพััะต ะธะปะธ ะฝะฐ ัะตะปะพะผ ัะปะพัะต, ะฟะตัะตะผะตัะฐัั ัะฐะนะปั ะฟะพ SFTP ะธ ัะฟัะฐะฒะปััั ั
ะพััะฐะผะธ, ัะฝะธะฟะฟะตัะฐะผะธ ะธ ััััะฝัะผะธ ะดะฐะฝะฝัะผะธ. ะะพะปะฝะฐั ะดะพะบัะผะตะฝัะฐัะธั ะตััั ะฝะฐ [docs.termix.site/cli](https://docs.termix.site/cli).
+
+### ะ ะฐะทะผะตัะตะฝะธะต ะฒ ะพะฑะปะฐะบะต
+
+ะกะตัะฒะตั Termix ะผะพะถะฝะพ ะดะตัะถะฐัั ะฝะฐ VPS, ะฐ ะฝะต ะฒะฝัััะธ ัะฒะพะตะน ัะตัะธ. ะัะปะธ Termix ัะฐะฑะพัะฐะตั ะฒ ัะพะน ะถะต ัะตัะธ, ะบะพัะพัะพะน ัะฟัะฐะฒะปัะตั, ะฟัะธ ัะฑะพะต ะพะฝ ัะฟะฐะดัั ะฒะผะตััะต ั ะฝะตะน, ะบะฐะบ ัะฐะท ัะพะณะดะฐ, ะบะพะณะดะฐ ะฝัะถะตะฝ ะดะปั ะฟะพัะธะฝะบะธ. ะกะฝะฐััะถะธ ะพะฝ ะพััะฐัััั ะดะพัััะฟะฝัะผ, ะดะฐัั ะฟะพััะพัะฝะฝัะน IP ะธ ะฟะพะทะฒะพะปัะตั ะทะฐะนัะธ ะพัะบัะดะฐ ัะณะพะดะฝะพ ะฑะตะท VPN ะธ ะฟัะพะฑัะพัะฐ ะฟะพััะพะฒ.
+
+[GINERNET](https://docs.termix.site/install/ginernet) ัะฟะพะฝัะธััะตั Termix, ะธ ะฒ ะดะพะบัะผะตะฝัะฐัะธะธ ะตััั ะฟะพัะฐะณะพะฒะพะต ััะบะพะฒะพะดััะฒะพ ะฟะพ ัะฐะทะฒััััะฒะฐะฝะธั ะฝะฐ ะธั
ะฟะปะพัะฐะดะบะต VPS.
+
-## ะะพะถะตััะฒะพะฒะฐะฝะธะต
+## ะขะตะปะตะผะตััะธั
-Termix ะฑะตัะฟะปะฐัะตะฝ ะธ ะธะผะตะตั ะพัะบััััะน ะธัั
ะพะดะฝัะน ะบะพะด, ะฑะตะท ะฟะพะดะฟะธัะพะบ ะธะปะธ ะฟะปะฐัะฝัั
ัะฐัะธัะพะฒ. ะัะปะธ ะพะฝ ะฒะฐะผ ะฟะพะปะตะทะตะฝ, ัะฐััะผะพััะธัะต ะฒะพะทะผะพะถะฝะพััั ะฟะพะถะตััะฒะพะฒะฐะฝะธั, ััะพะฑั ะฟะพะผะพัั ะฟะพะบัััั ัะฐัั
ะพะดั ะฝะฐ ัะตัะฒะตัั, ะดะพะผะตะฝั ะธ ะฒัะตะผั ัะฐะทัะฐะฑะพัะบะธ. ะะพะถะตััะฒะพะฒะฐะฝะธั ัะฐะบะถะต ะฟะพะผะพะณะฐัั ัะธะฝะฐะฝัะธัะพะฒะฐัั ะฒัะตะผั ะฝะฐ ะธััะปะตะดะพะฒะฐะฝะธะต ะธ ะธะทััะตะฝะธะต ัะพะณะพ, ััะพ ะฝะตะพะฑั
ะพะดะธะผะพ ะดะปั ัะพะทะดะฐะฝะธั ัะฐะบะธั
ััะฝะบัะธะน, ะบะฐะบ ะฟะพะดะดะตัะถะบะฐ SAML, Kubernetes ะธ Agent. ะััะปะตะถะธะฒะฐะนัะต ะฟัะพะณัะตัั ะธ ะดะตะปะฐะนัะต ะฟะพะถะตััะฒะพะฒะฐะฝะธั ะฝะธะถะต.
+Termix ัะฐะท ะฒ ัััะบะธ ะพัะฟัะฐะฒะปัะตั ะฝะตะฑะพะปััะพะน ะฐะฝะพะฝะธะผะฝัะน ัะธะณะฝะฐะป, ััะพะฑั ั ะฟะพะฝะธะผะฐะป, ัะบะพะปัะบะพ ัััะฐะฝะพะฒะพะบ ัะฐะฑะพัะฐะตั ะธ ะบะฐะบะธะผะธ ะฒะพะทะผะพะถะฝะพัััะผะธ ะดะตะนััะฒะธัะตะปัะฝะพ ะฟะพะปัะทััััั. ะ ะฝัะผ ะตััั ัะปััะฐะนะฝัะน ะธะดะตะฝัะธัะธะบะฐัะพั ัััะฐะฝะพะฒะบะธ, ัะธัะปะพ ะฟะพะปัะทะพะฒะฐัะตะปะตะน ะธ ั
ะพััะพะฒ, ะฒะตััะธั ะฟัะธะปะพะถะตะฝะธั ะธ ัะพ, ะบะฐะบะธะต ะฒะพะทะผะพะถะฝะพััะธ (ัะตัะผะธะฝะฐะป, ัะฐะนะปะพะฒัะน ะผะตะฝะตะดะถะตั, ััะฝะฝะตะปะธ, docker ะธ ะฟัะพัะตะต) ะธัะฟะพะปัะทะพะฒะฐะปะธัั ะทะฐ ะฟะพัะปะตะดะฝะธะต 24 ัะฐัะฐ. ะ ะฝัะผ ะฝะธะบะพะณะดะฐ ะฝะตั ะธะผัะฝ ะฟะพะปัะทะพะฒะฐัะตะปะตะน, ะธะผัะฝ ั
ะพััะพะฒ, IP-ะฐะดัะตัะพะฒ, ััััะฝัั
ะดะฐะฝะฝัั
ะธ ะฝะธัะตะณะพ ะดััะณะพะณะพ, ััะพ ัะบะฐะทัะฒะฐะปะพ ะฑั ะฝะฐ ะฒะฐั ะธะปะธ ะฒะฐัะธ ัะตัะฒะตัั.
-[ะะพะถะตััะฒะพะฒะฐัั](https://donate.termix.site/)
+ะะพ ัะผะพะปัะฐะฝะธั ะพะฝ ะฒะบะปัััะฝ. ะัะบะปััะธัั ะผะพะถะฝะพ ะฒ ะฝะฐัััะพะนะบะฐั
ะฐะดะผะธะฝะธัััะฐัะพัะฐ ะฒ ัะฐะทะดะตะปะต ยซะะฑัะธะตยป ะธะปะธ ะทะฐะดะฐัั `ENABLE_TELEMETRY=false` ะตัั ะดะพ ะฟะตัะฒะพะณะพ ะทะฐะฟััะบะฐ Termix.
+
+
+
+## ะะพะถะตััะฒะพะฒะฐะฝะธั
+
+Termix ะฑะตัะฟะปะฐัะตะฝ ะธ ะพัะบััั, ะฑะตะท ะฟะพะดะฟะธัะพะบ ะธ ะฟะปะฐัะฝัั
ัะฐัะธัะพะฒ. ะัะปะธ ะพะฝ ะฒะฐะผ ะฟะพะปะตะทะตะฝ, ะฟะพะดัะผะฐะนัะต ะพ ะฟะพะถะตััะฒะพะฒะฐะฝะธะธ: ะพะฝะพ ะฟะพะผะพะณะฐะตั ั ัะตัะฒะตัะฐะผะธ, ะดะพะผะตะฝะฐะผะธ ะธ ะฒัะตะผะตะฝะตะผ ะฝะฐ ัะฐะทัะฐะฑะพัะบั. ะะพะถะตััะฒะพะฒะฐะฝะธั ัะฐะบะถะต ะพะฟะปะฐัะธะฒะฐัั ะฒัะตะผั ะฝะฐ ะธะทััะตะฝะธะต ัะพะณะพ, ััะพ ะฝัะถะฝะพ ะดะปั ัะฐะบะธั
ะฒะพะทะผะพะถะฝะพััะตะน, ะบะฐะบ SAML, Kubernetes ะธ ะฟะพะดะดะตัะถะบะฐ ะฐะณะตะฝัะพะฒ. ะกะปะตะดะธัั ะทะฐ ั
ะพะดะพะผ ัะฐะฑะพั ะธ ะฟะพะดะดะตัะถะฐัั ะผะพะถะฝะพ ะฟะพ ัััะปะบะต ะฝะธะถะต.
+
+[ะะพะดะดะตัะถะฐัั](https://donate.termix.site/)
## ะกะฟะพะฝัะพัั
-ะะฐะธะฝัะตัะตัะพะฒะฐะฝั ะฒ ะฟะปะฐัะฝะพะผ ัะฐะทะผะตัะตะฝะธะธ ะดะปั ะฟะพะดะดะตัะถะบะธ ัะฐะทัะฐะฑะพัะบะธ? ะะฐะฟะธัะธัะต ะฝะฐ [mail@termix.site](mailto:mail@termix.site).
+ะะฝัะตัะตััะตั ะฟะปะฐัะฝะพะต ัะฐะทะผะตัะตะฝะธะต ะฒ ะฟะพะดะดะตัะถะบั ัะฐะทัะฐะฑะพัะบะธ? ะะฐะฟะธัะธัะต ะฝะฐ [mail@termix.site](mailto:mail@termix.site).
@@ -325,10 +410,6 @@ Termix ะฑะตัะฟะปะฐัะตะฝ ะธ ะธะผะตะตั ะพัะบััััะน ะธัั
ะพะดะฝัะน ะบะพะด
-
-
-
-
@@ -340,14 +421,17 @@ Termix ะฑะตัะฟะปะฐัะตะฝ ะธ ะธะผะตะตั ะพัะบััััะน ะธัั
ะพะดะฝัะน ะบะพะด
-
+
+
+
+
## ะะพะดะดะตัะถะบะฐ
-ะัะปะธ ะฒะฐะผ ะฝัะถะฝะฐ ะฟะพะผะพัั ะธะปะธ ะฒั ั
ะพัะธัะต ะทะฐะฟัะพัะธัั ะฝะพะฒัั ััะฝะบัะธั ะดะปั Termix, ะฟะพัะตัะธัะต ัััะฐะฝะธัั [ะัะพะฑะปะตะผั](https://github.com/Termix-SSH/Support/issues), ะฒะพะนะดะธัะต ะฒ ัะธััะตะผั ะธ ะฝะฐะถะผะธัะต `New Issue`. ะะพะถะฐะปัะนััะฐ, ะพะฟะธัะธัะต ะฒะฐัั ะฟัะพะฑะปะตะผั ะบะฐะบ ะผะพะถะฝะพ ะฟะพะดัะพะฑะฝะตะต, ะฟัะตะดะฟะพััะธัะตะปัะฝะพ ะฝะฐ ะฐะฝะณะปะธะนัะบะพะผ ัะทัะบะต. ะั ัะฐะบะถะต ะผะพะถะตัะต ะฟัะธัะพะตะดะธะฝะธัััั ะบ ัะตัะฒะตัั [Discord](https://discord.gg/jVQGdvHDrf) ะธ ะพะฑัะฐัะธัััั ะฒ ะบะฐะฝะฐะป ะฟะพะดะดะตัะถะบะธ, ะพะดะฝะฐะบะพ ะฒัะตะผั ะพัะฒะตัะฐ ะผะพะถะตั ะฑััั ะดะพะปััะต.
+ะัะถะฝะฐ ะฟะพะผะพัั ะธะปะธ ั
ะพัะธัะต ะฟัะตะดะปะพะถะธัั ััะฝะบัะธั? ะกะพะทะดะฐะนัะต [ะฝะพะฒะพะต ะพะฑัะฐัะตะฝะธะต](https://github.com/Termix-SSH/Support/issues) ะธ ะพะฟะธัะธัะต ะฒัั ะบะฐะบ ะผะพะถะฝะพ ะฟะพะดัะพะฑะฝะตะต, ะฟะพ ะฒะพะทะผะพะถะฝะพััะธ ะฝะฐ ะฐะฝะณะปะธะนัะบะพะผ. ะัั ะผะพะถะฝะพ ัะฟัะพัะธัั ะฒ ะบะฐะฝะฐะปะต ะฟะพะดะดะตัะถะบะธ ะฒ [Discord](https://discord.gg/jVQGdvHDrf), ั
ะพัั ัะฐะผ ะพัะฒะตัะฐ ะธะฝะพะณะดะฐ ะฟัะธั
ะพะดะธััั ะถะดะฐัั ะดะพะปััะต.
@@ -399,7 +483,7 @@ Termix ะฑะตัะฟะปะฐัะตะฝ ะธ ะธะผะตะตั ะพัะบััััะน ะธัั
ะพะดะฝัะน ะบะพะด
-ะะตะบะพัะพััะต ะฒะธะดะตะพ ะธ ะธะทะพะฑัะฐะถะตะฝะธั ะผะพะณัั ะฑััั ัััะฐัะตะฒัะธะผะธ ะธะปะธ ะฝะต ะฟะพะปะฝะพัััั ะพััะฐะถะฐัั ััะฝะบัะธะพะฝะฐะปัะฝะพััั.
+ะะตะบะพัะพััะต ะฒะธะดะตะพ ะธ ะธะทะพะฑัะฐะถะตะฝะธั ะผะพะณัั ัััะฐัะตัั ะธะปะธ ะฝะต ะฟะพะปะฝะพัััั ะฟะพะบะฐะทัะฒะฐัั ะฒะพะทะผะพะถะฝะพััะธ.
@@ -407,10 +491,10 @@ Termix ะฑะตัะฟะปะฐัะตะฝ ะธ ะธะผะตะตั ะพัะบััััะน ะธัั
ะพะดะฝัะน ะบะพะด
## ะะฐะฟะปะฐะฝะธัะพะฒะฐะฝะฝัะต ััะฝะบัะธะธ
-ะกะผะพััะธัะต [ะัะพะตะบัั](https://github.com/orgs/Termix-SSH/projects/5) ะดะปั ะฟัะพัะผะพััะฐ ะฒัะตั
ะทะฐะฟะปะฐะฝะธัะพะฒะฐะฝะฝัั
ััะฝะบัะธะน. ะัะปะธ ะฒั ั
ะพัะธัะต ะฒะฝะตััะธ ะฒะบะปะฐะด, ัะผะพััะธัะต [ะฃัะฐััะธะต ะฒ ัะฐะทัะฐะฑะพัะบะต](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md).
+ะัะต ะทะฐะฟะปะฐะฝะธัะพะฒะฐะฝะฝัะต ััะฝะบัะธะธ ัะพะฑัะฐะฝั ะฒ [Projects](https://github.com/orgs/Termix-SSH/projects/5). ะัะปะธ ั
ะพัะธัะต ะฟะพััะฐััะฒะพะฒะฐัั, ะฟะพัะผะพััะธัะต [Contributing](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md).
## ะะธัะตะฝะทะธั
-ะ ะฐัะฟัะพัััะฐะฝัะตััั ะฟะพ ะปะธัะตะฝะทะธะธ Apache License Version 2.0. ะะพะดัะพะฑะฝะตะต ัะผ. ะฒ ัะฐะนะปะต `LICENSE`.
+ะ ะฐัะฟัะพัััะฐะฝัะตััั ะฟะพ ะปะธัะตะฝะทะธะธ Apache ะฒะตััะธะธ 2.0. ะะพะดัะพะฑะฝะพััะธ ะฒ ัะฐะนะปะต `LICENSE`.
diff --git a/docs/readme/README-TR.md b/docs/readme/README-TR.md
index 1ee719b..bb2111e 100644
--- a/docs/readme/README-TR.md
+++ b/docs/readme/README-TR.md
@@ -4,7 +4,7 @@
Termix
-Kendi sunucunuzda barindirilan SSH yonetimi ve uzak masaustu erisimi
+Kendi sunucunuzda รงalฤฑลan sunucu yรถnetimi, SSH ve uzak masaรผstรผnden otomasyonlara kadar
English ยท
@@ -37,7 +37,7 @@
-Termix รผcretsiz ve aรงฤฑk kaynaklฤฑdฤฑr. Faydalฤฑ buluyorsanฤฑz, sunucu maliyetleri ve geliลtirme sรผresine katkฤฑda bulunmak iรงin [baฤฤฑล yapmayฤฑ](https://donate.termix.site/) dรผลรผnebilirsiniz.
+Termix รผcretsiz ve aรงฤฑk kaynaklฤฑdฤฑr. ฤฐลinize yarฤฑyorsa, sunucu masraflarฤฑna ve geliลtirme sรผresine katkฤฑ iรงin [baฤฤฑล yapmayฤฑ](https://donate.termix.site/) dรผลรผnรผn.
@@ -49,145 +49,201 @@ Termix รผcretsiz ve aรงฤฑk kaynaklฤฑdฤฑr. Faydalฤฑ buluyorsanฤฑz, sunucu maliyet
- 1 Eylรผl 2025'te kazanildi
+ 1 Eylรผl 2025 tarihinde kazanฤฑldฤฑ
-## Genel Bakis
+## Genel bakฤฑล
-Termix, acik kaynakli, sonsuza kadar ucretsiz, kendi sunucunuzda barindirabileceginez hepsi bir arada sunucu yonetim platformudur. Sunucularinizi ve altyapinizi tek bir sezgisel arayuz uzerinden yonetmek icin cok platformlu bir cozum sunar. Termix, SSH terminal erisimi, uzak masaustu kontrolu (RDP, VNC, Telnet), SSH tunelleme yetenekleri, uzak dosya yonetimi ve daha bircok arac saglar. Termix, tum platformlarda kullanilabilen Termius'un mukemmel ucretsiz ve kendi barindirmali alternatifidir.
+Termix, sunucularฤฑnฤฑzฤฑ yรถnetmek iรงin รผcretsiz, aรงฤฑk kaynaklฤฑ ve kendi sunucunuzda รงalฤฑลan bir platformdur. SSH terminallerini, uzak masaรผstlerini (RDP, VNC, Telnet), dosya aktarฤฑmlarฤฑnฤฑ, tรผnelleri, Docker'ฤฑ, รถlรงรผmleri ve otomasyonlarฤฑ tek yerde toplar; web, masaรผstรผ ve mobilde รงalฤฑลฤฑr. Sonsuza dek รผcretsiz kalan, kendi sunucunuzda รงalฤฑลan bir Termius alternatifidir.
-## Ozellikler
+## รzellikler
-**SSH Terminal Erisimi:**
-Tarayici benzeri sekme sistemiyle bolunmus ekran destegine sahip (4 panele kadar) tam ozellikli terminal. Yaygin terminal temalari, yazi tipleri ve diger bilesenleri iceren terminal ozellestirme destegi.
+**SSH terminali:**
+Tarayฤฑcฤฑ gibi sekmeleri ve bรถlรผnmรผล ekranฤฑ olan tam donanฤฑmlฤฑ bir terminal, aynฤฑ anda 6 panele kadar. Temanฤฑzฤฑ, yazฤฑ tipinizi ve renklerinizi seรงin. Her oturumun รผstรผnde anlฤฑk CPU, bellek ve disk bilgisi gรถsteren bir araรง รงubuฤu ile o sunucunun dosyalarฤฑna, Docker'ฤฑna, tรผnellerine ve รถlรงรผmlerine giden kฤฑsayollar bulunur.
-**Uzak Masaustu Erisimi:**
-Tam ozellestirme ve bolunmus ekran ile tarayici uzerinden RDP, VNC ve Telnet destegi.
+**Uzak masaรผstรผ:**
+Tarayฤฑcฤฑda RDP, VNC ve Telnet; diฤer oturumlar gibi sekmelerde ve bรถlรผnmรผล ekranda. RDP sรผrรผcรผleri iรงin dosya tarayฤฑcฤฑsฤฑ ve sรผrรผkle bฤฑrak yรผkleme iรงerir. Windows masaรผstรผnde bir sunucuyu yerel RDP istemcisinde de aรงabilirsiniz.
-**SSH Tunel Yonetimi:**
-Otomatik yeniden baglanti, saglik izleme ve yerel, uzak veya dinamik SOCKS yonlendirme ile sunucular arasi SSH tunelleri olusturun ve yonetin. Masaustu istemci-sunucu tunel ayarlari her masaustu kurulumu icin yerel olarak depolanir; istege bagli C2S hazir ayar anlik goruntuleri, yerel bir tunel yapilandirmasini istemciler arasinda tasimak istediginizde sunucuya kaydedilebilir, yeniden adlandirilabilir, yuklenebilir veya silinebilir.
+**SSH tรผnelleri:**
+Yerel, uzak ve dinamik SOCKS yรถnlendirmesi; otomatik yeniden baฤlanma ve durum kontrolleriyle. Masaรผstรผ uygulamasฤฑndaki istemciden sunucuya tรผneller o makinede saklanฤฑr, ayarlarฤฑ sunucuya kaydederek bir kurulumu baลka bir makineye taลฤฑyabilirsiniz.
-**Uzak Dosya Yoneticisi:**
-Uzak sunuculardaki dosyalari dogrudan yonetin; kod, goruntu, ses ve video goruntuleme ve duzenleme destegi ile. Sudo destegi ile dosyalari sorunsuzca yukleyin, indirin, yeniden adlandirin, silin ve tasiyin. Dosyalari sunucudan sunucuya tasima destegini de icerir.
+**Dosya yรถneticisi:**
+SFTP รผzerinden dosyalara gรถz atฤฑn, dรผzenleyin, yรผkleyin, indirin, yeniden adlandฤฑrฤฑn, taลฤฑyฤฑn ve silin; sudo da kullanฤฑlabilir. Kod, gรถrsel, ses ve videoyu gรถrรผntรผleyip dรผzenleyin. Dosyalarฤฑ doฤrudan bir sunucudan diฤerine kopyalayฤฑn; en hฤฑzlฤฑ yol sizin iรงin seรงilir ve aktarฤฑmlarฤฑn bรผtรผnlรผฤรผ doฤrulanฤฑr.
-**Docker ve Podman Yonetimi:**
-Konteynerleri baslatฤฑn, durdurun, duraklatฤฑn, kaldirin. Konteyner istatistiklerini goruntuleyin. Docker exec terminali kullanarak konteyneri kontrol edin. Docker ve Podman'i konteyner calisma ortami olarak destekler. Portainer veya Dockge'nin yerini almak icin degil, konteynerlerinizi olusturmak yerine basitce yonetmek icin tasarlanmistir.
+**Docker ve Podman:**
+Kapsayฤฑcฤฑlarฤฑ baลlatฤฑn, durdurun, duraklatฤฑn ve silin, durumlarฤฑnฤฑ izleyin ve iรงlerinde bir kabuk aรงฤฑn. Hem Docker hem Podman ile รงalฤฑลฤฑr. Portainer ya da Dockge'nin yerini almak iรงin deฤil, hรขlihazฤฑrdaki kapsayฤฑcฤฑlarฤฑnฤฑzฤฑ yรถnetmek iรงin tasarlandฤฑ.
-**SSH Ana Bilgisayar Yoneticisi:**
-SSH baglantilarinizi etiketler ve klasorlerle (klasor ozellestirme ve ic ice klasor destegi ile) kaydedin, duzenleyin ve yonetin; yeniden kullanilabilir giris bilgilerini kolayca kaydedin ve SSH anahtarlarinin dagitimini otomatiklestirin.
+**Sunucu yรถneticisi:**
+Sunucularฤฑnฤฑzฤฑ etiketlerle ve isim ve renk verebileceฤiniz iรง iรงe klasรถrlerle dรผzenleyin. Kayฤฑtlฤฑ kimlik bilgilerini birden รงok sunucuda kullanฤฑn, SSH anahtarlarฤฑnฤฑ otomatik daฤฤฑtฤฑn, sunucularฤฑ bir รผst sunucunun altฤฑnda toplayฤฑn, toplu dรผzenleyip dฤฑลa aktarฤฑn ve kaydetmek istemediฤiniz tek seferlik baฤlantฤฑlar iรงin hฤฑzlฤฑ baฤlantฤฑyฤฑ kullanฤฑn.
-**Ana Bilgisayar Metrikleri:**
-Cogu Linux tabanli sunucularda calisan CPU, bellek, disk kullanimi, ag, calisma suresi, sistem bilgisi, guvenlik duvari, port izleme, gunluk goruntuleyici, kullanicilar/izinler, sertifikalar ve daha fazlasini goruntuleyin. Zaman serisi gecmis grafiklerini ve ntfy ile webhook destekli esik tabanli uyarilari icerir.
+**Sunucu รถlรงรผmleri:**
+รoฤu Linux sunucusunda CPU, bellek, disk, aฤ, sฤฑcaklฤฑk, รงalฤฑลma sรผresi, sรผreรงler, portlar, oturum aรงmalar ve sistem bilgisi; geรงmiล grafikleriyle birlikte. Yรถnetim kartlarฤฑ sayesinde servisleri, cron gรถrevlerini, paketleri, kullanฤฑcฤฑlarฤฑ, gรผvenlik duvarฤฑ kurallarฤฑnฤฑ, WireGuard'ฤฑ, Tailscale'i, SSL sertifikalarฤฑnฤฑ, gรผnlรผkleri ve saฤlฤฑk kontrollerini Termix'ten รงฤฑkmadan yรถnetirsiniz.
-**Kullanici Kimlik Dogrulama:**
-Yonetici kontrolleri (diger kullanicilarin bilgilerini duzenleyebilir), OIDC/LDAP/SSO (erisim kontrollu), 2FA (TOTP) ve passkey (WebAuthn) destegi ile guvenli kullanici yonetimi. Tum platformlardaki aktif kullanici oturumlarini goruntuleyin ve izinleri iptal edin. OIDC/Yerel hesaplarinizi birbirine baglayin. Tum kullanicilarin islemlerinin denetim gunlugunu goruntuleyin.
+**Otomasyonlar:**
+Bir tetikleyici seรงin, sonra ne olacaฤฤฑnฤฑ sรถyleyin. Tetikleyiciler arasฤฑnda bir รถlรงรผmรผn eลiฤi aลmasฤฑ, bir sunucunun dรผลmesi veya geri gelmesi, saฤlฤฑk kontrolรผnรผn deฤiลmesi, bir zamanlama, bir kapsayฤฑcฤฑ olayฤฑ ya da gelen bir webhook var. Adฤฑmlar komut ve parรงacฤฑk รงalฤฑลtฤฑrabilir, kapsayฤฑcฤฑ ve tรผnelleri yรถnetebilir, bir makineyi uyandฤฑrabilir, bir adrese istek atabilir, bekleyebilir, koลula gรถre dallanabilir, baลka bir otomasyonu รงalฤฑลtฤฑrabilir ve ntfy, Discord ya da webhook ile size haber verebilir. Deneme รงalฤฑลtฤฑrmalarฤฑ ile รถnce gรผvenle test edersiniz.
-**Tailscale Entegrasyonu:**
-Tailscale aginizdaki cihazlari listeleyerek hizlica ana bilgisayar olarak ekleyin ve kimlik dogrulama yontemi olarak Tailscale SSH kullanarak baglanin; bu sayede ag ACL'leriniz kimlik bilgileri depolamadan yetkilendirmeyi yonetir.
+**Filolar:**
+Sunucularฤฑ tek tek seรงerek ya da etiket kurallarฤฑyla bir filoda toplayฤฑn; yeni sunucular kendiliฤinden katฤฑlsฤฑn. Tek bir komutu tรผm sunucularda aynฤฑ anda รงalฤฑลtฤฑrฤฑn, hepsine dosya gรถnderip hepsinden dosya alฤฑn, paket kurun ve iลletim sistemi, รงekirdek, mimari ve รงalฤฑลma sรผresi dรถkรผmรผnรผ toplayฤฑn.
-**RBAC/Paylasim:**
-Roller olusturun ve ana bilgisayarlari kullanicilar/roller arasinda paylasin. Tum kimlik dogrulama turlerini ve tum ana bilgisayar protokollerini destekler.
+**Yapay zekรข asistanฤฑ:**
+ฤฐsteฤe baฤlฤฑdฤฑr ve siz aรงana kadar kapalฤฑdฤฑr. OpenAI, Anthropic, Gemini, Ollama ya da OpenAI uyumlu herhangi bir uรง noktayฤฑ baฤlayฤฑn ve kurulumunuz hakkฤฑnda sorular sorun. Sunucularฤฑ, filolarฤฑ, parรงacฤฑklarฤฑ ve uyarฤฑlarฤฑ okuyabilir; deฤiลiklikleri kendisi yapmak yerine onayฤฑnฤฑza sunar. Kimlik bilgilerine, kullanฤฑcฤฑlara ve ayarlara asla eriลemez. Yรถneticiler tรผm kurulum iรงin kapalฤฑ bฤฑrakabilir, siz de kurulum sฤฑrasฤฑnda gizleyebilirsiniz.
-**Seri Baglantilar:**
-Seri cihazlara (router, switch, mikrodenetleyici vb.) dogrudan tarayici veya masaustu uygulamasindan baglanin. Baud hizi, veri bitleri, durdurma bitleri ve parite yapilandirin. Desteklenen tarayicilarda Web Serial API, Electron uygulamasinda yerel arka ucu kullanir.
+**Giriล ve kullanฤฑcฤฑlar:**
+Yerel hesaplarฤฑn yanฤฑnda OIDC, LDAP, GitHub ve Google ile giriล; iki adฤฑmlฤฑ doฤrulama (TOTP), geรงiล anahtarlarฤฑ (WebAuthn) ve gรผvenilir cihazlar. Yรถneticiler kullanฤฑcฤฑlarฤฑ yรถnetebilir, OIDC gruplarฤฑnฤฑ rollerle eลleลtirebilir, tรผm platformlardaki etkin oturumlarฤฑ gรถrรผp sonlandฤฑrabilir. Yerel ve OIDC hesaplarฤฑnฤฑzฤฑ birbirine baฤlayฤฑn ve herkesin ne yaptฤฑฤฤฑnฤฑ denetim gรผnlรผฤรผnden okuyun.
-**Uyarilar:**
-Ana bilgisayar metrikleri (CPU, bellek, disk vb.) icin esik tabanli uyari kurallari belirleyin ve tetiklendiklerinde ntfy veya webhook araciligiyla bildirim alin. Gecmis gunlugunde tetiklenen ve cozulen uyarilari goruntuleyin.
+**Roller ve paylaลฤฑm:**
+Roller oluลturun ve sunucularฤฑ kullanฤฑcฤฑlar veya rollerle dรถrt dรผzeyde paylaลฤฑn: baฤlanma, gรถrรผntรผleme, dรผzenleme ve yรถnetme. Tรผm kimlik doฤrulama tรผrleri ve tรผm protokollerle รงalฤฑลฤฑr, paylaลฤฑlan bir sunucuda kullanฤฑlan kimlik bilgilerini deฤiลtirebilirsiniz.
-**Ana Sayfa:**
-Surukleme ve birakma widget izgarasina sahip tamamen ozellestirilebilir bir ana sayfa. Ana bilgisayar durumu, hizmet baglantilari, saatler, notlar, RSS besleme, hava durumu, Docker konteynerleri, ana bilgisayar metrik grafikleri, gomulu terminaller, iframe ve daha fazlasi icin widget ekleyin.
+**Uyarฤฑlar:**
+CPU, bellek ve disk gibi sunucu รถlรงรผmlerine kurallar koyun ve tetiklendiklerinde ntfy, Discord veya webhook ile haberdar olun. Devam eden ve รงรถzรผlen uyarฤฑlarฤฑ geรงmiลte gรถrรผn, ilgilenmediklerinizi kapatฤฑn.
-**Veritabani Sifreleme:**
-Arka uc, sifrelenmis SQLite veritabani dosyalari olarak depolanir. Daha fazla bilgi icin [belgelere](https://docs.termix.site/security) bakin.
+**Ana sayfa:**
+Kendi kurduฤunuz, sรผrรผkle bฤฑrak รงalฤฑลan bir bileลen ฤฑzgarasฤฑ. Sunucu durumu, ping, servis baฤlantฤฑlarฤฑ, yer imleri, arama, saatler, takvimler, geri sayฤฑmlar, notlar, RSS, hava durumu, gรถrseller, gรถmรผlรผ sayfalar, Docker, tรผneller, รถlรงรผm grafikleri, kendi API'leriniz ve hatta canlฤฑ bir terminal iรงin bileลenler var.
-**Ag Grafigi:**
-Kontrol panelinizi, SSH baglantilariniza dayali olarak ev laboratuvarinizi durum destegi ile gorselletirmek icin ozellestirin.
+**Parรงacฤฑklar ve araรงlar:**
+Sฤฑk kullandฤฑฤฤฑnฤฑz komutlarฤฑ kaydedin ve tek tฤฑkla รงalฤฑลtฤฑrฤฑn; sunucu iรงin ve kendi girdileriniz iรงin deฤiลkenler kullanabilirsiniz. Aynฤฑ komutu aรงฤฑk olan tรผm terminallerde รงalฤฑลtฤฑrฤฑn, komut geรงmiลinizde tamamlamayla arama yapฤฑn.
-**SSH Araclari:**
-Tek tiklamayla calistirilan yeniden kullanilabilir komut parcaciklari olusturun. Birden fazla acik terminalde ayni anda tek bir komut calistirin.
+**Oturum paylaลฤฑmฤฑ:**
+Canlฤฑ bir terminal, RDP, VNC veya Telnet oturumunu paylaลฤฑn. Hesap gerekmeden katฤฑlฤฑnabilen bir baฤlantฤฑ gรถnderin ya da belirli bir Termix kullanฤฑcฤฑsฤฑyla, salt okunur veya yazma yetkili olarak paylaลฤฑn. Paylaลฤฑmlar kendiliฤinden sona erebilir veya istediฤiniz an iptal edilebilir; tรผmรผyle ya da sunucu bazฤฑnda kapatฤฑlabilir.
-**Kalici Sekmeler:**
-Kullanici profilinde etkinlestirilmisse SSH oturumlari ve sekmeler cihazlar/yenilemeler arasinda acik kalir.
+**Oturum kaydฤฑ ve gรผnlรผkler:**
+Terminal, RDP ve VNC oturumlarฤฑnฤฑ kaydedin ve sonra izleyin. Bir oturumun dรผz metin gรผnlรผฤรผnรผ indirin, baฤlantฤฑ gรผnlรผฤรผne bakarak baฤlantฤฑ sฤฑrasฤฑnda tam olarak ne olduฤunu gรถrรผn.
+
+
+
+
+**Seri baฤlantฤฑlar:**
+Yรถnlendirici, anahtar ve mikrodenetleyici gibi seri cihazlarla tarayฤฑcฤฑdan veya masaรผstรผ uygulamasฤฑndan konuลun. Baud hฤฑzฤฑnฤฑ, veri bitlerini, dur bitlerini ve pariteyi ayarlayฤฑn. Destekleyen tarayฤฑcฤฑlarda Web Serial API'yi, masaรผstรผ uygulamasฤฑnda yerel bir arka ucu kullanฤฑr.
+
+
+
+
+
+
+**Tailscale:**
+Tailnet'inizdeki cihazlarฤฑ รงekip birkaรง tฤฑkla sunucu olarak ekleyin ve Tailscale SSH ile baฤlanฤฑn; eriลimi tailnet kurallarฤฑnฤฑz yรถnetsin, kimlik bilgisi saklamanฤฑz gerekmesin. Headscale ve รถzel uรง noktalar da รงalฤฑลฤฑr.
+
+
+
+
+**Proxmox:**
+Sunucularฤฑ doฤrudan bir Proxmox kurulumundan iรงe aktarฤฑn; dรผฤรผm ve misafir makinelerin CPU, bellek ve depolama dahil durumlarฤฑnฤฑ kendi sekmesinde izleyin.
+
+
+
+
+
+
+**รalฤฑลma alanlarฤฑ ve sekmeler:**
+Bir sekme grubunu bรถlรผnmรผล dรผzeniyle birlikte kaydedin ve hepsini tek tฤฑkla yeniden aรงฤฑn. Termix son oturumunuzu da hatฤฑrlar, bรถylece sayfayฤฑ yenileseniz de baลka cihaza geรงseniz de sekmeleriniz geri gelir.
+
+
+
+
+**Rehberli kurulum:**
+Kฤฑsa bir kurulum, arayรผz รถn ayarฤฑnฤฑ, temanฤฑzฤฑ, istediฤiniz รถzellikleri ve ilk sunucunuzu seรงmenizde size yol gรถsterir. Basit kip kullanmadฤฑฤฤฑnฤฑz ลeyleri gizler; kurulumu istediฤiniz zaman yeniden รงalฤฑลtฤฑrabilir veya รถn ayarฤฑ deฤiลtirebilirsiniz.
+
+
+
+
+
+
+**Baฤฤฑmsฤฑz masaรผstรผ ve eลitleme:**
+Masaรผstรผ uygulamasฤฑ kendi arka ucu ve veritabanฤฑyla tek baลฤฑna, sunucusuz รงalฤฑลฤฑr. ฤฐsterseniz bir Termix sunucusuna baฤlayฤฑp sunucularฤฑ, kimlik bilgilerini, parรงacฤฑklarฤฑ ve fazlasฤฑnฤฑ iki yรถnlรผ eลitleyebilir, baฤlantฤฑlarฤฑn kendi makinenizden mi yoksa sunucu รผzerinden mi kurulacaฤฤฑnฤฑ seรงebilirsiniz.
+
+
+
+
+**Komut satฤฑrฤฑ:**
+Kabuฤunuz ve betikleriniz iรงin bir `termix` CLI'ฤฑ. Terminal aรงฤฑn, tek bir sunucuda veya tรผm filoda komut รงalฤฑลtฤฑrฤฑn, SFTP ile dosya taลฤฑyฤฑn ve sunucularฤฑ, parรงacฤฑklarฤฑ ve kimlik bilgilerini yรถnetin. `npm install -g @termix-cli/cli` ile kurun ya da baฤฤฑmsฤฑz bir รงalฤฑลtฤฑrฤฑlabilir dosya edinin. [CLI belgelerine](https://docs.termix.site/cli) bakฤฑn.
+
+
+
+
+
+
+**Gรผvenlik:**
+Parolalar, anahtarlar ve diฤer gizli bilgiler kullanฤฑcฤฑ bazฤฑnda ลifrelenir, veritabanฤฑ dosyalarฤฑnฤฑn kendisi de diskte ลifrelenebilir. Nasฤฑl รงalฤฑลtฤฑฤฤฑ iรงin [belgelere](https://docs.termix.site/security) bakฤฑn.
**Diller:**
-Yaklasik 30 dil icin yerlesik destek ([Crowdin](https://docs.termix.site/translations) tarafindan yonetilir).
+Yaklaลฤฑk 30 dil yerleลik olarak gelir, [Crowdin](https://docs.termix.site/translations) รผzerinden yรถnetilir.
@@ -196,43 +252,46 @@ Yaklasik 30 dil icin yerlesik destek ([Crowdin](https://docs.termix.site/transla
-Daha fazla ozellik
+Daha fazla รถzellik
-- **Kontrol Paneli** - Kontrol panelinizde sunucu bilgilerini bir bakista goruntuleyin
-- **API Anahtarlari** - Otomasyon/CI icin kullanilmak uzere son kullanma tarihleriyle kullanici kapsamli API anahtarlari olusturun
-- **Veri Disa/Ice Aktarma** - SSH ana bilgisayarlarini, kimlik bilgilerini ve dosya yoneticisi verilerini disa ve ice aktarin
-- **Otomatik SSL Kurulumu** - HTTPS yonlendirmeleriyle yerlesik SSL sertifika olusturma ve yonetimi
-- **Modern Arayuz** - React, Tailwind CSS ve Shadcn ile olusturulmus temiz masaustu/mobil uyumlu arayuz. Isik, karanlik, Dracula vb. dahil olmak uzere bircok farkli UI temasi arasฤฑndan secim yapin. Herhangi bir baglantฤฑyฤฑ tam ekranda acmak icin URL yollarini kullanin.
-- **Komut Gecmisi** - Daha once calistirilan SSH komutlarini otomatik tamamlayin ve goruntuleyin
-- **Hizli Baglanti** - Baglanti verilerini kaydetmeden bir sunucuya baglanin
-- **Komut Paleti** - Sol shift tusuna iki kez basarak SSH baglantilariniza klavyenizle hizlica erisin
-- **Proxmox Entegrasyonu** - Proxmox ornekinizden Termix'e otomatik olarak ana bilgisayar ekleyin
-- **SSH Zengin Ozellikler** - Atlama ana bilgisayarlari, Warpgate, TOTP tabanli baglantilar, SOCKS5, ana bilgisayar anahtar dogrulama, otomatik sifre doldurma, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, port knocking, terminal gunlukleme, SSH agent forwarding, Bitwarden SSH agent, HashiCorp Vault SSH imzalama ve dahasini destekler.
-- **Termix ID** - Termix'e entegre edilmis bir sshid.io esdegeri. Bir kullanici adi edinin, genel SSH anahtarlarinizi bir cozumleyici URL'sinde yayinlayin ve SSH sertifikalari vermek icin yerlesik bir CA kullanin.
+- **Kontrol paneli** - Kendi dizdiฤiniz kartlarla sunucularฤฑnฤฑza tek bakฤฑลta gรถz atฤฑn
+- **Aฤ grafiฤi** - Ev laboratuvarฤฑnฤฑz sunucularฤฑnฤฑzdan รงizilir, durum anlฤฑk gรถsterilir
+- **Tmux izleyici** - tmux oturumlarฤฑna, pencerelerine ve panellerine รถnizleme ve aramayla gรถz atฤฑn
+- **API anahtarlarฤฑ** - Betikler ve CI iรงin, son kullanma tarihli kullanฤฑcฤฑya รถzel anahtarlar
+- **Dฤฑลa ve iรงe aktarma** - Sunucularฤฑ, kimlik bilgilerini ve dosya yรถneticisi verilerini taลฤฑyฤฑn
+- **Otomatik SSL** - Sertifikalar sizin iรงin oluลturulur ve yenilenir, HTTPS yรถnlendirmesiyle birlikte; ya da kendi sertifikanฤฑzฤฑ kullanฤฑn
+- **Veritabanlarฤฑ** - Varsayฤฑlan SQLite, ayrฤฑca PostgreSQL ve MySQL desteklenir
+- **Modern arayรผz** - Masaรผstรผ ve mobilde รงalฤฑลan sade bir React arayรผzรผ; aรงฤฑk, koyu ve Dracula gibi temalarla. Her baฤlantฤฑ bir adresten tam ekran aรงฤฑlabilir
+- **Komut paleti** - Sol Shift'e iki kez basarak klavyeden bir sunucuya atlayฤฑn
+- **Klavye kฤฑsayollarฤฑ** - Sekmeler arasฤฑnda geรงiล, sekme kapatma ve dahasฤฑ, hepsi yeniden atanabilir
+- **Wake-on-LAN** - Bir makineyi Termix'ten ya da bir otomasyon adฤฑmฤฑndan uyandฤฑrฤฑn
+- **Gรผvenilir vekil doฤrulamasฤฑ** - Giriลi ters vekil sunucu halletsin ve kullanฤฑcฤฑyฤฑ aktarsฤฑn
+- **Zengin SSH desteฤi** - Atlama sunucularฤฑ, Warpgate, TOTP istekleri, SOCKS5, sunucu anahtarฤฑ doฤrulama, parola otomatik doldurma, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, port knocking, terminal gรผnlรผฤรผ, aracฤฑ yรถnlendirme, Bitwarden SSH aracฤฑsฤฑ, HashiCorp Vault ile SSH imzalama ve dahasฤฑ
+- **Termix ID** - sshid.io'nun yerleลik hali. Bir kullanฤฑcฤฑ adฤฑ alฤฑn, aรงฤฑk anahtarlarฤฑnฤฑzฤฑ bir รงรถzรผmleyici adresinde yayฤฑmlayฤฑn ve yerleลik CA ile SSH sertifikalarฤฑ รงฤฑkarฤฑn
-## Platform Destegi
+## Platform desteฤi
Platform
-Dagitim
+Daฤฤฑtฤฑm
Web
-Herhangi bir modern tarayici (Chrome, Safari, Firefox) ยท PWA destegi
+Gรผncel her tarayฤฑcฤฑ (Chrome, Safari, Firefox) ยท PWA desteฤi
Windows x64/ia32
-Tasฤฑnabilir ยท MSI Yukleyici ยท Chocolatey
+Taลฤฑnabilir ยท MSI kurulumu ยท Chocolatey
Linux x64/ia32
-Tasฤฑnabilir ยท AUR ยท AppImage ยท Deb ยท Flatpak
+Taลฤฑnabilir ยท AUR ยท AppImage ยท Deb ยท Flatpak
macOS x64/ia32, v12.0+
@@ -252,9 +311,9 @@ Yaklasik 30 dil icin yerlesik destek ([Crowdin](https://docs.termix.site/transla
## Kurulum
-Termix'i tum platformlara nasil kuracaginiz hakkinda daha fazla bilgi icin Termix [Belgelerine](https://docs.termix.site/install) bakin.
+Tรผm platformlar iรงin ayrฤฑntฤฑlฤฑ kurulum yรถnergelerini [Termix belgelerinde](https://docs.termix.site/install) bulabilirsiniz.
-Ornek bir Docker Compose dosyasi (uzak masaustu ozelliklerini kullanmayi planlamiyorsaniz `guacd` ve agi cikarabilirsiniz):
+รrnek Docker Compose dosyasฤฑ (uzak masaรผstรผnรผ kullanmayacaksanฤฑz `guacd` ve aฤ kฤฑsmฤฑnฤฑ รงฤฑkarabilirsiniz):
```yaml
services:
@@ -291,19 +350,45 @@ networks:
driver: bridge
```
+### Komut satฤฑrฤฑ
+
+Termix'in bir CLI'ฤฑ da var; sunucularฤฑnฤฑzฤฑ terminalden yรถnetebilir ve Termix'i kendi betiklerinizde kullanabilirsiniz.
+
+```bash
+npm install -g @termix-cli/cli
+termix login --url https://termix.example.com
+termix ssh 1
+```
+
+Terminal aรงabilir, tek bir sunucuda veya tรผm filoda komut รงalฤฑลtฤฑrabilir, SFTP ile dosya taลฤฑyabilir ve sunucularฤฑ, parรงacฤฑklarฤฑ ve kimlik bilgilerini yรถnetebilir. Belgelerin tamamฤฑ [docs.termix.site/cli](https://docs.termix.site/cli) adresinde.
+
+### Bulutta barฤฑndฤฑrma
+
+Termix sunucusunu kendi aฤฤฑnฤฑz yerine bir VPS รผzerinde de รงalฤฑลtฤฑrabilirsiniz. Termix yรถnettiฤi aฤฤฑn iรงinde รงalฤฑลฤฑyorsa, bir kesinti onu da beraberinde gรถtรผrรผr; hem de tam onu tamir iรงin kullanmanฤฑz gereken anda. Dฤฑลarฤฑda รงalฤฑลtฤฑrmak eriลilebilir kalmasฤฑnฤฑ saฤlar, sabit bir IP verir ve VPN ya da port yรถnlendirme olmadan her yerden girmenize izin verir.
+
+[GINERNET](https://docs.termix.site/install/ginernet) Termix'e sponsor oluyor ve belgelerde onlarฤฑn VPS platformuna kurulum iรงin adฤฑm adฤฑm bir rehber var.
+
-## Baฤฤฑล Yapฤฑn
+## Telemetri
-Termix รผcretsiz ve aรงฤฑk kaynaklฤฑdฤฑr, abonelik veya รผcretli plan yoktur. Faydalฤฑ buluyorsaniz, sunucu maliyetleri, alan adlari ve gelistirme suresine katkida bulunmak icin bagis yapmayi dusunebilirsiniz. Bagislar ayrica SAML, Kubernetes ve Agent destegi gibi ozellikleri gelistirmek icin gereken arastirma ve ogrenme suresini finanse etmeye yardimci olur. Ilerlemeyi takip edin ve asagidan bagis yapin.
+Termix gรผnde bir kez kรผรงรผk ve anonim bir sinyal gรถnderir; bรถylece kaรง kurulumun รงalฤฑลtฤฑฤฤฑnฤฑ ve hangi รถzelliklerin kullanฤฑldฤฑฤฤฑnฤฑ gรถrebiliyorum. ฤฐรงinde rastgele bir kurulum kimliฤi, kaรง kullanฤฑcฤฑ ve sunucunuz olduฤu, uygulama sรผrรผmรผ ve son 24 saatte hangi รถzelliklerin (terminal, dosya yรถneticisi, tรผneller, docker vb.) kullanฤฑldฤฑฤฤฑ yer alฤฑr. ฤฐรงinde asla kullanฤฑcฤฑ adlarฤฑ, sunucu adlarฤฑ, IP adresleri, kimlik bilgileri ya da sizi veya sunucularฤฑnฤฑzฤฑ tanฤฑmlayan baลka bir ลey bulunmaz.
-[Baฤฤฑล Yapฤฑn](https://donate.termix.site/)
+Varsayฤฑlan olarak aรงฤฑktฤฑr. Yรถnetici ayarlarฤฑnda Genel bรถlรผmรผnden kapatabilir ya da Termix'i hiรง baลlatmadan รถnce `ENABLE_TELEMETRY=false` tanฤฑmlayabilirsiniz.
+
+
+
+## Baฤฤฑล
+
+Termix รผcretsiz ve aรงฤฑk kaynaklฤฑdฤฑr; abonelik ya da รผcretli plan yoktur. ฤฐลinize yarฤฑyorsa, sunucu, alan adฤฑ ve geliลtirme sรผresi masraflarฤฑna katkฤฑ iรงin baฤฤฑล yapmayฤฑ dรผลรผnรผn. Baฤฤฑลlar ayrฤฑca SAML, Kubernetes ve aracฤฑ desteฤi gibi รถzellikler iรงin gereken araลtฤฑrma ve รถฤrenme sรผresini karลฤฑlar. ฤฐlerlemeyi aลaฤฤฑdan izleyip baฤฤฑล yapabilirsiniz.
+
+[Baฤฤฑล yap](https://donate.termix.site/)
## Sponsorlar
-Gelistirmeyi desteklemek icin ucretli bir yerlesim ile ilgileniyor musunuz? [mail@termix.site](mailto:mail@termix.site) adresine e-posta gonderin.
+Geliลtirmeyi desteklemek iรงin รผcretli bir yerleลim ilginizi รงeker mi? [mail@termix.site](mailto:mail@termix.site) adresine yazฤฑn.
@@ -325,10 +410,6 @@ Gelistirmeyi desteklemek icin ucretli bir yerlesim ile ilgileniyor musunuz? [mai
-
-
-
-
@@ -340,18 +421,21 @@ Gelistirmeyi desteklemek icin ucretli bir yerlesim ile ilgileniyor musunuz? [mai
-
+
+
+
+
## Destek
-Termix ile ilgili yardima ihtiyaciniz varsa veya bir ozellik talep etmek istiyorsaniz, [Sorunlar](https://github.com/Termix-SSH/Support/issues) sayfasini ziyaret edin, giris yapin ve `New Issue` butonuna basin. Lutfen sorununuzu mumkun oldugunca ayrintili yazin, tercihen Ingilizce olarak. Ayrica [Discord](https://discord.gg/jVQGdvHDrf) sunucusuna katilabilir ve destek kanalini ziyaret edebilirsiniz, ancak yanit sureleri daha uzun olabilir.
+Yardฤฑma mฤฑ ihtiyacฤฑnฤฑz var ya da bir รถzellik mi istiyorsunuz? [Yeni bir konu](https://github.com/Termix-SSH/Support/issues) aรงฤฑn ve olabildiฤince ayrฤฑntฤฑ ekleyin, mรผmkรผnse ฤฐngilizce yazฤฑn. [Discord](https://discord.gg/jVQGdvHDrf) รผzerindeki destek kanalฤฑnda da sorabilirsiniz, ancak oradaki yanฤฑtlar daha uzun sรผrebilir.
-## Ekran Goruntuleri
+## Ekran gรถrรผntรผleri
@@ -359,7 +443,7 @@ Termix ile ilgili yardima ihtiyaciniz varsa veya bir ozellik talep etmek istiyor
[](https://www.youtube.com/@TermixSSH/videos)
-YouTube'da guncelleme ozetlerini izleyin
+Gรผncelleme tanฤฑtฤฑmlarฤฑnฤฑ YouTube'da izleyin
@@ -399,18 +483,18 @@ Termix ile ilgili yardima ihtiyaciniz varsa veya bir ozellik talep etmek istiyor
-Bazi videolar ve gorseller guncel olmayabilir veya ozellikleri tam olarak yansitmayabilir.
+Bazฤฑ videolar ve gรถrseller gรผncelliฤini yitirmiล ya da รถzellikleri tam olarak gรถstermiyor olabilir.
-## Planlanan Ozellikler
+## Planlanan รถzellikler
-Tum planlanan ozellikler icin [Projeler](https://github.com/orgs/Termix-SSH/projects/5) sayfasina bakin. Katkida bulunmak istiyorsaniz, [Katkida Bulunma](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md) sayfasina bakin.
+Planlanan tรผm รถzellikler [Projects](https://github.com/orgs/Termix-SSH/projects/5) sayfasฤฑnda. Katkฤฑda bulunmak isterseniz [Contributing](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md) dosyasฤฑna bakฤฑn.
## Lisans
-Apache Lisansi Surumu 2.0 altinda dagitilmaktadir. Daha fazla bilgi icin `LICENSE` dosyasina bakin.
+Apache Lisansฤฑ Sรผrรผm 2.0 ile daฤฤฑtฤฑlฤฑr. Ayrฤฑntฤฑlar iรงin `LICENSE` dosyasฤฑna bakฤฑn.
diff --git a/docs/readme/README-VI.md b/docs/readme/README-VI.md
index 106b48c..2831aa0 100644
--- a/docs/readme/README-VI.md
+++ b/docs/readme/README-VI.md
@@ -4,7 +4,7 @@
Termix
-Quan ly SSH tu luu tru va truy cap may tinh tu xa
+Quแบฃn lรฝ mรกy chแปง tแปฑ lฦฐu trแปฏ, tแปซ SSH vร mรกy tรญnh tแปซ xa cho ฤแบฟn tแปฑ ฤแปng hoรก
English ยท
@@ -37,7 +37,7 @@
-Termix lร dแปฑ รกn miแป
n phรญ vร mรฃ nguแปn mแป. Nแบฟu bแบกn thแบฅy hแปฏu รญch, hรฃy cรขn nhแบฏc [quyรชn gรณp](https://donate.termix.site/) ฤแป giรบp trang trแบฃi chi phรญ mรกy chแปง vร thแปi gian phรกt triแปn.
+Termix miแป
n phรญ vร mรฃ nguแปn mแป. Nแบฟu bแบกn thแบฅy hแปฏu รญch, hรฃy cรขn nhแบฏc [quyรชn gรณp](https://donate.termix.site/) ฤแป giรบp trang trแบฃi chi phรญ mรกy chแปง vร thแปi gian phรกt triแปn.
@@ -49,145 +49,201 @@ Termix lร dแปฑ รกn miแป
n phรญ vร mรฃ nguแปn mแป. Nแบฟu bแบกn thแบฅy hแปฏu
- Dat duoc vao ngay 1 thang 9 nam 2025
+ ฤแบกt ฤฦฐแปฃc vร o ngร y 1 thรกng 9 nฤm 2025
-## Tong Quan
+## Tแปng quan
-Termix la nen tang quan ly may chu tat ca trong mot, ma nguon mo, mien phi vinh vien, tu luu tru. No cung cap giai phap da nen tang de quan ly may chu va co so ha tang cua ban thong qua mot giao dien truc quan duy nhat. Termix cung cap quyen truy cap terminal SSH, dieu khien may tinh tu xa (RDP, VNC, Telnet), kha nang tao duong ham SSH, quan ly tep tu xa va nhieu cong cu khac. Termix la giai phap thay the mien phi va tu luu tru hoan hao cho Termius, kha dung tren tat ca cac nen tang.
+Termix lร nแปn tแบฃng miแป
n phรญ, mรฃ nguแปn mแป, tแปฑ lฦฐu trแปฏ ฤแป quแบฃn lรฝ mรกy chแปง cแปงa bแบกn. Nรณ gom vร o mแปt chแป terminal SSH, mรกy tรญnh tแปซ xa (RDP, VNC, Telnet), truyแปn tแปp, tunnel, Docker, sแป liแปu vร tแปฑ ฤแปng hoรก, trรชn web, mรกy tรญnh vร ฤiแปn thoแบกi. ฤรขy lร bแบฃn thay thแบฟ tแปฑ lฦฐu trแปฏ cho Termius vร sแบฝ miแป
n phรญ mรฃi mรฃi.
-## Tinh Nang
+## Tรญnh nฤng
-**Truy Cap Terminal SSH:**
-Terminal day du tinh nang voi ho tro chia man hinh (len den 4 bang) voi he thong tab kieu trinh duyet. Bao gom ho tro tuy chinh terminal bao gom cac chu de terminal pho bien, phong chu va cac thanh phan khac.
+**Terminal SSH:**
+Mแปt terminal ฤแบงy ฤแปง vแปi cรกc thแบป giแปng trรฌnh duyแปt vร chia ฤรดi mร n hรฌnh, tแปi ฤa 6 khung cรนng lรบc. Bแบกn tแปฑ chแปn giao diแปn, phรดng chแปฏ vร mร u sแบฏc. Phรญa trรชn mแปi phiรชn cรณ mแปt thanh cรดng cแปฅ hiแปn CPU, bแป nhแป vร แป ฤฤฉa theo thแปi gian thแปฑc, kรจm lแปi tแบฏt tแปi tแปp, Docker, tunnel vร sแป liแปu cแปงa mรกy chแปง ฤรณ.
-**Truy Cap Man Hinh Tu Xa:**
-Ho tro RDP, VNC va Telnet qua trinh duyet voi day du tuy chinh va chia man hinh.
+**Mรกy tรญnh tแปซ xa:**
+RDP, VNC vร Telnet ngay trong trรฌnh duyแปt, dรนng thแบป vร chia ฤรดi mร n hรฌnh nhฦฐ mแปi phiรชn khรกc. Cรณ trรฌnh duyแปt tแปp cho แป ฤฤฉa RDP vร tแบฃi lรชn bแบฑng cรกch kรฉo thแบฃ. Trรชn mรกy tรญnh Windows, bแบกn cรฒn cรณ thแป mแป mรกy chแปง bแบฑng แปฉng dแปฅng RDP cแปงa hแป ฤiแปu hร nh.
-**Quan Ly Duong Ham SSH:**
-Tao va quan ly duong ham SSH giua cac may chu voi tu dong ket noi lai, giam sat suc khoe va chuyen tiep cuc bo, tu xa hoac SOCKS dong. Cai dat duong ham tu may khach desktop den may chu duoc luu tru cuc bo cho moi ban cai dat desktop; cac snapshot C2S preset tuy chon co the duoc luu tren may chu, doi ten, tai hoac xoa khi ban muon di chuyen mot cau hinh duong ham cuc bo giua cac may khach.
+**Tunnel SSH:**
+Chuyแปn tiแบฟp cแปฅc bแป, tแปซ xa vร SOCKS ฤแปng, cรณ tแปฑ kแบฟt nแปi lแบกi vร kiแปm tra tรฌnh trแบกng. Tunnel tแปซ mรกy khรกch tแปi mรกy chแปง trong แปฉng dแปฅng mรกy tรญnh ฤฦฐแปฃc lฦฐu ngay trรชn mรกy ฤรณ, vร bแบกn cรณ thแป lฦฐu cแบฅu hรฌnh sแบตn lรชn mรกy chแปง ฤแป mang sang mรกy khรกc.
-**Trinh Quan Ly Tep Tu Xa:**
-Quan ly tep truc tiep tren may chu tu xa voi ho tro xem va chinh sua ma, hinh anh, am thanh va video. Tai len, tai xuong, doi ten, xoa va di chuyen tep lien mach voi ho tro sudo. Bao gom ho tro di chuyen tep tu may chu nay sang may chu khac.
+**Trรฌnh quแบฃn lรฝ tแปp:**
+Duyแปt, sแปญa, tแบฃi lรชn, tแบฃi xuแปng, ฤแปi tรชn, di chuyแปn vร xoรก tแปp qua SFTP, cรณ hแป trแปฃ sudo. Xem vร sแปญa mรฃ nguแปn, hรฌnh แบฃnh, รขm thanh vร video. Sao chรฉp tแปp thแบณng tแปซ mรกy chแปง nร y sang mรกy chแปง khรกc, hแป thแปng tแปฑ chแปn ฤฦฐแปng nhanh nhแบฅt vร kiแปm tra tรญnh toร n vแบนn khi truyแปn.
-**Quan Ly Docker va Podman:**
-Khoi dong, dung, tam dung, xoa container. Xem thong ke container. Dieu khien container bang terminal docker exec. Ho tro ca Docker va Podman lam moi truong chay container. Khong duoc tao ra de thay the Portainer hay Dockge ma don gian la de quan ly container cua ban thay vi tao moi chung.
+**Docker vร Podman:**
+Khแปi ฤแปng, dแปซng, tแบกm dแปซng vร xoรก container, xem thรดng sแป cแปงa chรบng vร mแป mแปt shell bรชn trong. Chแบกy ฤฦฐแปฃc vแปi cแบฃ Docker lแบซn Podman. Nรณ khรดng nhแบฑm thay thแบฟ Portainer hay Dockge, chแป ฤแป quแบฃn lรฝ nhแปฏng container bแบกn ฤรฃ cรณ.
-**Trinh Quan Ly May Chu SSH:**
-Luu, sap xep va quan ly cac ket noi SSH cua ban voi the va thu muc (ho tro tuy chinh thu muc va thu muc long nhau), de dang luu thong tin dang nhap co the tai su dung dong thoi co the tu dong hoa viec trien khai khoa SSH.
+**Quแบฃn lรฝ mรกy chแปง:**
+Lฦฐu vร sแบฏp xแบฟp mรกy chแปง bแบฑng thแบป vร thฦฐ mแปฅc lแปng nhau mร bแบกn cรณ thแป ฤแบทt tรชn vร tรด mร u. Dรนng lแบกi thรดng tin ฤฤng nhแบญp ฤรฃ lฦฐu cho nhiแปu mรกy chแปง, tแปฑ ฤแปng triแปn khai khoรก SSH, gom mรกy chแปง dฦฐแปi mแปt mรกy chแปง cha, sแปญa vร xuแบฅt hร ng loแบกt, vร dรนng kแบฟt nแปi nhanh cho nhแปฏng lแบงn kแบฟt nแปi mแปt lแบงn mร bแบกn khรดng muแปn lฦฐu.
-**Chi So May Chu:**
-Xem muc su dung CPU, bo nho, o dia, mang, thoi gian hoat dong, thong tin he thong, tuong lua, giam sat cong, trinh xem nhat ky, nguoi dung/quyen, chung chi va nhieu hon nua tren hau het cac may chu chay Linux. Bao gom bieu do lich su theo chuoi thoi gian va canh bao dua tren nguong voi ho tro ntfy va webhook.
+**Sแป liแปu mรกy chแปง:**
+CPU, bแป nhแป, แป ฤฤฉa, mแบกng, nhiแปt ฤแป, thแปi gian hoแบกt ฤแปng, tiแบฟn trรฌnh, cแปng, lฦฐแปฃt ฤฤng nhแบญp vร thรดng tin hแป thแปng trรชn hแบงu hแบฟt mรกy chแปง Linux, kรจm biแปu ฤแป lแปch sแปญ. Cรกc thแบป quแบฃn lรฝ cho phรฉp bแบกn xแปญ lรฝ dแปch vแปฅ, tรกc vแปฅ cron, gรณi phแบงn mแปm, ngฦฐแปi dรนng, luแบญt tฦฐแปng lแปญa, WireGuard, Tailscale, chแปฉng chแป SSL, nhแบญt kรฝ vร kiแปm tra tรฌnh trแบกng mร khรดng cแบงn rแปi Termix.
-**Xac Thuc Nguoi Dung:**
-Quan ly nguoi dung an toan voi quyen quan tri (co the chinh sua thong tin cua nguoi dung khac) va ho tro OIDC/LDAP/SSO (co kiem soat truy cap), 2FA (TOTP) va passkey (WebAuthn). Xem phien hoat dong cua nguoi dung tren tat ca cac nen tang va thu hoi quyen. Lien ket tai khoan OIDC/Noi bo cua ban voi nhau. Xem nhat ky kiem toan cac hanh dong cua tat ca nguoi dung.
+**Tแปฑ ฤแปng hoรก:**
+Chแปn mแปt ฤiแปu kiแปn kรญch hoแบกt, rแปi nรณi bแบกn muแปn ฤiแปu gรฌ xแบฃy ra. ฤiแปu kiแปn gแปm mแปt sแป liแปu vฦฐแปฃt ngฦฐแปกng, mแปt mรกy chแปง sแบญp hoแบทc sแปng lแบกi, kiแปm tra tรฌnh trแบกng thay ฤแปi, mแปt lแปch ฤแปnh sแบตn, mแปt sแปฑ kiแปn container, hoแบทc mแปt webhook gแปญi ฤแบฟn. Cรกc bฦฐแปc cรณ thแป chแบกy lแปnh vร ฤoแบกn lแปnh, ฤiแปu khiแปn container vร tunnel, ฤรกnh thแปฉc mรกy chแปง, gแปi mแปt ฤแปa chแป, chแป, rแบฝ nhรกnh theo ฤiแปu kiแปn, chแบกy mแปt tแปฑ ฤแปng hoรก khรกc, vร bรกo cho bแบกn qua ntfy, Discord hoแบทc webhook. Chแบกy thแปญ giรบp bแบกn kiแปm tra an toร n trฦฐแปc.
-**Tich Hop Tailscale:**
-Liet ke cac thiet bi trong mang Tailscale de nhanh chong them vao lam may chu, va ket noi bang Tailscale SSH lam phuong thuc xac thuc, de cac ACL mang xu ly uy quyen ma khong can luu tru thong tin xac thuc.
+**Nhรณm mรกy chแปง:**
+Gom mรกy chแปง vร o mแปt nhรณm bแบฑng cรกch tแปฑ chแปn hoแบทc theo luแบญt thแบป, ฤแป mรกy chแปง mแปi tแปฑ vร o nhรณm. Chแบกy mแปt lแปnh trรชn mแปi mรกy chแปง cรนng lรบc, ฤแบฉy vร lแบฅy tแปp trรชn tแบฅt cแบฃ, cร i gรณi phแบงn mแปm, vร thu thแบญp danh sรกch hแป ฤiแปu hร nh, nhรขn, kiแบฟn trรบc vร thแปi gian hoแบกt ฤแปng.
-**RBAC/Chia Se:**
-Tao vai tro va chia se may chu giua nguoi dung/vai tro. Ho tro tat ca cac loai xac thuc va tat ca cac giao thuc may chu.
+**Trแปฃ lรฝ AI:**
+Lร tuแปณ chแปn, vร tแบฏt cho ฤแบฟn khi bแบกn tแปฑ bแบญt. Kแบฟt nแปi OpenAI, Anthropic, Gemini, Ollama hoแบทc bแบฅt kแปณ endpoint tฦฐฦกng thรญch OpenAI nร o rแปi hแปi vแป hแป thแปng cแปงa bแบกn. Nรณ ฤแปc ฤฦฐแปฃc mรกy chแปง, nhรณm mรกy chแปง, ฤoแบกn lแปnh vร cแบฃnh bรกo, vร ฤแป xuแบฅt thay ฤแปi ฤแป bแบกn duyแปt chแปฉ khรดng tแปฑ lร m. Nรณ khรดng bao giแป chแบกm ฤฦฐแปฃc vร o thรดng tin ฤฤng nhแบญp, ngฦฐแปi dรนng hay thiแบฟt lแบญp. Quแบฃn trแป viรชn cรณ thแป tแบฏt hแบณn cho cแบฃ hแป thแปng, cรฒn bแบกn cรณ thแป แบฉn nรณ ngay khi cร i ฤแบทt ban ฤแบงu.
-**Ket Noi Noi Tiep:**
-Ket noi voi cac thiet bi noi tiep (router, switch, vi dieu khien, v.v.) truc tiep tu trinh duyet hoac ung dung may tinh. Cau hinh toc do baud, bit du lieu, bit dung va chan le. Su dung Web Serial API tren trinh duyet duoc ho tro hoac backend ban dia trong ung dung Electron.
+**ฤฤng nhแบญp vร ngฦฐแปi dรนng:**
+Tร i khoแบฃn cแปฅc bแป cรนng vแปi ฤฤng nhแบญp qua OIDC, LDAP, GitHub vร Google, kรจm xรกc thแปฑc hai bฦฐแปc (TOTP), passkey (WebAuthn) vร thiแบฟt bแป tin cแบญy. Quแบฃn trแป viรชn cรณ thแป quแบฃn lรฝ ngฦฐแปi dรนng, รกnh xแบก nhรณm OIDC sang vai trรฒ, xem mแปi phiรชn ฤang hoแบกt ฤแปng trรชn mแปi nแปn tแบฃng vร thu hแปi chรบng. Bแบกn cรณ thแป liรชn kแบฟt tร i khoแบฃn cแปฅc bแป vแปi tร i khoแบฃn OIDC, vร xem nhแบญt kรฝ kiแปm toรกn vแป nhแปฏng gรฌ mแปi ngฦฐแปi ฤรฃ lร m.
-**Canh Bao:**
-Dat cac quy tac canh bao dua tren nguong cho chi so may chu (CPU, bo nho, o dia, v.v.) va nhan thong bao qua ntfy hoac webhook khi chung kich hoat. Xem canh bao dang kich hoat va da giai quyet trong nhat ky lich su.
+**Vai trรฒ vร chia sแบป:**
+Tแบกo vai trรฒ vร chia sแบป mรกy chแปง vแปi ngฦฐแปi dรนng hoแบทc vai trรฒ theo bแปn mแปฉc: kแบฟt nแปi, xem, sแปญa vร quแบฃn lรฝ. Hoแบกt ฤแปng vแปi mแปi kiแปu xรกc thแปฑc vร mแปi giao thแปฉc, vร bแบกn cรณ thแป thay thรดng tin ฤฤng nhแบญp dรนng cho mแปt mรกy chแปง ฤฦฐแปฃc chia sแบป.
-**Trang Chu:**
-Trang chu co the tuy chinh hoan toan voi luoi widget keo va tha. Them widget cho trang thai may chu, lien ket dich vu, dong ho, ghi chu, feed RSS, thoi tiet, container Docker, bieu do chi so may chu, terminal nhung, iframe va nhieu hon nua.
+**Cแบฃnh bรกo:**
+ฤแบทt luแบญt cho cรกc sแป liแปu mรกy chแปง nhฦฐ CPU, bแป nhแป vร แป ฤฤฉa, rแปi nhแบญn thรดng bรกo qua ntfy, Discord hoแบทc webhook khi chรบng kรญch hoแบกt. Xem cแบฃnh bรกo ฤang bแบญt vร ฤรฃ hแบฟt trong nhแบญt kรฝ, vร bแป qua nhแปฏng cรกi bแบกn khรดng quan tรขm.
-**Ma Hoa Co So Du Lieu:**
-Backend duoc luu tru duoi dang tep co so du lieu SQLite duoc ma hoa. Xem [tai lieu](https://docs.termix.site/security) de biet them.
+**Trang chแปง:**
+Mแปt lฦฐแปi tiแปn รญch kรฉo thแบฃ do bแบกn tแปฑ dแปฑng. Cรณ tiแปn รญch cho tรฌnh trแบกng mรกy chแปง, ping, liรชn kแบฟt dแปch vแปฅ, dแบฅu trang, tรฌm kiแบฟm, ฤแปng hแป, lแปch, ฤแบฟm ngฦฐแปฃc, ghi chรบ, RSS, thแปi tiแบฟt, hรฌnh แบฃnh, iframe, Docker, tunnel, biแปu ฤแป sแป liแปu, API riรชng, vร cแบฃ mแปt terminal ฤang chแบกy.
-**Bieu Do Mang:**
-Tuy chinh Bang Dieu Khien de truc quan hoa homelab cua ban dua tren cac ket noi SSH voi ho tro trang thai.
+**ฤoแบกn lแปnh vร cรดng cแปฅ:**
+Lฦฐu nhแปฏng lแปnh bแบกn hay dรนng vร chแบกy chแป vแปi mแปt cรบ nhแบฅp, cรณ biแบฟn cho mรกy chแปง vร cho phแบงn bแบกn tแปฑ nhแบญp. Chแบกy mแปt lแปnh trรชn tแบฅt cแบฃ terminal ฤang mแป, vร tรฌm trong lแปch sแปญ lแปnh vแปi gแปฃi รฝ tแปฑ ฤแปng.
-**Cong Cu SSH:**
-Tao doan lenh co the tai su dung, thuc thi chi voi mot cu nhap chuot. Chay mot lenh dong thoi tren nhieu terminal dang mo.
+**Chia sแบป phiรชn:**
+Chia sแบป trแปฑc tiแบฟp mแปt phiรชn terminal, RDP, VNC hoแบทc Telnet. Gแปญi mแปt liรชn kแบฟt mร ai cลฉng vร o ฤฦฐแปฃc khรดng cแบงn tร i khoแบฃn, hoแบทc chia sแบป vแปi mแปt ngฦฐแปi dรนng Termix cแปฅ thแป, แป chแบฟ ฤแป chแป xem hoแบทc cho phรฉp thao tรกc. Chia sแบป cรณ thแป tแปฑ hแบฟt hแบกn hoแบทc bแป thu hแปi bแบฅt cแปฉ lรบc nร o, vร cรณ thแป tแบฏt toร n bแป hoแบทc theo tแปซng mรกy chแปง.
-**Tab Lien Tuc:**
-Cac phien SSH va tab van mo tren cac thiet bi/lan lam moi neu duoc bat trong ho so nguoi dung.
+**Ghi phiรชn vร nhแบญt kรฝ:**
+Ghi lแบกi phiรชn terminal, RDP vร VNC rแปi xem lแบกi sau. Tแบฃi nhแบญt kรฝ dแบกng vฤn bแบฃn cแปงa mแปt phiรชn, vร xem nhแบญt kรฝ kแบฟt nแปi ฤแป biแบฟt chรญnh xรกc chuyแปn gรฌ ฤรฃ xแบฃy ra trong lรบc kแบฟt nแปi.
-**Ngon Ngu:**
-Ho tro tich hop khoang 30 ngon ngu (duoc quan ly boi [Crowdin](https://docs.termix.site/translations)).
+**Kแบฟt nแปi serial:**
+Lร m viแปc vแปi thiแบฟt bแป serial nhฦฐ router, switch vร vi ฤiแปu khiแปn tแปซ trรฌnh duyแปt hoแบทc แปฉng dแปฅng mรกy tรญnh. ฤแบทt tแปc ฤแป baud, bit dแปฏ liแปu, bit dแปซng vร bit chแบตn lแบป. Dรนng Web Serial API trรชn cรกc trรฌnh duyแปt hแป trแปฃ, hoแบทc backend gแปc trong แปฉng dแปฅng mรกy tรญnh.
+
+
+
+
+
+
+**Tailscale:**
+Lแบฅy thiแบฟt bแป tแปซ tailnet cแปงa bแบกn ฤแป thรชm lร m mรกy chแปง chแป vแปi vร i cรบ nhแบฅp, vร kแบฟt nแปi bแบฑng Tailscale SSH ฤแป ACL cแปงa tailnet lo phแบงn quyแปn truy cแบญp, khรดng cแบงn lฦฐu thรดng tin ฤฤng nhแบญp. Headscale vร endpoint tuแปณ chแปnh cลฉng dรนng ฤฦฐแปฃc.
+
+
+
+
+**Proxmox:**
+Nhแบญp mรกy chแปง thแบณng tแปซ mแปt hแป thแปng Proxmox, vร theo dรตi sแป liแปu cแปงa node vร mรกy แบฃo, gแปm CPU, bแป nhแป vร dung lฦฐแปฃng, trong mแปt thแบป riรชng.
+
+
+
+
+
+
+**Khรดng gian lร m viแปc vร thแบป:**
+Lฦฐu mแปt bแป thแบป cรนng cรกch chia mร n hรฌnh rแปi mแป lแบกi toร n bแป chแป vแปi mแปt cรบ nhแบฅp. Termix cลฉng nhแป phiรชn gแบงn nhแบฅt, nรชn cรกc thแบป cแปงa bแบกn quay lแบกi sau khi tแบฃi lแบกi trang vร trรชn thiแบฟt bแป khรกc.
+
+
+
+
+**Cร i ฤแบทt cรณ hฦฐแปng dแบซn:**
+Mแปt phแบงn cร i ฤแบทt ngแบฏn sแบฝ hฦฐแปng bแบกn chแปn kiแปu giao diแปn, chแปง ฤแป, nhแปฏng tรญnh nฤng bแบกn muแปn vร mรกy chแปง ฤแบงu tiรชn. Chแบฟ ฤแป ฤฦกn giแบฃn แบฉn bแปt nhแปฏng gรฌ bแบกn khรดng dรนng, vร bแบกn cรณ thแป chแบกy lแบกi phแบงn cร i ฤแบทt hoแบทc ฤแปi kiแปu bแบฅt cแปฉ lรบc nร o.
+
+
+
+
+
+
+**แปจng dแปฅng mรกy tรญnh ฤแปc lแบญp vร ฤแปng bแป:**
+แปจng dแปฅng mรกy tรญnh chแบกy ฤแปc lแบญp vแปi backend vร cฦก sแป dแปฏ liแปu riรชng, khรดng cแบงn mรกy chแปง. Bแบกn cลฉng cรณ thแป nแปi nรณ vแปi mแปt mรกy chแปง Termix ฤแป ฤแปng bแป hai chiแปu mรกy chแปง, thรดng tin ฤฤng nhแบญp, ฤoแบกn lแปnh vร nhiแปu thแปฉ khรกc, vร chแปn kแบฟt nแปi xuแบฅt phรกt tแปซ mรกy cแปงa bแบกn hay ฤi qua mรกy chแปง.
+
+
+
+
+**Dรฒng lแปnh:**
+Cรดng cแปฅ `termix` cho shell vร cรกc script cแปงa bแบกn. Mแป terminal, chแบกy mแปt lแปnh trรชn mแปt mรกy chแปง hoแบทc cแบฃ mแปt nhรณm, chuyแปn tแปp qua SFTP, vร quแบฃn lรฝ mรกy chแปง, ฤoแบกn lแปnh vร thรดng tin ฤฤng nhแบญp. Cร i bแบฑng `npm install -g @termix-cli/cli` hoแบทc tแบฃi bแบฃn chแบกy ฤแปc lแบญp. Xem [tร i liแปu CLI](https://docs.termix.site/cli).
+
+
+
+
+
+
+**Bแบฃo mแบญt:**
+Mแบญt khแบฉu, khoรก vร cรกc thรดng tin bรญ mแบญt khรกc ฤฦฐแปฃc mรฃ hoรก theo tแปซng ngฦฐแปi dรนng, vร bแบฃn thรขn cรกc tแปp cฦก sแป dแปฏ liแปu cลฉng cรณ thแป mรฃ hoรก trรชn แป ฤฤฉa. Xem [tร i liแปu](https://docs.termix.site/security) ฤแป biแบฟt cรกch hoแบกt ฤแปng.
+
+
+
+
+**Ngรดn ngแปฏ:**
+Cรณ sแบตn khoแบฃng 30 ngรดn ngแปฏ, quแบฃn lรฝ qua [Crowdin](https://docs.termix.site/translations).
@@ -196,43 +252,46 @@ Ho tro tich hop khoang 30 ngon ngu (duoc quan ly boi [Crowdin](https://docs.term
-Them tinh nang
+Thรชm tรญnh nฤng khรกc
-- **Bang Dieu Khien** - Xem thong tin may chu trong nhรกy mat tren bang dieu khien cua ban
-- **Khoa API** - Tao khoa API theo pham vi nguoi dung voi ngay het han de su dung cho tu dong hoa/CI
-- **Xuat/Nhap Du Lieu** - Xuat va nhap may chu SSH, thong tin xac thuc va du lieu trinh quan ly tep
-- **Thiet Lap SSL Tu Dong** - Tao va quan ly chung chi SSL tich hop voi chuyen huong HTTPS
-- **Giao Dien Hien Dai** - Giao dien sach se, than thien voi may tinh/di dong duoc xay dung bang React, Tailwind CSS va Shadcn. Chon giua nhieu chu de UI khac nhau bao gom sang, toi, Dracula, v.v. Su dung duong dan URL de mo bat ky ket noi nao o che do toan man hinh.
-- **Lich Su Lenh** - Tu dong hoan thanh va xem cac lenh SSH da chay truoc do
-- **Ket Noi Nhanh** - Ket noi den may chu ma khong can luu du lieu ket noi
-- **Bang Lenh** - Nhan dup phim shift trai de truy cap nhanh cac ket noi SSH bang ban phim
-- **Tich Hop Proxmox** - Tu dong them may chu vao Termix tu instance Proxmox cua ban
-- **SSH Giau Tinh Nang** - Ho tro jump host, Warpgate, ket noi dua tren TOTP, SOCKS5, xac minh khoa may chu, tu dong dien mat khau, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, port knocking, ghi nhat ky terminal, chuyen tiep SSH agent, Bitwarden SSH agent, ky SSH bang HashiCorp Vault va nhieu hon nua.
-- **Termix ID** - Mot tuong duong cua sshid.io duoc tich hop san trong Termix. Dang ky mot ten dinh danh, cong bo khoa SSH cong khai cua ban tai mot URL phan giai va su dung CA tich hop san de cap chung chi SSH.
+- **Bแบฃng ฤiแปu khiแปn** - Nhรฌn nhanh toร n bแป mรกy chแปง, vแปi cรกc thแบป do bแบกn tแปฑ sแบฏp xแบฟp
+- **Sฦก ฤแป mแบกng** - Vแบฝ homelab cแปงa bแบกn tแปซ danh sรกch mรกy chแปง, kรจm trแบกng thรกi theo thแปi gian thแปฑc
+- **Theo dรตi tmux** - Xem cรกc phiรชn, cแปญa sแป vร khung tmux, cรณ xem trฦฐแปc vร tรฌm kiแบฟm
+- **Khoรก API** - Khoรก theo tแปซng ngฦฐแปi dรนng cรณ ngร y hแบฟt hแบกn, dรนng cho script vร CI
+- **Xuแบฅt vร nhแบญp** - Chuyแปn mรกy chแปง, thรดng tin ฤฤng nhแบญp vร dแปฏ liแปu trรฌnh quแบฃn lรฝ tแปp ra vร o
+- **SSL tแปฑ ฤแปng** - Chแปฉng chแป ฤฦฐแปฃc tแบกo vร gia hแบกn giรบp bแบกn, kรจm chuyแปn hฦฐแปng HTTPS, hoแบทc dรนng chแปฉng chแป cแปงa riรชng bแบกn
+- **Cฦก sแป dแปฏ liแปu** - Mแบทc ฤแปnh lร SQLite, ฤแปng thแปi hแป trแปฃ PostgreSQL vร MySQL
+- **Giao diแปn hiแปn ฤแบกi** - Giao diแปn React gแปn gร ng chแบกy tแปt trรชn mรกy tรญnh vร ฤiแปn thoแบกi, vแปi cรกc chแปง ฤแป nhฦฐ sรกng, tแปi vร Dracula. Mแปi kแบฟt nแปi ฤแปu mแป toร n mร n hรฌnh ฤฦฐแปฃc tแปซ mแปt ฤแปa chแป
+- **Bแบฃng lแปnh** - Nhแบฅn hai lแบงn phรญm Shift trรกi ฤแป nhแบฃy tแปi mแปt mรกy chแปง bแบฑng bร n phรญm
+- **Phรญm tแบฏt** - Chuyแปn giแปฏa cรกc thแบป, ฤรณng thแบป vร nhiแปu thao tรกc khรกc, ฤแปu gรกn lแบกi ฤฦฐแปฃc
+- **Wake-on-LAN** - ฤรกnh thแปฉc mแปt mรกy tแปซ Termix hoแบทc tแปซ mแปt bฦฐแปc tแปฑ ฤแปng hoรก
+- **Xรกc thแปฑc qua proxy tin cแบญy** - ฤแป reverse proxy lo phแบงn ฤฤng nhแบญp rแปi chuyแปn thรดng tin ngฦฐแปi dรนng vร o
+- **SSH nhiแปu tรญnh nฤng** - Mรกy chแปง trung gian, Warpgate, hแปi mรฃ TOTP, SOCKS5, kiแปm tra khoรก mรกy chแปง, tแปฑ ฤiแปn mแบญt khแบฉu, [OPKSSH](https://github.com/openpubkey/opkssh), tmux, port knocking, ghi nhแบญt kรฝ terminal, chuyแปn tiแบฟp agent, SSH agent cแปงa Bitwarden, kรฝ SSH bแบฑng HashiCorp Vault vร nhiแปu thแปฉ khรกc
+- **Termix ID** - Bแบฃn dแปฑng sแบตn theo kiแปu sshid.io. ฤฤng kรฝ mแปt tรชn, cรดng bแป khoรก cรดng khai cแปงa bแบกn tแบกi mแปt ฤแปa chแป phรขn giแบฃi, vร cแบฅp chแปฉng chแป SSH tแปซ CA tรญch hแปฃp
-## Ho Tro Nen Tang
+## Nแปn tแบฃng hแป trแปฃ
-Nen tang
-Phan phoi
+Nแปn tแบฃng
+Bแบฃn phรขn phแปi
Web
-Bat ky trinh duyet hien dai nao (Chrome, Safari, Firefox) ยท Ho tro PWA
+Mแปi trรฌnh duyแปt hiแปn ฤแบกi (Chrome, Safari, Firefox) ยท Hแป trแปฃ PWA
Windows x64/ia32
-Portable ยท MSI Installer ยท Chocolatey
+Bแบฃn chแบกy ngay ยท Bแป cร i MSI ยท Chocolatey
Linux x64/ia32
-Portable ยท AUR ยท AppImage ยท Deb ยท Flatpak
+Bแบฃn chแบกy ngay ยท AUR ยท AppImage ยท Deb ยท Flatpak
macOS x64/ia32, v12.0+
@@ -250,11 +309,11 @@ Ho tro tich hop khoang 30 ngon ngu (duoc quan ly boi [Crowdin](https://docs.term
-## Cai Dat
+## Cร i ฤแบทt
-Truy cap [Tai Lieu](https://docs.termix.site/install) Termix de biet them thong tin ve cach cai dat Termix tren tat ca cac nen tang.
+Xem [tร i liแปu Termix](https://docs.termix.site/install) ฤแป cรณ hฦฐแปng dแบซn cร i ฤแบทt ฤแบงy ฤแปง trรชn mแปi nแปn tแบฃng.
-Tep Docker Compose mau (ban co the bo qua `guacd` va mang neu khong co y dinh su dung cac tinh nang dieu khien may tinh tu xa):
+Tแปp Docker Compose mแบซu (bแบกn cรณ thแป bแป `guacd` vร phแบงn mแบกng nแบฟu khรดng ฤแปnh dรนng mรกy tรญnh tแปซ xa):
```yaml
services:
@@ -291,19 +350,45 @@ networks:
driver: bridge
```
+### Dรฒng lแปnh
+
+Termix cลฉng cรณ CLI, ฤแป bแบกn quแบฃn lรฝ mรกy chแปง tแปซ terminal vร dรนng Termix trong script cแปงa mรฌnh.
+
+```bash
+npm install -g @termix-cli/cli
+termix login --url https://termix.example.com
+termix ssh 1
+```
+
+Nรณ mแป ฤฦฐแปฃc terminal, chแบกy lแปnh trรชn mแปt mรกy chแปง hoแบทc cแบฃ mแปt nhรณm, chuyแปn tแปp qua SFTP, vร quแบฃn lรฝ mรกy chแปง, ฤoแบกn lแปnh vร thรดng tin ฤฤng nhแบญp. Tร i liแปu ฤแบงy ฤแปง แป [docs.termix.site/cli](https://docs.termix.site/cli).
+
+### Chแบกy trรชn cloud
+
+Bแบกn cรณ thแป chแบกy mรกy chแปง Termix trรชn VPS thay vรฌ trong mแบกng cแปงa mรฌnh. Nแบฟu Termix chแบกy ngay trong mแบกng mร nรณ quแบฃn lรฝ, mแปt sแปฑ cแป sแบฝ kรฉo nรณ sแบญp theo, ฤรบng lรบc bแบกn cแบงn nรณ ฤแป sแปญa. Chแบกy แป ngoร i thรฌ nรณ luรดn truy cแบญp ฤฦฐแปฃc, cho bแบกn mแปt IP cแป ฤแปnh vร vร o ฤฦฐแปฃc tแปซ bแบฅt cแปฉ ฤรขu mร khรดng cแบงn VPN hay mแป cแปng.
+
+[GINERNET](https://docs.termix.site/install/ginernet) lร nhร tร i trแปฃ cแปงa Termix, vร tร i liแปu cรณ hฦฐแปng dแบซn tแปซng bฦฐแปc ฤแป triแปn khai trรชn nแปn tแบฃng VPS cแปงa hแป.
+
+
+
+## Dแปฏ liแปu sแปญ dแปฅng
+
+Termix gแปญi mแปt tรญn hiแปu nhแป แบฉn danh mแปi ngร y mแปt lแบงn, ฤแป tรดi biแบฟt cรณ bao nhiรชu bแบฃn ฤang chแบกy vร tรญnh nฤng nร o thแปฑc sแปฑ ฤฦฐแปฃc dรนng. Nรณ gแปm mแปt mรฃ bแบฃn cร i ngแบซu nhiรชn, sแป ngฦฐแปi dรนng vร mรกy chแปง bแบกn cรณ, phiรชn bแบฃn แปฉng dแปฅng, vร nhแปฏng tรญnh nฤng (terminal, trรฌnh quแบฃn lรฝ tแปp, tunnel, docker, v.v.) ฤรฃ dรนng trong 24 giแป qua. Nรณ khรดng bao giแป chแปฉa tรชn ngฦฐแปi dรนng, tรชn mรกy chแปง, ฤแปa chแป IP, thรดng tin ฤฤng nhแบญp hay bแบฅt cแปฉ thแปฉ gรฌ nhแบญn dแบกng bแบกn hoแบทc mรกy chแปง cแปงa bแบกn.
+
+Mแบทc ฤแปnh lร bแบญt. Bแบกn tแบฏt nรณ trong phแบงn Cร i ฤแบทt quแบฃn trแป, mแปฅc Chung, hoแบทc ฤแบทt `ENABLE_TELEMETRY=false` trฦฐแปc cแบฃ khi khแปi ฤแปng Termix.
+
## Quyรชn gรณp
-Termix lร dแปฑ รกn miแป
n phรญ vร mรฃ nguแปn mแป, khรดng cรณ gรณi ฤฤng kรฝ hay trแบฃ phรญ. Nแบฟu bแบกn thแบฅy hแปฏu รญch, hรฃy cรขn nhแบฏc quyรชn gรณp ฤแป giรบp trang trแบฃi chi phรญ mรกy chแปง, tรชn miแปn vร thแปi gian phรกt triแปn. Cรกc khoแบฃn quyรชn gรณp cลฉng giรบp tร i trแปฃ thแปi gian nghiรชn cแปฉu vร tรฌm hiแปu nhแปฏng gรฌ cแบงn thiแบฟt ฤแป xรขy dแปฑng cรกc tรญnh nฤng nhฦฐ SAML, Kubernetes vร hแป trแปฃ Agent. Theo dรตi tiแบฟn ฤแป vร quyรชn gรณp bรชn dฦฐแปi.
+Termix miแป
n phรญ vร mรฃ nguแปn mแป, khรดng cรณ gรณi thuรช bao hay bแบฃn trแบฃ phรญ. Nแบฟu bแบกn thแบฅy hแปฏu รญch, hรฃy cรขn nhแบฏc quyรชn gรณp ฤแป giรบp trang trแบฃi mรกy chแปง, tรชn miแปn vร thแปi gian phรกt triแปn. Quyรชn gรณp cลฉng giรบp cรณ thแปi gian tรฌm hiแปu nhแปฏng thแปฉ cแบงn thiแบฟt cho cรกc tรญnh nฤng nhฦฐ SAML, Kubernetes vร hแป trแปฃ agent. Theo dรตi tiแบฟn ฤแป vร quyรชn gรณp แป bรชn dฦฐแปi.
[Quyรชn gรณp](https://donate.termix.site/)
-## Nha Tai Tro
+## Nhร tร i trแปฃ
-Ban quan tam den viec dat quang cao tra phi de ho tro phat trien? Gui email toi [mail@termix.site](mailto:mail@termix.site).
+Bแบกn muแปn ฤแบทt quแบฃng cรกo trแบฃ phรญ ฤแป แปงng hแป viแปc phรกt triแปn? Gแปญi thฦฐ tแปi [mail@termix.site](mailto:mail@termix.site).
@@ -325,10 +410,6 @@ Ban quan tam den viec dat quang cao tra phi de ho tro phat trien? Gui email toi
-
-
-
-
@@ -340,18 +421,21 @@ Ban quan tam den viec dat quang cao tra phi de ho tro phat trien? Gui email toi
-
+
+
+
+
-## Ho Tro
+## Hแป trแปฃ
-Neu ban can tro giup hoac muon yeu cau tinh nang voi Termix, hay truy cap trang [Van De](https://github.com/Termix-SSH/Support/issues), dang nhap va nhan `New Issue`. Vui long mo ta van de cang chi tiet cang tot, uu tien viet bang tieng Anh. Ban cung co the tham gia may chu [Discord](https://discord.gg/jVQGdvHDrf) va truy cap kenh ho tro, tuy nhien thoi gian phan hoi co the lau hon.
+Cแบงn giรบp ฤแปก hoแบทc muแปn ฤแป xuแบฅt tรญnh nฤng? Hรฃy mแป mแปt [issue mแปi](https://github.com/Termix-SSH/Support/issues) vร mรด tแบฃ cร ng chi tiแบฟt cร ng tแปt, bแบฑng tiแบฟng Anh nแบฟu ฤฦฐแปฃc. Bแบกn cลฉng cรณ thแป hแปi trong kรชnh hแป trแปฃ trรชn [Discord](https://discord.gg/jVQGdvHDrf), tuy nhiรชn แป ฤรณ cรณ thแป lรขu ฤฦฐแปฃc trแบฃ lแปi hฦกn.
-## Anh Chup Man Hinh
+## แบขnh chแปฅp mร n hรฌnh
@@ -359,7 +443,7 @@ Neu ban can tro giup hoac muon yeu cau tinh nang voi Termix, hay truy cap trang
[](https://www.youtube.com/@TermixSSH/videos)
-Xem tong quan cap nhat tren YouTube
+Xem giแปi thiแปu cรกc bแบฃn cแบญp nhแบญt trรชn YouTube
@@ -399,18 +483,18 @@ Neu ban can tro giup hoac muon yeu cau tinh nang voi Termix, hay truy cap trang
-Mot so video va hinh anh co the da loi thoi hoac khong the hien chinh xac hoan toan cac tinh nang.
+Mแปt sแป video vร hรฌnh แบฃnh cรณ thแป ฤรฃ cลฉ hoแบทc chฦฐa thแป hiแปn ฤแบงy ฤแปง tรญnh nฤng.
-## Tinh Nang Du Kien
+## Tรญnh nฤng dแปฑ kiแบฟn
-Xem [Du An](https://github.com/orgs/Termix-SSH/projects/5) de biet tat ca cac tinh nang du kien. Neu ban muon dong gop, xem [Dong Gop](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md).
+Toร n bแป tรญnh nฤng dแปฑ kiแบฟn nแบฑm แป [Projects](https://github.com/orgs/Termix-SSH/projects/5). Nแบฟu bแบกn muแปn ฤรณng gรณp, xem [Contributing](https://github.com/Termix-SSH/Termix/blob/main/CONTRIBUTING.md).
-## Giay Phep
+## Giแบฅy phรฉp
-Duoc phan phoi theo Giay Phep Apache Phien Ban 2.0. Xem `LICENSE` de biet them thong tin.
+Phรกt hร nh theo Giแบฅy phรฉp Apache phiรชn bแบฃn 2.0. Xem `LICENSE` ฤแป biแบฟt thรชm chi tiแบฟt.
diff --git a/drizzle.config.mysql.ts b/drizzle.config.mysql.ts
new file mode 100644
index 0000000..5665bf7
--- /dev/null
+++ b/drizzle.config.mysql.ts
@@ -0,0 +1,7 @@
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ dialect: "mysql",
+ schema: "./src/backend/database/db/schema.mysql.ts",
+ out: "./drizzle/mysql",
+});
diff --git a/drizzle.config.pg.ts b/drizzle.config.pg.ts
new file mode 100644
index 0000000..9129234
--- /dev/null
+++ b/drizzle.config.pg.ts
@@ -0,0 +1,7 @@
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ dialect: "postgresql",
+ schema: "./src/backend/database/db/schema.pg.ts",
+ out: "./drizzle/postgres",
+});
diff --git a/drizzle.config.sqlite.ts b/drizzle.config.sqlite.ts
new file mode 100644
index 0000000..7941897
--- /dev/null
+++ b/drizzle.config.sqlite.ts
@@ -0,0 +1,7 @@
+import { defineConfig } from "drizzle-kit";
+
+export default defineConfig({
+ dialect: "sqlite",
+ schema: "./src/backend/database/db/schema.ts",
+ out: "./drizzle/sqlite",
+});
diff --git a/drizzle/mysql/0000_clean_pretty_boy.sql b/drizzle/mysql/0000_clean_pretty_boy.sql
new file mode 100644
index 0000000..d138297
--- /dev/null
+++ b/drizzle/mysql/0000_clean_pretty_boy.sql
@@ -0,0 +1,890 @@
+CREATE TABLE `alert_firings` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `rule_id` int NOT NULL,
+ `host_id` int NOT NULL,
+ `host_name` text NOT NULL,
+ `fired_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `resolved_at` text,
+ `value` double,
+ `message` text NOT NULL,
+ `severity` text NOT NULL DEFAULT ('warning'),
+ `acknowledged` boolean NOT NULL DEFAULT false,
+ CONSTRAINT `alert_firings_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `alert_rule_channels` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `rule_id` int NOT NULL,
+ `channel_id` int NOT NULL,
+ CONSTRAINT `alert_rule_channels_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `alert_rules` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `host_id` int,
+ `name` varchar(255) NOT NULL,
+ `enabled` boolean NOT NULL DEFAULT true,
+ `trigger_type` text NOT NULL,
+ `threshold_value` double,
+ `threshold_duration_seconds` int,
+ `cooldown_minutes` int NOT NULL DEFAULT 15,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `alert_rules_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `api_keys` (
+ `id` varchar(255) NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `token_hash` text NOT NULL,
+ `token_prefix` text NOT NULL,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `expires_at` text,
+ `last_used_at` text,
+ `is_active` boolean NOT NULL DEFAULT true,
+ CONSTRAINT `api_keys_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `audit_logs` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255),
+ `username` text NOT NULL,
+ `action` text NOT NULL,
+ `resource_type` text NOT NULL,
+ `resource_id` text,
+ `resource_name` text,
+ `details` text,
+ `ip_address` text,
+ `user_agent` text,
+ `success` boolean NOT NULL,
+ `error_message` text,
+ `timestamp` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `audit_logs_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `c2s_tunnel_presets` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `config` text NOT NULL,
+ `platform` text,
+ `computer_name` text,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `c2s_tunnel_presets_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `command_history` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `host_id` int NOT NULL,
+ `command` text NOT NULL,
+ `executed_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `command_history_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `dashboard_service_links` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `label` text NOT NULL,
+ `url` text NOT NULL,
+ `order` int NOT NULL DEFAULT 0,
+ `sync_id` varchar(255),
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `dashboard_service_links_id` PRIMARY KEY(`id`),
+ CONSTRAINT `dashboard_service_links_sync_id_unique` UNIQUE(`sync_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `dismissed_alerts` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `alert_id` text NOT NULL,
+ `dismissed_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `dismissed_alerts_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `file_manager_pinned` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `host_id` int NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `path` text NOT NULL,
+ `pinned_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `file_manager_pinned_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `file_manager_recent` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `host_id` int NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `path` text NOT NULL,
+ `last_opened` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `file_manager_recent_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `file_manager_shortcuts` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `host_id` int NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `path` text NOT NULL,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `file_manager_shortcuts_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `homepage_items` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `type_id` text NOT NULL,
+ `title` text,
+ `config` text NOT NULL DEFAULT ('{}'),
+ `folder_id` int,
+ `sync_id` varchar(255),
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `homepage_items_id` PRIMARY KEY(`id`),
+ CONSTRAINT `homepage_items_sync_id_unique` UNIQUE(`sync_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `homepage_layouts` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `layout` text NOT NULL DEFAULT ('{}'),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `homepage_layouts_id` PRIMARY KEY(`id`),
+ CONSTRAINT `homepage_layouts_user_id_unique` UNIQUE(`user_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `host_access` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `host_id` int NOT NULL,
+ `user_id` varchar(255),
+ `role_id` int,
+ `granted_by` varchar(255) NOT NULL,
+ `permission_level` text NOT NULL DEFAULT ('connect'),
+ `expires_at` text,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `last_accessed_at` text,
+ `access_count` int NOT NULL DEFAULT 0,
+ CONSTRAINT `host_access_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `host_health_checks` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `host_id` int NOT NULL,
+ `checks` text NOT NULL,
+ `interval_seconds` int NOT NULL DEFAULT 300,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `host_health_checks_id` PRIMARY KEY(`id`),
+ CONSTRAINT `idx_host_health_checks_user_host` UNIQUE(`user_id`,`host_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `host_health_history` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `host_id` int NOT NULL,
+ `check_id` text NOT NULL,
+ `ts` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `ok` boolean NOT NULL,
+ `latency_ms` int,
+ `detail` text,
+ CONSTRAINT `host_health_history_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `host_metrics_history` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `host_id` int NOT NULL,
+ `ts` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `cpu_percent` double,
+ `mem_percent` double,
+ `disk_percent` double,
+ `net_rx_bytes` int,
+ `net_tx_bytes` int,
+ CONSTRAINT `host_metrics_history_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `host_metrics_preferences` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `host_id` int NOT NULL,
+ `layout` text NOT NULL,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `host_metrics_preferences_id` PRIMARY KEY(`id`),
+ CONSTRAINT `idx_host_metrics_prefs_user_host` UNIQUE(`user_id`,`host_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `ssh_data` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `connection_type` text NOT NULL DEFAULT ('ssh'),
+ `name` varchar(255),
+ `ip` text NOT NULL,
+ `port` int NOT NULL,
+ `username` text NOT NULL,
+ `folder` text,
+ `tags` text,
+ `pin` boolean NOT NULL DEFAULT false,
+ `auth_type` text NOT NULL,
+ `use_warpgate` boolean NOT NULL DEFAULT false,
+ `share_ssh_auth` boolean NOT NULL DEFAULT false,
+ `force_keyboard_interactive` text,
+ `password` text,
+ `key` text,
+ `key_password` text,
+ `key_type` text,
+ `sudo_password` text,
+ `autostart_password` text,
+ `autostart_key` text,
+ `autostart_key_password` text,
+ `credential_id` int,
+ `override_credential_username` boolean,
+ `vault_profile_id` int,
+ `enable_terminal` boolean NOT NULL DEFAULT true,
+ `enable_session_logging` boolean NOT NULL DEFAULT true,
+ `allow_session_sharing` boolean NOT NULL DEFAULT true,
+ `enable_command_history` boolean NOT NULL DEFAULT true,
+ `enable_tunnel` boolean NOT NULL DEFAULT true,
+ `tunnel_connections` text,
+ `jump_hosts` text,
+ `enable_file_manager` boolean NOT NULL DEFAULT true,
+ `scp_legacy` boolean NOT NULL DEFAULT false,
+ `enable_docker` boolean NOT NULL DEFAULT false,
+ `enable_tmux_monitor` boolean NOT NULL DEFAULT false,
+ `show_terminal_in_sidebar` boolean NOT NULL DEFAULT true,
+ `show_file_manager_in_sidebar` boolean NOT NULL DEFAULT false,
+ `show_tunnel_in_sidebar` boolean NOT NULL DEFAULT false,
+ `show_docker_in_sidebar` boolean NOT NULL DEFAULT false,
+ `show_server_stats_in_sidebar` boolean NOT NULL DEFAULT false,
+ `default_path` text,
+ `stats_config` text,
+ `docker_config` text,
+ `enable_proxmox` boolean NOT NULL DEFAULT false,
+ `proxmox_config` text,
+ `terminal_config` text,
+ `quick_actions` text,
+ `notes` text,
+ `enable_ssh` boolean NOT NULL DEFAULT true,
+ `enable_rdp` boolean NOT NULL DEFAULT false,
+ `enable_vnc` boolean NOT NULL DEFAULT false,
+ `enable_telnet` boolean NOT NULL DEFAULT false,
+ `ssh_port` int DEFAULT 22,
+ `rdp_port` int DEFAULT 3389,
+ `vnc_port` int DEFAULT 5900,
+ `telnet_port` int DEFAULT 23,
+ `rdp_credential_id` int,
+ `rdp_user` text,
+ `rdp_password` text,
+ `rdp_domain` text,
+ `rdp_security` text,
+ `rdp_ignore_cert` boolean DEFAULT false,
+ `vnc_credential_id` int,
+ `vnc_password` text,
+ `vnc_user` text,
+ `telnet_user` text,
+ `telnet_password` text,
+ `telnet_credential_id` int,
+ `rdp_auth_type` text,
+ `vnc_auth_type` text,
+ `telnet_auth_type` text,
+ `domain` text,
+ `security` text,
+ `ignore_cert` boolean DEFAULT false,
+ `guacamole_config` text,
+ `use_socks5` boolean,
+ `socks5_host` text,
+ `socks5_port` int,
+ `socks5_username` text,
+ `socks5_password` text,
+ `socks5_proxy_chain` text,
+ `connection_origin` text,
+ `mac_address` text,
+ `wol_broadcast_address` text,
+ `port_knock_sequence` text,
+ `host_key_fingerprint` text,
+ `host_key_type` text,
+ `host_key_algorithm` text DEFAULT ('sha256'),
+ `host_key_first_seen` text,
+ `host_key_last_verified` text,
+ `host_key_changed_count` int DEFAULT 0,
+ `sync_id` varchar(255),
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `ssh_data_id` PRIMARY KEY(`id`),
+ CONSTRAINT `ssh_data_sync_id_unique` UNIQUE(`sync_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `network_topology` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `topology` text,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `network_topology_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `notification_channels` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `type` text NOT NULL,
+ `config` text NOT NULL,
+ `enabled` boolean NOT NULL DEFAULT true,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `notification_channels_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `opkssh_tokens` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `host_id` int NOT NULL,
+ `ssh_cert` text NOT NULL,
+ `private_key` text NOT NULL,
+ `email` text,
+ `sub` text,
+ `issuer` text,
+ `audience` text,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `expires_at` text NOT NULL,
+ `last_used` text,
+ CONSTRAINT `opkssh_tokens_id` PRIMARY KEY(`id`),
+ CONSTRAINT `idx_opkssh_tokens_user_host` UNIQUE(`user_id`,`host_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `recent_activity` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `type` text NOT NULL,
+ `host_id` int NOT NULL,
+ `host_name` text,
+ `timestamp` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `recent_activity_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `roles` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `display_name` text NOT NULL,
+ `description` text,
+ `is_system` boolean NOT NULL DEFAULT false,
+ `permissions` text,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `roles_id` PRIMARY KEY(`id`),
+ CONSTRAINT `roles_name_unique` UNIQUE(`name`)
+);
+--> statement-breakpoint
+CREATE TABLE `session_recordings` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `host_id` int NOT NULL,
+ `user_id` varchar(255),
+ `username` text,
+ `access_id` int,
+ `started_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `ended_at` text,
+ `duration` int,
+ `commands` text,
+ `dangerous_actions` text,
+ `recording_path` text,
+ `protocol` varchar(255) NOT NULL DEFAULT 'ssh',
+ `format` text NOT NULL DEFAULT ('text'),
+ `terminated_by_owner` boolean DEFAULT false,
+ `termination_reason` text,
+ CONSTRAINT `session_recordings_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `session_share_participants` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `share_id` varchar(255) NOT NULL,
+ `user_id` varchar(255),
+ `guest_label` text,
+ `joined_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `left_at` text,
+ CONSTRAINT `session_share_participants_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `session_shares` (
+ `id` varchar(255) NOT NULL,
+ `host_id` int NOT NULL,
+ `owner_user_id` varchar(255) NOT NULL,
+ `protocol` varchar(255) NOT NULL,
+ `session_id` text NOT NULL,
+ `tab_instance_id` text,
+ `share_type` text NOT NULL,
+ `target_user_id` varchar(255),
+ `link_token` varchar(255),
+ `permission_level` text NOT NULL DEFAULT ('read-only'),
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `expires_at` text NOT NULL,
+ `revoked_at` text,
+ `last_joined_at` text,
+ `join_count` int NOT NULL DEFAULT 0,
+ CONSTRAINT `session_shares_id` PRIMARY KEY(`id`),
+ CONSTRAINT `session_shares_link_token_unique` UNIQUE(`link_token`)
+);
+--> statement-breakpoint
+CREATE TABLE `sessions` (
+ `id` varchar(255) NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `jwt_token` text NOT NULL,
+ `device_type` text NOT NULL,
+ `device_info` text NOT NULL,
+ `oidc_sub` text,
+ `oidc_sid` text,
+ `sso_provider_id` int,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `expires_at` text NOT NULL,
+ `last_active_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `sessions_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `settings` (
+ `key` varchar(255) NOT NULL,
+ `value` text NOT NULL,
+ CONSTRAINT `settings_key` PRIMARY KEY(`key`)
+);
+--> statement-breakpoint
+CREATE TABLE `shared_host_auth_overrides` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `host_id` int NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `protocol` varchar(255) NOT NULL DEFAULT 'ssh',
+ `credential_id` int NOT NULL,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `shared_host_auth_overrides_id` PRIMARY KEY(`id`),
+ CONSTRAINT `shared_host_auth_overrides_host_user_protocol_unique` UNIQUE(`host_id`,`user_id`,`protocol`)
+);
+--> statement-breakpoint
+CREATE TABLE `shared_host_secrets` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `host_access_id` int NOT NULL,
+ `target_user_id` varchar(255) NOT NULL,
+ `protocol` varchar(255) NOT NULL DEFAULT 'ssh',
+ `source_type` text NOT NULL DEFAULT ('credential'),
+ `original_credential_id` int,
+ `encrypted_username` text,
+ `encrypted_auth_type` text,
+ `encrypted_password` text,
+ `encrypted_key` text,
+ `encrypted_key_password` text,
+ `encrypted_key_type` text,
+ `encrypted_domain` text,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `shared_host_secrets_id` PRIMARY KEY(`id`),
+ CONSTRAINT `idx_shared_host_secrets_scope` UNIQUE(`host_access_id`,`target_user_id`,`protocol`)
+);
+--> statement-breakpoint
+CREATE TABLE `snippet_access` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `snippet_id` int NOT NULL,
+ `user_id` varchar(255),
+ `role_id` int,
+ `granted_by` varchar(255) NOT NULL,
+ `permission_level` text NOT NULL DEFAULT ('view'),
+ `expires_at` text,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `snippet_access_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `snippet_folders` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `color` text,
+ `icon` text,
+ `sync_id` varchar(255),
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `snippet_folders_id` PRIMARY KEY(`id`),
+ CONSTRAINT `snippet_folders_sync_id_unique` UNIQUE(`sync_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `snippets` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `content` text NOT NULL,
+ `description` text,
+ `folder` text,
+ `order` int NOT NULL DEFAULT 0,
+ `sync_id` varchar(255),
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `host_filter` text,
+ CONSTRAINT `snippets_id` PRIMARY KEY(`id`),
+ CONSTRAINT `snippets_sync_id_unique` UNIQUE(`sync_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `ssh_credential_usage` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `credential_id` int NOT NULL,
+ `host_id` int NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `used_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `ssh_credential_usage_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `ssh_credentials` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `description` text,
+ `folder` text,
+ `tags` text,
+ `auth_type` text NOT NULL,
+ `username` text,
+ `password` text,
+ `key` text,
+ `private_key` text,
+ `public_key` text,
+ `key_password` text,
+ `key_type` text,
+ `detected_key_type` text,
+ `cert_public_key` text,
+ `usage_count` int NOT NULL DEFAULT 0,
+ `last_used` text,
+ `sync_id` varchar(255),
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `ssh_credentials_id` PRIMARY KEY(`id`),
+ CONSTRAINT `ssh_credentials_sync_id_unique` UNIQUE(`sync_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `ssh_folders` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `color` text,
+ `icon` text,
+ `credential_id` int,
+ `sync_id` varchar(255),
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `ssh_folders_id` PRIMARY KEY(`id`),
+ CONSTRAINT `ssh_folders_sync_id_unique` UNIQUE(`sync_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `sso_providers` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `type` text NOT NULL,
+ `enabled` boolean NOT NULL DEFAULT true,
+ `display_order` int NOT NULL DEFAULT 0,
+ `config` text NOT NULL,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `sso_providers_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `sync_tombstones` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `entity_type` text NOT NULL,
+ `sync_id` varchar(255) NOT NULL,
+ `deleted_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `sync_tombstones_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `termix_identities` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `handle` varchar(255) NOT NULL,
+ `description` text,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `termix_identities_id` PRIMARY KEY(`id`),
+ CONSTRAINT `termix_identities_user_id_unique` UNIQUE(`user_id`),
+ CONSTRAINT `termix_identities_handle_unique` UNIQUE(`handle`)
+);
+--> statement-breakpoint
+CREATE TABLE `termix_identity_ca` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `identity_id` int NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `public_key` text NOT NULL,
+ `private_key` text NOT NULL,
+ `validity_days` int NOT NULL DEFAULT 90,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `termix_identity_ca_id` PRIMARY KEY(`id`),
+ CONSTRAINT `termix_identity_ca_identity_id_unique` UNIQUE(`identity_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `termix_identity_keys` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `identity_id` int NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `public_key` text NOT NULL,
+ `key_type` text NOT NULL,
+ `algorithm` text NOT NULL,
+ `label` text,
+ `comment` text,
+ `source` text NOT NULL DEFAULT ('manual'),
+ `credential_id` int,
+ `enabled` boolean NOT NULL DEFAULT true,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `termix_identity_keys_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `tmux_session_tags` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `host_id` int NOT NULL,
+ `session_name` text NOT NULL,
+ `tag` text NOT NULL,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `tmux_session_tags_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `transfer_recent` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `source_host_id` int NOT NULL,
+ `dest_host_id` int NOT NULL,
+ `dest_path` text NOT NULL,
+ `dest_path_label` text NOT NULL,
+ `last_used` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `transfer_recent_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `trusted_devices` (
+ `id` varchar(255) NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `device_fingerprint` text NOT NULL,
+ `device_type` text NOT NULL,
+ `device_info` text NOT NULL,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `expires_at` text NOT NULL,
+ `last_used_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `trusted_devices_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `user_open_tabs` (
+ `id` varchar(255) NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `tab_type` text NOT NULL,
+ `host_id` int,
+ `label` text NOT NULL,
+ `tab_order` int NOT NULL DEFAULT 0,
+ `backend_session_id` text,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `user_open_tabs_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `user_preferences` (
+ `user_id` varchar(255) NOT NULL,
+ `reopen_tabs_on_login` boolean NOT NULL DEFAULT false,
+ `theme` text,
+ `font_size` text,
+ `accent_color` text,
+ `language` text,
+ `storage_mode` text,
+ `command_autocomplete` boolean,
+ `command_palette_enabled` boolean,
+ `show_host_tags` boolean,
+ `host_tray_on_click` boolean,
+ `pin_app_rail` boolean,
+ `expand_app_rail_on_hover` boolean,
+ `folders_collapsed` boolean,
+ `confirm_snippet_execution` boolean,
+ `disable_update_check` boolean,
+ `confirm_tab_close` boolean,
+ `hidden_rail_tabs` text,
+ `compact_host_view` boolean,
+ `status_color_scheme` text,
+ `custom_themes` text,
+ `custom_keybindings` text,
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `user_preferences_user_id` PRIMARY KEY(`user_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `user_roles` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `role_id` int NOT NULL,
+ `granted_by` varchar(255),
+ `granted_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `user_roles_id` PRIMARY KEY(`id`),
+ CONSTRAINT `idx_user_roles_user_role` UNIQUE(`user_id`,`role_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `users` (
+ `id` varchar(255) NOT NULL,
+ `username` text NOT NULL,
+ `password_hash` text NOT NULL,
+ `is_admin` boolean NOT NULL DEFAULT false,
+ `is_oidc` boolean NOT NULL DEFAULT false,
+ `oidc_identifier` text,
+ `sso_provider_id` int,
+ `client_id` text,
+ `client_secret` text,
+ `issuer_url` text,
+ `authorization_url` text,
+ `token_url` text,
+ `identifier_path` text,
+ `name_path` text,
+ `scopes` text DEFAULT ('openid email profile'),
+ `totp_secret` text,
+ `totp_enabled` boolean NOT NULL DEFAULT false,
+ `totp_backup_codes` text,
+ `registered_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `donation_modal_dismissed` boolean NOT NULL DEFAULT false,
+ CONSTRAINT `users_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `vault_profiles` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `description` text,
+ `folder` text,
+ `tags` text,
+ `vault_addr` text NOT NULL,
+ `vault_namespace` text,
+ `oidc_mount` text,
+ `oidc_role` text,
+ `ssh_mount` text,
+ `ssh_role` text NOT NULL,
+ `valid_principals` text,
+ `key_type` text,
+ `shared` boolean NOT NULL DEFAULT false,
+ `sync_id` varchar(255),
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `vault_profiles_id` PRIMARY KEY(`id`),
+ CONSTRAINT `vault_profiles_sync_id_unique` UNIQUE(`sync_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `vault_tokens` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `profile_id` int NOT NULL,
+ `ssh_cert` text NOT NULL,
+ `private_key` text NOT NULL,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `expires_at` text NOT NULL,
+ `last_used` text,
+ CONSTRAINT `vault_tokens_id` PRIMARY KEY(`id`),
+ CONSTRAINT `idx_vault_tokens_user_profile` UNIQUE(`user_id`,`profile_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `webauthn_credentials` (
+ `id` varchar(255) NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `credential_id` text NOT NULL,
+ `public_key` text NOT NULL,
+ `counter` int NOT NULL DEFAULT 0,
+ `device_type` text,
+ `backed_up` boolean NOT NULL DEFAULT false,
+ `transports` text,
+ `user_verification` text NOT NULL DEFAULT ('preferred'),
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `last_used_at` text,
+ CONSTRAINT `webauthn_credentials_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+ALTER TABLE `alert_firings` ADD CONSTRAINT `alert_firings_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `alert_firings` ADD CONSTRAINT `alert_firings_rule_id_alert_rules_id_fk` FOREIGN KEY (`rule_id`) REFERENCES `alert_rules`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `alert_rule_channels` ADD CONSTRAINT `alert_rule_channels_rule_id_alert_rules_id_fk` FOREIGN KEY (`rule_id`) REFERENCES `alert_rules`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `alert_rule_channels` ADD CONSTRAINT `alert_rule_channels_channel_id_notification_channels_id_fk` FOREIGN KEY (`channel_id`) REFERENCES `notification_channels`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `alert_rules` ADD CONSTRAINT `alert_rules_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `alert_rules` ADD CONSTRAINT `alert_rules_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `api_keys` ADD CONSTRAINT `api_keys_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `audit_logs` ADD CONSTRAINT `audit_logs_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `c2s_tunnel_presets` ADD CONSTRAINT `c2s_tunnel_presets_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `command_history` ADD CONSTRAINT `command_history_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `command_history` ADD CONSTRAINT `command_history_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `dashboard_service_links` ADD CONSTRAINT `dashboard_service_links_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `dismissed_alerts` ADD CONSTRAINT `dismissed_alerts_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `file_manager_pinned` ADD CONSTRAINT `file_manager_pinned_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `file_manager_pinned` ADD CONSTRAINT `file_manager_pinned_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `file_manager_recent` ADD CONSTRAINT `file_manager_recent_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `file_manager_recent` ADD CONSTRAINT `file_manager_recent_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `file_manager_shortcuts` ADD CONSTRAINT `file_manager_shortcuts_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `file_manager_shortcuts` ADD CONSTRAINT `file_manager_shortcuts_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `homepage_items` ADD CONSTRAINT `homepage_items_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `homepage_layouts` ADD CONSTRAINT `homepage_layouts_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `host_access` ADD CONSTRAINT `host_access_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `host_access` ADD CONSTRAINT `host_access_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `host_access` ADD CONSTRAINT `host_access_role_id_roles_id_fk` FOREIGN KEY (`role_id`) REFERENCES `roles`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `host_access` ADD CONSTRAINT `host_access_granted_by_users_id_fk` FOREIGN KEY (`granted_by`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `host_health_checks` ADD CONSTRAINT `host_health_checks_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `host_health_checks` ADD CONSTRAINT `host_health_checks_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `host_health_history` ADD CONSTRAINT `host_health_history_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `host_health_history` ADD CONSTRAINT `host_health_history_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `host_metrics_history` ADD CONSTRAINT `host_metrics_history_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `host_metrics_preferences` ADD CONSTRAINT `host_metrics_preferences_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `host_metrics_preferences` ADD CONSTRAINT `host_metrics_preferences_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `ssh_data` ADD CONSTRAINT `ssh_data_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `ssh_data` ADD CONSTRAINT `ssh_data_credential_id_ssh_credentials_id_fk` FOREIGN KEY (`credential_id`) REFERENCES `ssh_credentials`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `ssh_data` ADD CONSTRAINT `ssh_data_vault_profile_id_vault_profiles_id_fk` FOREIGN KEY (`vault_profile_id`) REFERENCES `vault_profiles`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `ssh_data` ADD CONSTRAINT `ssh_data_rdp_credential_id_ssh_credentials_id_fk` FOREIGN KEY (`rdp_credential_id`) REFERENCES `ssh_credentials`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `ssh_data` ADD CONSTRAINT `ssh_data_vnc_credential_id_ssh_credentials_id_fk` FOREIGN KEY (`vnc_credential_id`) REFERENCES `ssh_credentials`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `ssh_data` ADD CONSTRAINT `ssh_data_telnet_credential_id_ssh_credentials_id_fk` FOREIGN KEY (`telnet_credential_id`) REFERENCES `ssh_credentials`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `network_topology` ADD CONSTRAINT `network_topology_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `notification_channels` ADD CONSTRAINT `notification_channels_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `opkssh_tokens` ADD CONSTRAINT `opkssh_tokens_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `opkssh_tokens` ADD CONSTRAINT `opkssh_tokens_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `recent_activity` ADD CONSTRAINT `recent_activity_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `recent_activity` ADD CONSTRAINT `recent_activity_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `session_recordings` ADD CONSTRAINT `session_recordings_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `session_recordings` ADD CONSTRAINT `session_recordings_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `session_recordings` ADD CONSTRAINT `session_recordings_access_id_host_access_id_fk` FOREIGN KEY (`access_id`) REFERENCES `host_access`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `session_share_participants` ADD CONSTRAINT `session_share_participants_share_id_session_shares_id_fk` FOREIGN KEY (`share_id`) REFERENCES `session_shares`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `session_share_participants` ADD CONSTRAINT `session_share_participants_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `session_shares` ADD CONSTRAINT `session_shares_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `session_shares` ADD CONSTRAINT `session_shares_owner_user_id_users_id_fk` FOREIGN KEY (`owner_user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `session_shares` ADD CONSTRAINT `session_shares_target_user_id_users_id_fk` FOREIGN KEY (`target_user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `sessions` ADD CONSTRAINT `sessions_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `shared_host_auth_overrides` ADD CONSTRAINT `shared_host_auth_overrides_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `shared_host_auth_overrides` ADD CONSTRAINT `shared_host_auth_overrides_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `shared_host_auth_overrides` ADD CONSTRAINT `shared_host_auth_overrides_credential_id_ssh_credentials_id_fk` FOREIGN KEY (`credential_id`) REFERENCES `ssh_credentials`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `shared_host_secrets` ADD CONSTRAINT `shared_host_secrets_host_access_id_host_access_id_fk` FOREIGN KEY (`host_access_id`) REFERENCES `host_access`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `shared_host_secrets` ADD CONSTRAINT `shared_host_secrets_target_user_id_users_id_fk` FOREIGN KEY (`target_user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `shared_host_secrets` ADD CONSTRAINT `shared_host_secrets_original_credential_id_ssh_credentials_id_fk` FOREIGN KEY (`original_credential_id`) REFERENCES `ssh_credentials`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `snippet_access` ADD CONSTRAINT `snippet_access_snippet_id_snippets_id_fk` FOREIGN KEY (`snippet_id`) REFERENCES `snippets`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `snippet_access` ADD CONSTRAINT `snippet_access_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `snippet_access` ADD CONSTRAINT `snippet_access_role_id_roles_id_fk` FOREIGN KEY (`role_id`) REFERENCES `roles`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `snippet_access` ADD CONSTRAINT `snippet_access_granted_by_users_id_fk` FOREIGN KEY (`granted_by`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `snippet_folders` ADD CONSTRAINT `snippet_folders_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `snippets` ADD CONSTRAINT `snippets_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `ssh_credential_usage` ADD CONSTRAINT `ssh_credential_usage_credential_id_ssh_credentials_id_fk` FOREIGN KEY (`credential_id`) REFERENCES `ssh_credentials`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `ssh_credential_usage` ADD CONSTRAINT `ssh_credential_usage_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `ssh_credential_usage` ADD CONSTRAINT `ssh_credential_usage_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `ssh_credentials` ADD CONSTRAINT `ssh_credentials_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `ssh_folders` ADD CONSTRAINT `ssh_folders_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `ssh_folders` ADD CONSTRAINT `ssh_folders_credential_id_ssh_credentials_id_fk` FOREIGN KEY (`credential_id`) REFERENCES `ssh_credentials`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `sync_tombstones` ADD CONSTRAINT `sync_tombstones_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `termix_identities` ADD CONSTRAINT `termix_identities_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `termix_identity_ca` ADD CONSTRAINT `termix_identity_ca_identity_id_termix_identities_id_fk` FOREIGN KEY (`identity_id`) REFERENCES `termix_identities`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `termix_identity_ca` ADD CONSTRAINT `termix_identity_ca_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `termix_identity_keys` ADD CONSTRAINT `termix_identity_keys_identity_id_termix_identities_id_fk` FOREIGN KEY (`identity_id`) REFERENCES `termix_identities`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `termix_identity_keys` ADD CONSTRAINT `termix_identity_keys_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `termix_identity_keys` ADD CONSTRAINT `termix_identity_keys_credential_id_ssh_credentials_id_fk` FOREIGN KEY (`credential_id`) REFERENCES `ssh_credentials`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `tmux_session_tags` ADD CONSTRAINT `tmux_session_tags_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `tmux_session_tags` ADD CONSTRAINT `tmux_session_tags_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `transfer_recent` ADD CONSTRAINT `transfer_recent_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `transfer_recent` ADD CONSTRAINT `transfer_recent_source_host_id_ssh_data_id_fk` FOREIGN KEY (`source_host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `transfer_recent` ADD CONSTRAINT `transfer_recent_dest_host_id_ssh_data_id_fk` FOREIGN KEY (`dest_host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `trusted_devices` ADD CONSTRAINT `trusted_devices_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `user_open_tabs` ADD CONSTRAINT `user_open_tabs_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `user_open_tabs` ADD CONSTRAINT `user_open_tabs_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `user_preferences` ADD CONSTRAINT `user_preferences_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `user_roles` ADD CONSTRAINT `user_roles_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `user_roles` ADD CONSTRAINT `user_roles_role_id_roles_id_fk` FOREIGN KEY (`role_id`) REFERENCES `roles`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `user_roles` ADD CONSTRAINT `user_roles_granted_by_users_id_fk` FOREIGN KEY (`granted_by`) REFERENCES `users`(`id`) ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `vault_profiles` ADD CONSTRAINT `vault_profiles_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `vault_tokens` ADD CONSTRAINT `vault_tokens_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `vault_tokens` ADD CONSTRAINT `vault_tokens_profile_id_vault_profiles_id_fk` FOREIGN KEY (`profile_id`) REFERENCES `vault_profiles`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `webauthn_credentials` ADD CONSTRAINT `webauthn_credentials_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/drizzle/mysql/0001_puzzling_aqueduct.sql b/drizzle/mysql/0001_puzzling_aqueduct.sql
new file mode 100644
index 0000000..5b998a6
--- /dev/null
+++ b/drizzle/mysql/0001_puzzling_aqueduct.sql
@@ -0,0 +1,10 @@
+CREATE TABLE `host_sidebar_preferences` (
+ `user_id` varchar(255) NOT NULL,
+ `data` text NOT NULL,
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `host_sidebar_preferences_user_id` PRIMARY KEY(`user_id`)
+);
+--> statement-breakpoint
+ALTER TABLE `ssh_data` ADD `sort_order` int;--> statement-breakpoint
+ALTER TABLE `ssh_folders` ADD `sort_order` int;--> statement-breakpoint
+ALTER TABLE `host_sidebar_preferences` ADD CONSTRAINT `host_sidebar_preferences_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/drizzle/mysql/0002_bumpy_korg.sql b/drizzle/mysql/0002_bumpy_korg.sql
new file mode 100644
index 0000000..29ff064
--- /dev/null
+++ b/drizzle/mysql/0002_bumpy_korg.sql
@@ -0,0 +1,10 @@
+CREATE TABLE `credential_sidebar_preferences` (
+ `user_id` varchar(255) NOT NULL,
+ `data` text NOT NULL,
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `credential_sidebar_preferences_user_id` PRIMARY KEY(`user_id`)
+);
+--> statement-breakpoint
+ALTER TABLE `ssh_credentials` ADD `pin` boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE `ssh_credentials` ADD `sort_order` int;--> statement-breakpoint
+ALTER TABLE `credential_sidebar_preferences` ADD CONSTRAINT `credential_sidebar_preferences_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/drizzle/mysql/0003_dry_human_robot.sql b/drizzle/mysql/0003_dry_human_robot.sql
new file mode 100644
index 0000000..34a83b4
--- /dev/null
+++ b/drizzle/mysql/0003_dry_human_robot.sql
@@ -0,0 +1 @@
+ALTER TABLE `snippets` ADD `is_note` boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/drizzle/mysql/0004_fancy_spencer_smythe.sql b/drizzle/mysql/0004_fancy_spencer_smythe.sql
new file mode 100644
index 0000000..55dbe07
--- /dev/null
+++ b/drizzle/mysql/0004_fancy_spencer_smythe.sql
@@ -0,0 +1,28 @@
+CREATE TABLE `proxmox_node_history` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `host_id` int NOT NULL,
+ `ts` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `cpu_percent` double,
+ `mem_percent` double,
+ `disk_percent` double,
+ `net_rx_bytes` int,
+ `net_tx_bytes` int,
+ CONSTRAINT `proxmox_node_history_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `proxmox_stats_preferences` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `host_id` int NOT NULL,
+ `layout` text NOT NULL,
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `proxmox_stats_preferences_id` PRIMARY KEY(`id`),
+ CONSTRAINT `idx_proxmox_stats_prefs_user_host` UNIQUE(`user_id`,`host_id`)
+);
+--> statement-breakpoint
+ALTER TABLE `ssh_data` ADD `enable_proxmox_stats` boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE `ssh_data` ADD `proxmox_stats_config` text;--> statement-breakpoint
+ALTER TABLE `proxmox_node_history` ADD CONSTRAINT `proxmox_node_history_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `proxmox_stats_preferences` ADD CONSTRAINT `proxmox_stats_preferences_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `proxmox_stats_preferences` ADD CONSTRAINT `proxmox_stats_preferences_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/drizzle/mysql/0005_tearful_mindworm.sql b/drizzle/mysql/0005_tearful_mindworm.sql
new file mode 100644
index 0000000..a4fd898
--- /dev/null
+++ b/drizzle/mysql/0005_tearful_mindworm.sql
@@ -0,0 +1 @@
+ALTER TABLE `ssh_data` ADD `enable_terminal_toolbar` boolean DEFAULT true NOT NULL;
\ No newline at end of file
diff --git a/drizzle/mysql/0006_last_fantastic_four.sql b/drizzle/mysql/0006_last_fantastic_four.sql
new file mode 100644
index 0000000..153a100
--- /dev/null
+++ b/drizzle/mysql/0006_last_fantastic_four.sql
@@ -0,0 +1,45 @@
+CREATE TABLE `fleet_inventory` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `host_id` int NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `os_pretty_name` text,
+ `kernel` text,
+ `architecture` text,
+ `hostname` text,
+ `uptime_seconds` int,
+ `ip` text,
+ `package_manager` text,
+ `collected_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `fleet_inventory_id` PRIMARY KEY(`id`),
+ CONSTRAINT `idx_fleet_inventory_host` UNIQUE(`host_id`,`user_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `fleet_members` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `fleet_id` int NOT NULL,
+ `host_id` int NOT NULL,
+ `added_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `fleet_members_id` PRIMARY KEY(`id`),
+ CONSTRAINT `idx_fleet_members_fleet_host` UNIQUE(`fleet_id`,`host_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `fleets` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `description` text,
+ `color` text,
+ `icon` text,
+ `tag_rules` text,
+ `sync_id` varchar(255),
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `fleets_id` PRIMARY KEY(`id`),
+ CONSTRAINT `fleets_sync_id_unique` UNIQUE(`sync_id`)
+);
+--> statement-breakpoint
+ALTER TABLE `fleet_inventory` ADD CONSTRAINT `fleet_inventory_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `fleet_inventory` ADD CONSTRAINT `fleet_inventory_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `fleet_members` ADD CONSTRAINT `fleet_members_fleet_id_fleets_id_fk` FOREIGN KEY (`fleet_id`) REFERENCES `fleets`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `fleet_members` ADD CONSTRAINT `fleet_members_host_id_ssh_data_id_fk` FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `fleets` ADD CONSTRAINT `fleets_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/drizzle/mysql/0007_aspiring_turbo.sql b/drizzle/mysql/0007_aspiring_turbo.sql
new file mode 100644
index 0000000..b445975
--- /dev/null
+++ b/drizzle/mysql/0007_aspiring_turbo.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `ssh_data` ADD `parent_host_id` int;--> statement-breakpoint
+ALTER TABLE `ssh_data` ADD CONSTRAINT `ssh_data_parent_host_id_ssh_data_id_fk` FOREIGN KEY (`parent_host_id`) REFERENCES `ssh_data`(`id`) ON DELETE set null ON UPDATE no action;
\ No newline at end of file
diff --git a/drizzle/mysql/0008_lame_nighthawk.sql b/drizzle/mysql/0008_lame_nighthawk.sql
new file mode 100644
index 0000000..28cd356
--- /dev/null
+++ b/drizzle/mysql/0008_lame_nighthawk.sql
@@ -0,0 +1,18 @@
+CREATE TABLE `user_workspaces` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `color` text,
+ `icon` text,
+ `kind` text NOT NULL DEFAULT ('manual'),
+ `is_default` boolean NOT NULL DEFAULT false,
+ `payload` text NOT NULL DEFAULT ('{}'),
+ `sync_id` varchar(255),
+ `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `last_used_at` text,
+ CONSTRAINT `user_workspaces_id` PRIMARY KEY(`id`),
+ CONSTRAINT `user_workspaces_sync_id_unique` UNIQUE(`sync_id`)
+);
+--> statement-breakpoint
+ALTER TABLE `user_workspaces` ADD CONSTRAINT `user_workspaces_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/drizzle/mysql/0009_tan_skaar.sql b/drizzle/mysql/0009_tan_skaar.sql
new file mode 100644
index 0000000..7299bbf
--- /dev/null
+++ b/drizzle/mysql/0009_tan_skaar.sql
@@ -0,0 +1,26 @@
+ALTER TABLE `api_keys` MODIFY COLUMN `expires_at` varchar(255);--> statement-breakpoint
+ALTER TABLE `audit_logs` MODIFY COLUMN `action` varchar(255) NOT NULL;--> statement-breakpoint
+ALTER TABLE `audit_logs` MODIFY COLUMN `resource_type` varchar(255) NOT NULL;--> statement-breakpoint
+ALTER TABLE `audit_logs` MODIFY COLUMN `timestamp` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `host_access` MODIFY COLUMN `expires_at` varchar(255);--> statement-breakpoint
+ALTER TABLE `opkssh_tokens` MODIFY COLUMN `expires_at` varchar(255) NOT NULL;--> statement-breakpoint
+ALTER TABLE `recent_activity` MODIFY COLUMN `timestamp` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `session_shares` MODIFY COLUMN `expires_at` varchar(255) NOT NULL;--> statement-breakpoint
+ALTER TABLE `sessions` MODIFY COLUMN `expires_at` varchar(255) NOT NULL;--> statement-breakpoint
+ALTER TABLE `snippet_access` MODIFY COLUMN `expires_at` varchar(255);--> statement-breakpoint
+ALTER TABLE `trusted_devices` MODIFY COLUMN `expires_at` varchar(255) NOT NULL;--> statement-breakpoint
+ALTER TABLE `vault_tokens` MODIFY COLUMN `expires_at` varchar(255) NOT NULL;--> statement-breakpoint
+ALTER TABLE `webauthn_credentials` MODIFY COLUMN `credential_id` varchar(255) NOT NULL;--> statement-breakpoint
+CREATE INDEX `idx_audit_logs_timestamp` ON `audit_logs` (`timestamp`);--> statement-breakpoint
+CREATE INDEX `idx_audit_logs_user_ts` ON `audit_logs` (`user_id`,`timestamp`);--> statement-breakpoint
+CREATE INDEX `idx_audit_logs_action_ts` ON `audit_logs` (`action`,`timestamp`);--> statement-breakpoint
+CREATE INDEX `idx_audit_logs_resource_ts` ON `audit_logs` (`resource_type`,`timestamp`);--> statement-breakpoint
+CREATE INDEX `idx_host_access_user_id` ON `host_access` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_host_access_role_id` ON `host_access` (`role_id`);--> statement-breakpoint
+CREATE INDEX `idx_host_access_host_id` ON `host_access` (`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_host_access_expires_at` ON `host_access` (`expires_at`);--> statement-breakpoint
+CREATE INDEX `idx_ssh_data_user_id` ON `ssh_data` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_ssh_data_parent_host` ON `ssh_data` (`parent_host_id`);--> statement-breakpoint
+CREATE INDEX `idx_ssh_data_credential` ON `ssh_data` (`credential_id`);--> statement-breakpoint
+CREATE INDEX `idx_sessions_user_id` ON `sessions` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_sessions_expires_at` ON `sessions` (`expires_at`);
\ No newline at end of file
diff --git a/drizzle/mysql/0010_small_infant_terrible.sql b/drizzle/mysql/0010_small_infant_terrible.sql
new file mode 100644
index 0000000..5eca243
--- /dev/null
+++ b/drizzle/mysql/0010_small_infant_terrible.sql
@@ -0,0 +1,8 @@
+CREATE TABLE `ui_preferences` (
+ `user_id` varchar(255) NOT NULL,
+ `data` text NOT NULL,
+ `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `ui_preferences_user_id` PRIMARY KEY(`user_id`)
+);
+--> statement-breakpoint
+ALTER TABLE `ui_preferences` ADD CONSTRAINT `ui_preferences_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/drizzle/mysql/0011_easy_the_order.sql b/drizzle/mysql/0011_easy_the_order.sql
new file mode 100644
index 0000000..9032ffc
--- /dev/null
+++ b/drizzle/mysql/0011_easy_the_order.sql
@@ -0,0 +1,32 @@
+ALTER TABLE `alert_firings` MODIFY COLUMN `fired_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `session_recordings` MODIFY COLUMN `started_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `session_shares` MODIFY COLUMN `session_id` varchar(255) NOT NULL;--> statement-breakpoint
+CREATE INDEX `idx_alert_firings_rule` ON `alert_firings` (`rule_id`,`fired_at`);--> statement-breakpoint
+CREATE INDEX `idx_alert_firings_host` ON `alert_firings` (`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_api_keys_user_id` ON `api_keys` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_command_history_user_host` ON `command_history` (`user_id`,`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_dismissed_alerts_user_id` ON `dismissed_alerts` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_file_manager_pinned_user` ON `file_manager_pinned` (`user_id`,`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_file_manager_recent_user` ON `file_manager_recent` (`user_id`,`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_file_manager_shortcuts_user` ON `file_manager_shortcuts` (`user_id`,`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_fleet_inventory_user` ON `fleet_inventory` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_fleet_members_host` ON `fleet_members` (`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_homepage_items_user_id` ON `homepage_items` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_recent_activity_user_ts` ON `recent_activity` (`user_id`,`timestamp`);--> statement-breakpoint
+CREATE INDEX `idx_session_recordings_user_started` ON `session_recordings` (`user_id`,`started_at`);--> statement-breakpoint
+CREATE INDEX `idx_session_recordings_host` ON `session_recordings` (`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_session_shares_session_id` ON `session_shares` (`session_id`);--> statement-breakpoint
+CREATE INDEX `idx_session_shares_host_id` ON `session_shares` (`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_snippet_access_user_id` ON `snippet_access` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_snippet_access_snippet_id` ON `snippet_access` (`snippet_id`);--> statement-breakpoint
+CREATE INDEX `idx_snippet_access_role_id` ON `snippet_access` (`role_id`);--> statement-breakpoint
+CREATE INDEX `idx_snippets_user_id` ON `snippets` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_ssh_credential_usage_credential` ON `ssh_credential_usage` (`credential_id`);--> statement-breakpoint
+CREATE INDEX `idx_ssh_credential_usage_user` ON `ssh_credential_usage` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_ssh_credentials_user_id` ON `ssh_credentials` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_ssh_folders_user_id` ON `ssh_folders` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_transfer_recent_user` ON `transfer_recent` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_trusted_devices_user_id` ON `trusted_devices` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_user_open_tabs_user_id` ON `user_open_tabs` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_user_roles_role_id` ON `user_roles` (`role_id`);--> statement-breakpoint
+CREATE INDEX `idx_user_workspaces_user_id` ON `user_workspaces` (`user_id`);
\ No newline at end of file
diff --git a/drizzle/mysql/0012_outgoing_ultron.sql b/drizzle/mysql/0012_outgoing_ultron.sql
new file mode 100644
index 0000000..ec1a5fc
--- /dev/null
+++ b/drizzle/mysql/0012_outgoing_ultron.sql
@@ -0,0 +1,224 @@
+CREATE TABLE `ai_conversations` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `title` text,
+ `provider_id` int,
+ `model` text,
+ `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `ai_conversations_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `ai_messages` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `conversation_id` int NOT NULL,
+ `role` text NOT NULL,
+ `content` text NOT NULL DEFAULT (''),
+ `tool_calls` text,
+ `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `ai_messages_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `ai_proposals` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `conversation_id` int NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `kind` text NOT NULL,
+ `summary` text,
+ `payload` text NOT NULL DEFAULT ('{}'),
+ `status` varchar(255) NOT NULL DEFAULT 'pending',
+ `applied_at` text,
+ `result_summary` text,
+ `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `ai_proposals_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `ai_providers` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `provider_type` text NOT NULL,
+ `label` varchar(255) NOT NULL,
+ `base_url` text,
+ `api_key` text,
+ `api_key_prefix` text,
+ `default_model` text,
+ `enabled` boolean NOT NULL DEFAULT true,
+ `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `ai_providers_id` PRIMARY KEY(`id`),
+ CONSTRAINT `idx_ai_providers_user_label` UNIQUE(`user_id`,`label`)
+);
+--> statement-breakpoint
+CREATE TABLE `automation_channels` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `automation_id` int NOT NULL,
+ `channel_id` int NOT NULL,
+ CONSTRAINT `automation_channels_id` PRIMARY KEY(`id`),
+ CONSTRAINT `idx_automation_channels_pair` UNIQUE(`automation_id`,`channel_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `automation_run_steps` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `run_id` int NOT NULL,
+ `step_index` int NOT NULL,
+ `step_id` text NOT NULL,
+ `step_type` text NOT NULL,
+ `status` varchar(255) NOT NULL,
+ `started_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `finished_at` text,
+ `output` text,
+ `error` text,
+ `truncated` boolean NOT NULL DEFAULT false,
+ CONSTRAINT `automation_run_steps_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `automation_runs` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `automation_id` int NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `trigger_type` text NOT NULL,
+ `trigger_context` text,
+ `status` varchar(255) NOT NULL,
+ `started_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `finished_at` text,
+ `duration_ms` int,
+ `error` text,
+ `dry_run` boolean NOT NULL DEFAULT false,
+ `parent_run_id` int,
+ CONSTRAINT `automation_runs_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+CREATE TABLE `automation_schedules` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `automation_id` int NOT NULL,
+ `cron` text,
+ `interval_seconds` int,
+ `timezone` text,
+ `next_due_at` varchar(255),
+ `last_tick_at` text,
+ CONSTRAINT `automation_schedules_id` PRIMARY KEY(`id`),
+ CONSTRAINT `idx_automation_schedules_automation` UNIQUE(`automation_id`)
+);
+--> statement-breakpoint
+CREATE TABLE `automation_trigger_state` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `automation_id` int NOT NULL,
+ `state_key` varchar(255) NOT NULL,
+ `breach_started_at` text,
+ `last_fired_at` text,
+ `last_value` double,
+ `last_observed_state` text,
+ `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `automation_trigger_state_id` PRIMARY KEY(`id`),
+ CONSTRAINT `idx_automation_trigger_state_key` UNIQUE(`automation_id`,`state_key`)
+);
+--> statement-breakpoint
+CREATE TABLE `automations` (
+ `id` int AUTO_INCREMENT NOT NULL,
+ `user_id` varchar(255) NOT NULL,
+ `name` varchar(255) NOT NULL,
+ `description` text,
+ `enabled` boolean NOT NULL DEFAULT true,
+ `definition` text NOT NULL,
+ `definition_version` int NOT NULL DEFAULT 1,
+ `concurrency_policy` text NOT NULL DEFAULT ('skip'),
+ `max_run_seconds` int NOT NULL DEFAULT 300,
+ `dry_run` boolean NOT NULL DEFAULT false,
+ `last_run_at` text,
+ `last_run_status` text,
+ `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP),
+ CONSTRAINT `automations_id` PRIMARY KEY(`id`)
+);
+--> statement-breakpoint
+ALTER TABLE `alert_rules` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `alert_rules` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `api_keys` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `c2s_tunnel_presets` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `c2s_tunnel_presets` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `credential_sidebar_preferences` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `dashboard_service_links` MODIFY COLUMN `label` varchar(255) NOT NULL;--> statement-breakpoint
+ALTER TABLE `dashboard_service_links` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `dashboard_service_links` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `file_manager_shortcuts` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `fleets` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `fleets` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `homepage_items` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `homepage_items` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `homepage_layouts` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `host_access` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `host_health_checks` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `host_health_checks` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `host_metrics_preferences` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `host_metrics_preferences` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `host_sidebar_preferences` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `ssh_data` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `ssh_data` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `network_topology` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `network_topology` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `notification_channels` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `opkssh_tokens` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `proxmox_stats_preferences` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `proxmox_stats_preferences` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `roles` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `roles` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `session_shares` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `sessions` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `shared_host_auth_overrides` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `shared_host_auth_overrides` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `shared_host_secrets` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `shared_host_secrets` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `snippet_access` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `snippet_folders` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `snippet_folders` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `snippets` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `snippets` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `ssh_credentials` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `ssh_credentials` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `ssh_folders` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `ssh_folders` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `sso_providers` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `sso_providers` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `termix_identities` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `termix_identities` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `termix_identity_ca` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `termix_identity_ca` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `termix_identity_keys` MODIFY COLUMN `label` varchar(255);--> statement-breakpoint
+ALTER TABLE `termix_identity_keys` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `tmux_session_tags` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `trusted_devices` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `ui_preferences` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `user_open_tabs` MODIFY COLUMN `label` varchar(255) NOT NULL;--> statement-breakpoint
+ALTER TABLE `user_open_tabs` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `user_open_tabs` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `user_preferences` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `user_workspaces` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `user_workspaces` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `vault_profiles` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `vault_profiles` MODIFY COLUMN `updated_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `vault_tokens` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `webauthn_credentials` MODIFY COLUMN `created_at` varchar(255) NOT NULL DEFAULT (CURRENT_TIMESTAMP);--> statement-breakpoint
+ALTER TABLE `user_preferences` ADD `ai_assistant_enabled` boolean;--> statement-breakpoint
+ALTER TABLE `user_preferences` ADD `ai_read_only_commands` boolean;--> statement-breakpoint
+ALTER TABLE `ai_conversations` ADD CONSTRAINT `ai_conversations_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `ai_messages` ADD CONSTRAINT `ai_messages_conversation_id_ai_conversations_id_fk` FOREIGN KEY (`conversation_id`) REFERENCES `ai_conversations`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `ai_proposals` ADD CONSTRAINT `ai_proposals_conversation_id_ai_conversations_id_fk` FOREIGN KEY (`conversation_id`) REFERENCES `ai_conversations`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `ai_proposals` ADD CONSTRAINT `ai_proposals_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `ai_providers` ADD CONSTRAINT `ai_providers_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `automation_channels` ADD CONSTRAINT `automation_channels_automation_id_automations_id_fk` FOREIGN KEY (`automation_id`) REFERENCES `automations`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `automation_channels` ADD CONSTRAINT `automation_channels_channel_id_notification_channels_id_fk` FOREIGN KEY (`channel_id`) REFERENCES `notification_channels`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `automation_run_steps` ADD CONSTRAINT `automation_run_steps_run_id_automation_runs_id_fk` FOREIGN KEY (`run_id`) REFERENCES `automation_runs`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `automation_runs` ADD CONSTRAINT `automation_runs_automation_id_automations_id_fk` FOREIGN KEY (`automation_id`) REFERENCES `automations`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `automation_runs` ADD CONSTRAINT `automation_runs_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `automation_schedules` ADD CONSTRAINT `automation_schedules_automation_id_automations_id_fk` FOREIGN KEY (`automation_id`) REFERENCES `automations`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `automation_trigger_state` ADD CONSTRAINT `automation_trigger_state_automation_id_automations_id_fk` FOREIGN KEY (`automation_id`) REFERENCES `automations`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE `automations` ADD CONSTRAINT `automations_user_id_users_id_fk` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+CREATE INDEX `idx_ai_conversations_user` ON `ai_conversations` (`user_id`,`updated_at`);--> statement-breakpoint
+CREATE INDEX `idx_ai_messages_conversation` ON `ai_messages` (`conversation_id`,`created_at`);--> statement-breakpoint
+CREATE INDEX `idx_ai_proposals_user` ON `ai_proposals` (`user_id`,`status`);--> statement-breakpoint
+CREATE INDEX `idx_ai_proposals_conversation` ON `ai_proposals` (`conversation_id`);--> statement-breakpoint
+CREATE INDEX `idx_automation_run_steps_run` ON `automation_run_steps` (`run_id`,`step_index`);--> statement-breakpoint
+CREATE INDEX `idx_automation_runs_automation` ON `automation_runs` (`automation_id`,`started_at`);--> statement-breakpoint
+CREATE INDEX `idx_automation_runs_user` ON `automation_runs` (`user_id`,`started_at`);--> statement-breakpoint
+CREATE INDEX `idx_automation_schedules_due` ON `automation_schedules` (`next_due_at`);--> statement-breakpoint
+CREATE INDEX `idx_automations_user` ON `automations` (`user_id`,`enabled`);
\ No newline at end of file
diff --git a/drizzle/mysql/0013_third_wraith.sql b/drizzle/mysql/0013_third_wraith.sql
new file mode 100644
index 0000000..0ebb111
--- /dev/null
+++ b/drizzle/mysql/0013_third_wraith.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `user_preferences` ADD `terminal_defaults` text;--> statement-breakpoint
+ALTER TABLE `user_preferences` ADD `rdp_defaults` text;
\ No newline at end of file
diff --git a/drizzle/mysql/0014_bitter_nextwave.sql b/drizzle/mysql/0014_bitter_nextwave.sql
new file mode 100644
index 0000000..df84506
--- /dev/null
+++ b/drizzle/mysql/0014_bitter_nextwave.sql
@@ -0,0 +1 @@
+ALTER TABLE `user_preferences` ADD `terminal_macros` text;
\ No newline at end of file
diff --git a/drizzle/mysql/meta/0000_snapshot.json b/drizzle/mysql/meta/0000_snapshot.json
new file mode 100644
index 0000000..4c6f31c
--- /dev/null
+++ b/drizzle/mysql/meta/0000_snapshot.json
@@ -0,0 +1,6437 @@
+{
+ "version": "5",
+ "dialect": "mysql",
+ "id": "2b238de4-3ad7-4b57-8c58-308d6da06c02",
+ "prevId": "00000000-0000-0000-0000-000000000000",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('warning')"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_firings_id": {
+ "name": "alert_firings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rule_channels_id": {
+ "name": "alert_rule_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rules_id": {
+ "name": "alert_rules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "api_keys_id": {
+ "name": "api_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "audit_logs_id": {
+ "name": "audit_logs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "c2s_tunnel_presets_id": {
+ "name": "c2s_tunnel_presets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "command_history_id": {
+ "name": "command_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dashboard_service_links_id": {
+ "name": "dashboard_service_links_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dismissed_alerts_id": {
+ "name": "dismissed_alerts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_pinned_id": {
+ "name": "file_manager_pinned_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_recent_id": {
+ "name": "file_manager_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_shortcuts_id": {
+ "name": "file_manager_shortcuts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_items_id": {
+ "name": "homepage_items_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_layouts_id": {
+ "name": "homepage_layouts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('connect')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_access_id": {
+ "name": "host_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_checks_id": {
+ "name": "host_health_checks_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_history_id": {
+ "name": "host_health_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_history_id": {
+ "name": "host_metrics_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_preferences_id": {
+ "name": "host_metrics_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('ssh')"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('sha256')"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_data_id": {
+ "name": "ssh_data_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "network_topology_id": {
+ "name": "network_topology_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "notification_channels_id": {
+ "name": "notification_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "opkssh_tokens_id": {
+ "name": "opkssh_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "recent_activity_id": {
+ "name": "recent_activity_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "roles_id": {
+ "name": "roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('text')"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_recordings_id": {
+ "name": "session_recordings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_share_participants_id": {
+ "name": "session_share_participants_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('read-only')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_shares_id": {
+ "name": "session_shares_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sessions_id": {
+ "name": "sessions_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "settings_key": {
+ "name": "settings_key",
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_auth_overrides_id": {
+ "name": "shared_host_auth_overrides_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('credential')"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_secrets_id": {
+ "name": "shared_host_secrets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('view')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_access_id": {
+ "name": "snippet_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_folders_id": {
+ "name": "snippet_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippets_id": {
+ "name": "snippets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credential_usage_id": {
+ "name": "ssh_credential_usage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credentials_id": {
+ "name": "ssh_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_folders_id": {
+ "name": "ssh_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "sso_providers_id": {
+ "name": "sso_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sync_tombstones_id": {
+ "name": "sync_tombstones_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identities_id": {
+ "name": "termix_identities_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_ca_id": {
+ "name": "termix_identity_ca_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_keys_id": {
+ "name": "termix_identity_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tmux_session_tags_id": {
+ "name": "tmux_session_tags_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "transfer_recent_id": {
+ "name": "transfer_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "trusted_devices_id": {
+ "name": "trusted_devices_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_open_tabs_id": {
+ "name": "user_open_tabs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_preferences_user_id": {
+ "name": "user_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_roles_id": {
+ "name": "user_roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('openid email profile')"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "users_id": {
+ "name": "users_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_profiles_id": {
+ "name": "vault_profiles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_tokens_id": {
+ "name": "vault_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('preferred')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "webauthn_credentials_id": {
+ "name": "webauthn_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ }
+ },
+ "views": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "tables": {},
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/mysql/meta/0001_snapshot.json b/drizzle/mysql/meta/0001_snapshot.json
new file mode 100644
index 0000000..2ae914f
--- /dev/null
+++ b/drizzle/mysql/meta/0001_snapshot.json
@@ -0,0 +1,6504 @@
+{
+ "version": "5",
+ "dialect": "mysql",
+ "id": "c90a5027-6791-426e-a610-1bcdd57a3d82",
+ "prevId": "2b238de4-3ad7-4b57-8c58-308d6da06c02",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('warning')"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_firings_id": {
+ "name": "alert_firings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rule_channels_id": {
+ "name": "alert_rule_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rules_id": {
+ "name": "alert_rules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "api_keys_id": {
+ "name": "api_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "audit_logs_id": {
+ "name": "audit_logs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "c2s_tunnel_presets_id": {
+ "name": "c2s_tunnel_presets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "command_history_id": {
+ "name": "command_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dashboard_service_links_id": {
+ "name": "dashboard_service_links_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dismissed_alerts_id": {
+ "name": "dismissed_alerts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_pinned_id": {
+ "name": "file_manager_pinned_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_recent_id": {
+ "name": "file_manager_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_shortcuts_id": {
+ "name": "file_manager_shortcuts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_items_id": {
+ "name": "homepage_items_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_layouts_id": {
+ "name": "homepage_layouts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('connect')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_access_id": {
+ "name": "host_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_checks_id": {
+ "name": "host_health_checks_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_history_id": {
+ "name": "host_health_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_history_id": {
+ "name": "host_metrics_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_preferences_id": {
+ "name": "host_metrics_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_sidebar_preferences_user_id": {
+ "name": "host_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('ssh')"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('sha256')"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_data_id": {
+ "name": "ssh_data_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "network_topology_id": {
+ "name": "network_topology_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "notification_channels_id": {
+ "name": "notification_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "opkssh_tokens_id": {
+ "name": "opkssh_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "recent_activity_id": {
+ "name": "recent_activity_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "roles_id": {
+ "name": "roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('text')"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_recordings_id": {
+ "name": "session_recordings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_share_participants_id": {
+ "name": "session_share_participants_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('read-only')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_shares_id": {
+ "name": "session_shares_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sessions_id": {
+ "name": "sessions_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "settings_key": {
+ "name": "settings_key",
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_auth_overrides_id": {
+ "name": "shared_host_auth_overrides_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('credential')"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_secrets_id": {
+ "name": "shared_host_secrets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('view')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_access_id": {
+ "name": "snippet_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_folders_id": {
+ "name": "snippet_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippets_id": {
+ "name": "snippets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credential_usage_id": {
+ "name": "ssh_credential_usage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credentials_id": {
+ "name": "ssh_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_folders_id": {
+ "name": "ssh_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "sso_providers_id": {
+ "name": "sso_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sync_tombstones_id": {
+ "name": "sync_tombstones_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identities_id": {
+ "name": "termix_identities_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_ca_id": {
+ "name": "termix_identity_ca_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_keys_id": {
+ "name": "termix_identity_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tmux_session_tags_id": {
+ "name": "tmux_session_tags_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "transfer_recent_id": {
+ "name": "transfer_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "trusted_devices_id": {
+ "name": "trusted_devices_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_open_tabs_id": {
+ "name": "user_open_tabs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_preferences_user_id": {
+ "name": "user_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_roles_id": {
+ "name": "user_roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('openid email profile')"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "users_id": {
+ "name": "users_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_profiles_id": {
+ "name": "vault_profiles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_tokens_id": {
+ "name": "vault_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('preferred')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "webauthn_credentials_id": {
+ "name": "webauthn_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ }
+ },
+ "views": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "tables": {},
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/mysql/meta/0002_snapshot.json b/drizzle/mysql/meta/0002_snapshot.json
new file mode 100644
index 0000000..eda963b
--- /dev/null
+++ b/drizzle/mysql/meta/0002_snapshot.json
@@ -0,0 +1,6572 @@
+{
+ "version": "5",
+ "dialect": "mysql",
+ "id": "2fafb1cd-cb3f-4655-9c35-9699934e7ad4",
+ "prevId": "c90a5027-6791-426e-a610-1bcdd57a3d82",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('warning')"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_firings_id": {
+ "name": "alert_firings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rule_channels_id": {
+ "name": "alert_rule_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rules_id": {
+ "name": "alert_rules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "api_keys_id": {
+ "name": "api_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "audit_logs_id": {
+ "name": "audit_logs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "c2s_tunnel_presets_id": {
+ "name": "c2s_tunnel_presets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "command_history_id": {
+ "name": "command_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "credential_sidebar_preferences_user_id": {
+ "name": "credential_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dashboard_service_links_id": {
+ "name": "dashboard_service_links_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dismissed_alerts_id": {
+ "name": "dismissed_alerts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_pinned_id": {
+ "name": "file_manager_pinned_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_recent_id": {
+ "name": "file_manager_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_shortcuts_id": {
+ "name": "file_manager_shortcuts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_items_id": {
+ "name": "homepage_items_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_layouts_id": {
+ "name": "homepage_layouts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('connect')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_access_id": {
+ "name": "host_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_checks_id": {
+ "name": "host_health_checks_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_history_id": {
+ "name": "host_health_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_history_id": {
+ "name": "host_metrics_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_preferences_id": {
+ "name": "host_metrics_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_sidebar_preferences_user_id": {
+ "name": "host_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('ssh')"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('sha256')"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_data_id": {
+ "name": "ssh_data_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "network_topology_id": {
+ "name": "network_topology_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "notification_channels_id": {
+ "name": "notification_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "opkssh_tokens_id": {
+ "name": "opkssh_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "recent_activity_id": {
+ "name": "recent_activity_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "roles_id": {
+ "name": "roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('text')"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_recordings_id": {
+ "name": "session_recordings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_share_participants_id": {
+ "name": "session_share_participants_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('read-only')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_shares_id": {
+ "name": "session_shares_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sessions_id": {
+ "name": "sessions_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "settings_key": {
+ "name": "settings_key",
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_auth_overrides_id": {
+ "name": "shared_host_auth_overrides_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('credential')"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_secrets_id": {
+ "name": "shared_host_secrets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('view')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_access_id": {
+ "name": "snippet_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_folders_id": {
+ "name": "snippet_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippets_id": {
+ "name": "snippets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credential_usage_id": {
+ "name": "ssh_credential_usage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credentials_id": {
+ "name": "ssh_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_folders_id": {
+ "name": "ssh_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "sso_providers_id": {
+ "name": "sso_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sync_tombstones_id": {
+ "name": "sync_tombstones_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identities_id": {
+ "name": "termix_identities_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_ca_id": {
+ "name": "termix_identity_ca_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_keys_id": {
+ "name": "termix_identity_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tmux_session_tags_id": {
+ "name": "tmux_session_tags_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "transfer_recent_id": {
+ "name": "transfer_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "trusted_devices_id": {
+ "name": "trusted_devices_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_open_tabs_id": {
+ "name": "user_open_tabs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_preferences_user_id": {
+ "name": "user_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_roles_id": {
+ "name": "user_roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('openid email profile')"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "users_id": {
+ "name": "users_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_profiles_id": {
+ "name": "vault_profiles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_tokens_id": {
+ "name": "vault_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('preferred')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "webauthn_credentials_id": {
+ "name": "webauthn_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ }
+ },
+ "views": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "tables": {},
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/mysql/meta/0003_snapshot.json b/drizzle/mysql/meta/0003_snapshot.json
new file mode 100644
index 0000000..cd24d70
--- /dev/null
+++ b/drizzle/mysql/meta/0003_snapshot.json
@@ -0,0 +1,6580 @@
+{
+ "version": "5",
+ "dialect": "mysql",
+ "id": "3b19c9ab-23e3-47e2-a8e4-ede347f0ad40",
+ "prevId": "2fafb1cd-cb3f-4655-9c35-9699934e7ad4",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('warning')"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_firings_id": {
+ "name": "alert_firings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rule_channels_id": {
+ "name": "alert_rule_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rules_id": {
+ "name": "alert_rules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "api_keys_id": {
+ "name": "api_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "audit_logs_id": {
+ "name": "audit_logs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "c2s_tunnel_presets_id": {
+ "name": "c2s_tunnel_presets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "command_history_id": {
+ "name": "command_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "credential_sidebar_preferences_user_id": {
+ "name": "credential_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dashboard_service_links_id": {
+ "name": "dashboard_service_links_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dismissed_alerts_id": {
+ "name": "dismissed_alerts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_pinned_id": {
+ "name": "file_manager_pinned_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_recent_id": {
+ "name": "file_manager_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_shortcuts_id": {
+ "name": "file_manager_shortcuts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_items_id": {
+ "name": "homepage_items_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_layouts_id": {
+ "name": "homepage_layouts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('connect')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_access_id": {
+ "name": "host_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_checks_id": {
+ "name": "host_health_checks_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_history_id": {
+ "name": "host_health_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_history_id": {
+ "name": "host_metrics_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_preferences_id": {
+ "name": "host_metrics_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_sidebar_preferences_user_id": {
+ "name": "host_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('ssh')"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('sha256')"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_data_id": {
+ "name": "ssh_data_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "network_topology_id": {
+ "name": "network_topology_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "notification_channels_id": {
+ "name": "notification_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "opkssh_tokens_id": {
+ "name": "opkssh_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "recent_activity_id": {
+ "name": "recent_activity_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "roles_id": {
+ "name": "roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('text')"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_recordings_id": {
+ "name": "session_recordings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_share_participants_id": {
+ "name": "session_share_participants_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('read-only')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_shares_id": {
+ "name": "session_shares_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sessions_id": {
+ "name": "sessions_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "settings_key": {
+ "name": "settings_key",
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_auth_overrides_id": {
+ "name": "shared_host_auth_overrides_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('credential')"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_secrets_id": {
+ "name": "shared_host_secrets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('view')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_access_id": {
+ "name": "snippet_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_folders_id": {
+ "name": "snippet_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippets_id": {
+ "name": "snippets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credential_usage_id": {
+ "name": "ssh_credential_usage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credentials_id": {
+ "name": "ssh_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_folders_id": {
+ "name": "ssh_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "sso_providers_id": {
+ "name": "sso_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sync_tombstones_id": {
+ "name": "sync_tombstones_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identities_id": {
+ "name": "termix_identities_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_ca_id": {
+ "name": "termix_identity_ca_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_keys_id": {
+ "name": "termix_identity_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tmux_session_tags_id": {
+ "name": "tmux_session_tags_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "transfer_recent_id": {
+ "name": "transfer_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "trusted_devices_id": {
+ "name": "trusted_devices_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_open_tabs_id": {
+ "name": "user_open_tabs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_preferences_user_id": {
+ "name": "user_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_roles_id": {
+ "name": "user_roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('openid email profile')"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "users_id": {
+ "name": "users_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_profiles_id": {
+ "name": "vault_profiles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_tokens_id": {
+ "name": "vault_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('preferred')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "webauthn_credentials_id": {
+ "name": "webauthn_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ }
+ },
+ "views": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "tables": {},
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/mysql/meta/0004_snapshot.json b/drizzle/mysql/meta/0004_snapshot.json
new file mode 100644
index 0000000..b1cd8c3
--- /dev/null
+++ b/drizzle/mysql/meta/0004_snapshot.json
@@ -0,0 +1,6780 @@
+{
+ "version": "5",
+ "dialect": "mysql",
+ "id": "608b427f-8231-4295-b471-e62b484c0211",
+ "prevId": "3b19c9ab-23e3-47e2-a8e4-ede347f0ad40",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('warning')"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_firings_id": {
+ "name": "alert_firings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rule_channels_id": {
+ "name": "alert_rule_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rules_id": {
+ "name": "alert_rules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "api_keys_id": {
+ "name": "api_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "audit_logs_id": {
+ "name": "audit_logs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "c2s_tunnel_presets_id": {
+ "name": "c2s_tunnel_presets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "command_history_id": {
+ "name": "command_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "credential_sidebar_preferences_user_id": {
+ "name": "credential_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dashboard_service_links_id": {
+ "name": "dashboard_service_links_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dismissed_alerts_id": {
+ "name": "dismissed_alerts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_pinned_id": {
+ "name": "file_manager_pinned_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_recent_id": {
+ "name": "file_manager_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_shortcuts_id": {
+ "name": "file_manager_shortcuts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_items_id": {
+ "name": "homepage_items_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_layouts_id": {
+ "name": "homepage_layouts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('connect')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_access_id": {
+ "name": "host_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_checks_id": {
+ "name": "host_health_checks_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_history_id": {
+ "name": "host_health_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_history_id": {
+ "name": "host_metrics_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_preferences_id": {
+ "name": "host_metrics_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_sidebar_preferences_user_id": {
+ "name": "host_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('ssh')"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('sha256')"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_data_id": {
+ "name": "ssh_data_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "network_topology_id": {
+ "name": "network_topology_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "notification_channels_id": {
+ "name": "notification_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "opkssh_tokens_id": {
+ "name": "opkssh_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_node_history_id": {
+ "name": "proxmox_node_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_stats_preferences_id": {
+ "name": "proxmox_stats_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "recent_activity_id": {
+ "name": "recent_activity_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "roles_id": {
+ "name": "roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('text')"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_recordings_id": {
+ "name": "session_recordings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_share_participants_id": {
+ "name": "session_share_participants_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('read-only')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_shares_id": {
+ "name": "session_shares_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sessions_id": {
+ "name": "sessions_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "settings_key": {
+ "name": "settings_key",
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_auth_overrides_id": {
+ "name": "shared_host_auth_overrides_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('credential')"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_secrets_id": {
+ "name": "shared_host_secrets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('view')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_access_id": {
+ "name": "snippet_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_folders_id": {
+ "name": "snippet_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippets_id": {
+ "name": "snippets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credential_usage_id": {
+ "name": "ssh_credential_usage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credentials_id": {
+ "name": "ssh_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_folders_id": {
+ "name": "ssh_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "sso_providers_id": {
+ "name": "sso_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sync_tombstones_id": {
+ "name": "sync_tombstones_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identities_id": {
+ "name": "termix_identities_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_ca_id": {
+ "name": "termix_identity_ca_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_keys_id": {
+ "name": "termix_identity_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tmux_session_tags_id": {
+ "name": "tmux_session_tags_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "transfer_recent_id": {
+ "name": "transfer_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "trusted_devices_id": {
+ "name": "trusted_devices_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_open_tabs_id": {
+ "name": "user_open_tabs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_preferences_user_id": {
+ "name": "user_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_roles_id": {
+ "name": "user_roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('openid email profile')"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "users_id": {
+ "name": "users_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_profiles_id": {
+ "name": "vault_profiles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_tokens_id": {
+ "name": "vault_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('preferred')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "webauthn_credentials_id": {
+ "name": "webauthn_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ }
+ },
+ "views": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "tables": {},
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/mysql/meta/0005_snapshot.json b/drizzle/mysql/meta/0005_snapshot.json
new file mode 100644
index 0000000..c9c5b79
--- /dev/null
+++ b/drizzle/mysql/meta/0005_snapshot.json
@@ -0,0 +1,6788 @@
+{
+ "version": "5",
+ "dialect": "mysql",
+ "id": "97c005f3-801f-48dc-9788-58bfb7da1c54",
+ "prevId": "608b427f-8231-4295-b471-e62b484c0211",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('warning')"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_firings_id": {
+ "name": "alert_firings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rule_channels_id": {
+ "name": "alert_rule_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rules_id": {
+ "name": "alert_rules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "api_keys_id": {
+ "name": "api_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "audit_logs_id": {
+ "name": "audit_logs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "c2s_tunnel_presets_id": {
+ "name": "c2s_tunnel_presets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "command_history_id": {
+ "name": "command_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "credential_sidebar_preferences_user_id": {
+ "name": "credential_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dashboard_service_links_id": {
+ "name": "dashboard_service_links_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dismissed_alerts_id": {
+ "name": "dismissed_alerts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_pinned_id": {
+ "name": "file_manager_pinned_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_recent_id": {
+ "name": "file_manager_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_shortcuts_id": {
+ "name": "file_manager_shortcuts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_items_id": {
+ "name": "homepage_items_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_layouts_id": {
+ "name": "homepage_layouts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('connect')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_access_id": {
+ "name": "host_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_checks_id": {
+ "name": "host_health_checks_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_history_id": {
+ "name": "host_health_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_history_id": {
+ "name": "host_metrics_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_preferences_id": {
+ "name": "host_metrics_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_sidebar_preferences_user_id": {
+ "name": "host_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('ssh')"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('sha256')"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_data_id": {
+ "name": "ssh_data_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "network_topology_id": {
+ "name": "network_topology_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "notification_channels_id": {
+ "name": "notification_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "opkssh_tokens_id": {
+ "name": "opkssh_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_node_history_id": {
+ "name": "proxmox_node_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_stats_preferences_id": {
+ "name": "proxmox_stats_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "recent_activity_id": {
+ "name": "recent_activity_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "roles_id": {
+ "name": "roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('text')"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_recordings_id": {
+ "name": "session_recordings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_share_participants_id": {
+ "name": "session_share_participants_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('read-only')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_shares_id": {
+ "name": "session_shares_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sessions_id": {
+ "name": "sessions_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "settings_key": {
+ "name": "settings_key",
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_auth_overrides_id": {
+ "name": "shared_host_auth_overrides_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('credential')"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_secrets_id": {
+ "name": "shared_host_secrets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('view')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_access_id": {
+ "name": "snippet_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_folders_id": {
+ "name": "snippet_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippets_id": {
+ "name": "snippets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credential_usage_id": {
+ "name": "ssh_credential_usage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credentials_id": {
+ "name": "ssh_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_folders_id": {
+ "name": "ssh_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "sso_providers_id": {
+ "name": "sso_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sync_tombstones_id": {
+ "name": "sync_tombstones_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identities_id": {
+ "name": "termix_identities_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_ca_id": {
+ "name": "termix_identity_ca_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_keys_id": {
+ "name": "termix_identity_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tmux_session_tags_id": {
+ "name": "tmux_session_tags_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "transfer_recent_id": {
+ "name": "transfer_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "trusted_devices_id": {
+ "name": "trusted_devices_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_open_tabs_id": {
+ "name": "user_open_tabs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_preferences_user_id": {
+ "name": "user_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_roles_id": {
+ "name": "user_roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('openid email profile')"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "users_id": {
+ "name": "users_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_profiles_id": {
+ "name": "vault_profiles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_tokens_id": {
+ "name": "vault_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('preferred')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "webauthn_credentials_id": {
+ "name": "webauthn_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ }
+ },
+ "views": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "tables": {},
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/mysql/meta/0006_snapshot.json b/drizzle/mysql/meta/0006_snapshot.json
new file mode 100644
index 0000000..b3df268
--- /dev/null
+++ b/drizzle/mysql/meta/0006_snapshot.json
@@ -0,0 +1,7111 @@
+{
+ "version": "5",
+ "dialect": "mysql",
+ "id": "e7cde432-1ea5-4654-9bd8-aaaf78627203",
+ "prevId": "97c005f3-801f-48dc-9788-58bfb7da1c54",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('warning')"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_firings_id": {
+ "name": "alert_firings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rule_channels_id": {
+ "name": "alert_rule_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rules_id": {
+ "name": "alert_rules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "api_keys_id": {
+ "name": "api_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "audit_logs_id": {
+ "name": "audit_logs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "c2s_tunnel_presets_id": {
+ "name": "c2s_tunnel_presets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "command_history_id": {
+ "name": "command_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "credential_sidebar_preferences_user_id": {
+ "name": "credential_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dashboard_service_links_id": {
+ "name": "dashboard_service_links_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dismissed_alerts_id": {
+ "name": "dismissed_alerts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_pinned_id": {
+ "name": "file_manager_pinned_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_recent_id": {
+ "name": "file_manager_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_shortcuts_id": {
+ "name": "file_manager_shortcuts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_inventory_id": {
+ "name": "fleet_inventory_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_members_id": {
+ "name": "fleet_members_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleets_id": {
+ "name": "fleets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_items_id": {
+ "name": "homepage_items_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_layouts_id": {
+ "name": "homepage_layouts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('connect')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_access_id": {
+ "name": "host_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_checks_id": {
+ "name": "host_health_checks_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_history_id": {
+ "name": "host_health_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_history_id": {
+ "name": "host_metrics_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_preferences_id": {
+ "name": "host_metrics_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_sidebar_preferences_user_id": {
+ "name": "host_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('ssh')"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('sha256')"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_data_id": {
+ "name": "ssh_data_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "network_topology_id": {
+ "name": "network_topology_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "notification_channels_id": {
+ "name": "notification_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "opkssh_tokens_id": {
+ "name": "opkssh_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_node_history_id": {
+ "name": "proxmox_node_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_stats_preferences_id": {
+ "name": "proxmox_stats_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "recent_activity_id": {
+ "name": "recent_activity_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "roles_id": {
+ "name": "roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('text')"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_recordings_id": {
+ "name": "session_recordings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_share_participants_id": {
+ "name": "session_share_participants_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('read-only')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_shares_id": {
+ "name": "session_shares_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sessions_id": {
+ "name": "sessions_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "settings_key": {
+ "name": "settings_key",
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_auth_overrides_id": {
+ "name": "shared_host_auth_overrides_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('credential')"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_secrets_id": {
+ "name": "shared_host_secrets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('view')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_access_id": {
+ "name": "snippet_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_folders_id": {
+ "name": "snippet_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippets_id": {
+ "name": "snippets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credential_usage_id": {
+ "name": "ssh_credential_usage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credentials_id": {
+ "name": "ssh_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_folders_id": {
+ "name": "ssh_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "sso_providers_id": {
+ "name": "sso_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sync_tombstones_id": {
+ "name": "sync_tombstones_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identities_id": {
+ "name": "termix_identities_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_ca_id": {
+ "name": "termix_identity_ca_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_keys_id": {
+ "name": "termix_identity_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tmux_session_tags_id": {
+ "name": "tmux_session_tags_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "transfer_recent_id": {
+ "name": "transfer_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "trusted_devices_id": {
+ "name": "trusted_devices_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_open_tabs_id": {
+ "name": "user_open_tabs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_preferences_user_id": {
+ "name": "user_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_roles_id": {
+ "name": "user_roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('openid email profile')"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "users_id": {
+ "name": "users_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_profiles_id": {
+ "name": "vault_profiles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_tokens_id": {
+ "name": "vault_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('preferred')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "webauthn_credentials_id": {
+ "name": "webauthn_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ }
+ },
+ "views": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "tables": {},
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/mysql/meta/0007_snapshot.json b/drizzle/mysql/meta/0007_snapshot.json
new file mode 100644
index 0000000..b4571dc
--- /dev/null
+++ b/drizzle/mysql/meta/0007_snapshot.json
@@ -0,0 +1,7131 @@
+{
+ "version": "5",
+ "dialect": "mysql",
+ "id": "8f6d860f-ee22-4e2e-b913-25cec9faf4e9",
+ "prevId": "e7cde432-1ea5-4654-9bd8-aaaf78627203",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('warning')"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_firings_id": {
+ "name": "alert_firings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rule_channels_id": {
+ "name": "alert_rule_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rules_id": {
+ "name": "alert_rules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "api_keys_id": {
+ "name": "api_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "audit_logs_id": {
+ "name": "audit_logs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "c2s_tunnel_presets_id": {
+ "name": "c2s_tunnel_presets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "command_history_id": {
+ "name": "command_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "credential_sidebar_preferences_user_id": {
+ "name": "credential_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dashboard_service_links_id": {
+ "name": "dashboard_service_links_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dismissed_alerts_id": {
+ "name": "dismissed_alerts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_pinned_id": {
+ "name": "file_manager_pinned_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_recent_id": {
+ "name": "file_manager_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_shortcuts_id": {
+ "name": "file_manager_shortcuts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_inventory_id": {
+ "name": "fleet_inventory_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_members_id": {
+ "name": "fleet_members_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleets_id": {
+ "name": "fleets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_items_id": {
+ "name": "homepage_items_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_layouts_id": {
+ "name": "homepage_layouts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('connect')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_access_id": {
+ "name": "host_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_checks_id": {
+ "name": "host_health_checks_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_history_id": {
+ "name": "host_health_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_history_id": {
+ "name": "host_metrics_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_preferences_id": {
+ "name": "host_metrics_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_sidebar_preferences_user_id": {
+ "name": "host_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('ssh')"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('sha256')"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_data_id": {
+ "name": "ssh_data_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "network_topology_id": {
+ "name": "network_topology_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "notification_channels_id": {
+ "name": "notification_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "opkssh_tokens_id": {
+ "name": "opkssh_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_node_history_id": {
+ "name": "proxmox_node_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_stats_preferences_id": {
+ "name": "proxmox_stats_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "recent_activity_id": {
+ "name": "recent_activity_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "roles_id": {
+ "name": "roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('text')"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_recordings_id": {
+ "name": "session_recordings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_share_participants_id": {
+ "name": "session_share_participants_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('read-only')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_shares_id": {
+ "name": "session_shares_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sessions_id": {
+ "name": "sessions_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "settings_key": {
+ "name": "settings_key",
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_auth_overrides_id": {
+ "name": "shared_host_auth_overrides_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('credential')"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_secrets_id": {
+ "name": "shared_host_secrets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('view')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_access_id": {
+ "name": "snippet_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_folders_id": {
+ "name": "snippet_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippets_id": {
+ "name": "snippets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credential_usage_id": {
+ "name": "ssh_credential_usage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credentials_id": {
+ "name": "ssh_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_folders_id": {
+ "name": "ssh_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "sso_providers_id": {
+ "name": "sso_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sync_tombstones_id": {
+ "name": "sync_tombstones_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identities_id": {
+ "name": "termix_identities_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_ca_id": {
+ "name": "termix_identity_ca_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_keys_id": {
+ "name": "termix_identity_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tmux_session_tags_id": {
+ "name": "tmux_session_tags_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "transfer_recent_id": {
+ "name": "transfer_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "trusted_devices_id": {
+ "name": "trusted_devices_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_open_tabs_id": {
+ "name": "user_open_tabs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_preferences_user_id": {
+ "name": "user_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_roles_id": {
+ "name": "user_roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('openid email profile')"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "users_id": {
+ "name": "users_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_profiles_id": {
+ "name": "vault_profiles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_tokens_id": {
+ "name": "vault_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('preferred')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "webauthn_credentials_id": {
+ "name": "webauthn_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ }
+ },
+ "views": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "tables": {},
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/mysql/meta/0008_snapshot.json b/drizzle/mysql/meta/0008_snapshot.json
new file mode 100644
index 0000000..38a6a4f
--- /dev/null
+++ b/drizzle/mysql/meta/0008_snapshot.json
@@ -0,0 +1,7258 @@
+{
+ "version": "5",
+ "dialect": "mysql",
+ "id": "319572f5-d811-4091-aef8-6cca13f4ea75",
+ "prevId": "8f6d860f-ee22-4e2e-b913-25cec9faf4e9",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('warning')"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_firings_id": {
+ "name": "alert_firings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rule_channels_id": {
+ "name": "alert_rule_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rules_id": {
+ "name": "alert_rules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "api_keys_id": {
+ "name": "api_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "audit_logs_id": {
+ "name": "audit_logs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "c2s_tunnel_presets_id": {
+ "name": "c2s_tunnel_presets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "command_history_id": {
+ "name": "command_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "credential_sidebar_preferences_user_id": {
+ "name": "credential_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dashboard_service_links_id": {
+ "name": "dashboard_service_links_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dismissed_alerts_id": {
+ "name": "dismissed_alerts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_pinned_id": {
+ "name": "file_manager_pinned_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_recent_id": {
+ "name": "file_manager_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_shortcuts_id": {
+ "name": "file_manager_shortcuts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_inventory_id": {
+ "name": "fleet_inventory_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_members_id": {
+ "name": "fleet_members_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleets_id": {
+ "name": "fleets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_items_id": {
+ "name": "homepage_items_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_layouts_id": {
+ "name": "homepage_layouts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('connect')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_access_id": {
+ "name": "host_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_checks_id": {
+ "name": "host_health_checks_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_history_id": {
+ "name": "host_health_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_history_id": {
+ "name": "host_metrics_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_preferences_id": {
+ "name": "host_metrics_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_sidebar_preferences_user_id": {
+ "name": "host_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('ssh')"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('sha256')"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_data_id": {
+ "name": "ssh_data_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "network_topology_id": {
+ "name": "network_topology_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "notification_channels_id": {
+ "name": "notification_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "opkssh_tokens_id": {
+ "name": "opkssh_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_node_history_id": {
+ "name": "proxmox_node_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_stats_preferences_id": {
+ "name": "proxmox_stats_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "recent_activity_id": {
+ "name": "recent_activity_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "roles_id": {
+ "name": "roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('text')"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_recordings_id": {
+ "name": "session_recordings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_share_participants_id": {
+ "name": "session_share_participants_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('read-only')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_shares_id": {
+ "name": "session_shares_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sessions_id": {
+ "name": "sessions_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "settings_key": {
+ "name": "settings_key",
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_auth_overrides_id": {
+ "name": "shared_host_auth_overrides_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('credential')"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_secrets_id": {
+ "name": "shared_host_secrets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('view')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_access_id": {
+ "name": "snippet_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_folders_id": {
+ "name": "snippet_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippets_id": {
+ "name": "snippets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credential_usage_id": {
+ "name": "ssh_credential_usage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credentials_id": {
+ "name": "ssh_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_folders_id": {
+ "name": "ssh_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "sso_providers_id": {
+ "name": "sso_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sync_tombstones_id": {
+ "name": "sync_tombstones_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identities_id": {
+ "name": "termix_identities_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_ca_id": {
+ "name": "termix_identity_ca_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_keys_id": {
+ "name": "termix_identity_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tmux_session_tags_id": {
+ "name": "tmux_session_tags_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "transfer_recent_id": {
+ "name": "transfer_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "trusted_devices_id": {
+ "name": "trusted_devices_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_open_tabs_id": {
+ "name": "user_open_tabs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_preferences_user_id": {
+ "name": "user_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_roles_id": {
+ "name": "user_roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_workspaces": {
+ "name": "user_workspaces",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_workspaces_id": {
+ "name": "user_workspaces_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('openid email profile')"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "users_id": {
+ "name": "users_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_profiles_id": {
+ "name": "vault_profiles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_tokens_id": {
+ "name": "vault_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('preferred')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "webauthn_credentials_id": {
+ "name": "webauthn_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ }
+ },
+ "views": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "tables": {},
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/mysql/meta/0009_snapshot.json b/drizzle/mysql/meta/0009_snapshot.json
new file mode 100644
index 0000000..9cea0fd
--- /dev/null
+++ b/drizzle/mysql/meta/0009_snapshot.json
@@ -0,0 +1,7356 @@
+{
+ "version": "5",
+ "dialect": "mysql",
+ "id": "90c31dd1-06ac-4ca5-891f-c971987963f4",
+ "prevId": "319572f5-d811-4091-aef8-6cca13f4ea75",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('warning')"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_firings_id": {
+ "name": "alert_firings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rule_channels_id": {
+ "name": "alert_rule_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rules_id": {
+ "name": "alert_rules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "api_keys_id": {
+ "name": "api_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_audit_logs_timestamp": {
+ "name": "idx_audit_logs_timestamp",
+ "columns": [
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_user_ts": {
+ "name": "idx_audit_logs_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_action_ts": {
+ "name": "idx_audit_logs_action_ts",
+ "columns": [
+ "action",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_resource_ts": {
+ "name": "idx_audit_logs_resource_ts",
+ "columns": [
+ "resource_type",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "audit_logs_id": {
+ "name": "audit_logs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "c2s_tunnel_presets_id": {
+ "name": "c2s_tunnel_presets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "command_history_id": {
+ "name": "command_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "credential_sidebar_preferences_user_id": {
+ "name": "credential_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dashboard_service_links_id": {
+ "name": "dashboard_service_links_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dismissed_alerts_id": {
+ "name": "dismissed_alerts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_pinned_id": {
+ "name": "file_manager_pinned_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_recent_id": {
+ "name": "file_manager_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_shortcuts_id": {
+ "name": "file_manager_shortcuts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_inventory_id": {
+ "name": "fleet_inventory_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_members_id": {
+ "name": "fleet_members_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleets_id": {
+ "name": "fleets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_items_id": {
+ "name": "homepage_items_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_layouts_id": {
+ "name": "homepage_layouts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('connect')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_host_access_user_id": {
+ "name": "idx_host_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_role_id": {
+ "name": "idx_host_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_host_id": {
+ "name": "idx_host_access_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_expires_at": {
+ "name": "idx_host_access_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_access_id": {
+ "name": "host_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_checks_id": {
+ "name": "host_health_checks_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_history_id": {
+ "name": "host_health_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_history_id": {
+ "name": "host_metrics_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_preferences_id": {
+ "name": "host_metrics_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_sidebar_preferences_user_id": {
+ "name": "host_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('ssh')"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('sha256')"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_data_user_id": {
+ "name": "idx_ssh_data_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_parent_host": {
+ "name": "idx_ssh_data_parent_host",
+ "columns": [
+ "parent_host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_credential": {
+ "name": "idx_ssh_data_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_data_id": {
+ "name": "ssh_data_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "network_topology_id": {
+ "name": "network_topology_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "notification_channels_id": {
+ "name": "notification_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "opkssh_tokens_id": {
+ "name": "opkssh_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_node_history_id": {
+ "name": "proxmox_node_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_stats_preferences_id": {
+ "name": "proxmox_stats_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "recent_activity_id": {
+ "name": "recent_activity_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "roles_id": {
+ "name": "roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('text')"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_recordings_id": {
+ "name": "session_recordings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_share_participants_id": {
+ "name": "session_share_participants_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('read-only')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_shares_id": {
+ "name": "session_shares_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_sessions_user_id": {
+ "name": "idx_sessions_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_sessions_expires_at": {
+ "name": "idx_sessions_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sessions_id": {
+ "name": "sessions_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "settings_key": {
+ "name": "settings_key",
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_auth_overrides_id": {
+ "name": "shared_host_auth_overrides_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('credential')"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_secrets_id": {
+ "name": "shared_host_secrets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('view')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_access_id": {
+ "name": "snippet_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_folders_id": {
+ "name": "snippet_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippets_id": {
+ "name": "snippets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credential_usage_id": {
+ "name": "ssh_credential_usage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credentials_id": {
+ "name": "ssh_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_folders_id": {
+ "name": "ssh_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "sso_providers_id": {
+ "name": "sso_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sync_tombstones_id": {
+ "name": "sync_tombstones_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identities_id": {
+ "name": "termix_identities_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_ca_id": {
+ "name": "termix_identity_ca_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_keys_id": {
+ "name": "termix_identity_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tmux_session_tags_id": {
+ "name": "tmux_session_tags_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "transfer_recent_id": {
+ "name": "transfer_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "trusted_devices_id": {
+ "name": "trusted_devices_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_open_tabs_id": {
+ "name": "user_open_tabs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_preferences_user_id": {
+ "name": "user_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_roles_id": {
+ "name": "user_roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_workspaces": {
+ "name": "user_workspaces",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_workspaces_id": {
+ "name": "user_workspaces_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('openid email profile')"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "users_id": {
+ "name": "users_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_profiles_id": {
+ "name": "vault_profiles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_tokens_id": {
+ "name": "vault_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('preferred')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "webauthn_credentials_id": {
+ "name": "webauthn_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ }
+ },
+ "views": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "tables": {},
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/mysql/meta/0010_snapshot.json b/drizzle/mysql/meta/0010_snapshot.json
new file mode 100644
index 0000000..a608d98
--- /dev/null
+++ b/drizzle/mysql/meta/0010_snapshot.json
@@ -0,0 +1,7409 @@
+{
+ "version": "5",
+ "dialect": "mysql",
+ "id": "62dd3143-9a1c-472b-907b-ccefa7973916",
+ "prevId": "90c31dd1-06ac-4ca5-891f-c971987963f4",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('warning')"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_firings_id": {
+ "name": "alert_firings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rule_channels_id": {
+ "name": "alert_rule_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rules_id": {
+ "name": "alert_rules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "api_keys_id": {
+ "name": "api_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_audit_logs_timestamp": {
+ "name": "idx_audit_logs_timestamp",
+ "columns": [
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_user_ts": {
+ "name": "idx_audit_logs_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_action_ts": {
+ "name": "idx_audit_logs_action_ts",
+ "columns": [
+ "action",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_resource_ts": {
+ "name": "idx_audit_logs_resource_ts",
+ "columns": [
+ "resource_type",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "audit_logs_id": {
+ "name": "audit_logs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "c2s_tunnel_presets_id": {
+ "name": "c2s_tunnel_presets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "command_history_id": {
+ "name": "command_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "credential_sidebar_preferences_user_id": {
+ "name": "credential_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dashboard_service_links_id": {
+ "name": "dashboard_service_links_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dismissed_alerts_id": {
+ "name": "dismissed_alerts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_pinned_id": {
+ "name": "file_manager_pinned_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_recent_id": {
+ "name": "file_manager_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_shortcuts_id": {
+ "name": "file_manager_shortcuts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_inventory_id": {
+ "name": "fleet_inventory_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_members_id": {
+ "name": "fleet_members_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleets_id": {
+ "name": "fleets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_items_id": {
+ "name": "homepage_items_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_layouts_id": {
+ "name": "homepage_layouts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('connect')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_host_access_user_id": {
+ "name": "idx_host_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_role_id": {
+ "name": "idx_host_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_host_id": {
+ "name": "idx_host_access_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_expires_at": {
+ "name": "idx_host_access_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_access_id": {
+ "name": "host_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_checks_id": {
+ "name": "host_health_checks_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_history_id": {
+ "name": "host_health_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_history_id": {
+ "name": "host_metrics_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_preferences_id": {
+ "name": "host_metrics_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_sidebar_preferences_user_id": {
+ "name": "host_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('ssh')"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('sha256')"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_data_user_id": {
+ "name": "idx_ssh_data_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_parent_host": {
+ "name": "idx_ssh_data_parent_host",
+ "columns": [
+ "parent_host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_credential": {
+ "name": "idx_ssh_data_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_data_id": {
+ "name": "ssh_data_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "network_topology_id": {
+ "name": "network_topology_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "notification_channels_id": {
+ "name": "notification_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "opkssh_tokens_id": {
+ "name": "opkssh_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_node_history_id": {
+ "name": "proxmox_node_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_stats_preferences_id": {
+ "name": "proxmox_stats_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "recent_activity_id": {
+ "name": "recent_activity_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "roles_id": {
+ "name": "roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('text')"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_recordings_id": {
+ "name": "session_recordings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_share_participants_id": {
+ "name": "session_share_participants_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('read-only')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_shares_id": {
+ "name": "session_shares_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_sessions_user_id": {
+ "name": "idx_sessions_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_sessions_expires_at": {
+ "name": "idx_sessions_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sessions_id": {
+ "name": "sessions_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "settings_key": {
+ "name": "settings_key",
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_auth_overrides_id": {
+ "name": "shared_host_auth_overrides_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('credential')"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_secrets_id": {
+ "name": "shared_host_secrets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('view')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_access_id": {
+ "name": "snippet_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_folders_id": {
+ "name": "snippet_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippets_id": {
+ "name": "snippets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credential_usage_id": {
+ "name": "ssh_credential_usage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credentials_id": {
+ "name": "ssh_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_folders_id": {
+ "name": "ssh_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "sso_providers_id": {
+ "name": "sso_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sync_tombstones_id": {
+ "name": "sync_tombstones_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identities_id": {
+ "name": "termix_identities_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_ca_id": {
+ "name": "termix_identity_ca_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_keys_id": {
+ "name": "termix_identity_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tmux_session_tags_id": {
+ "name": "tmux_session_tags_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "transfer_recent_id": {
+ "name": "transfer_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "trusted_devices_id": {
+ "name": "trusted_devices_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ui_preferences": {
+ "name": "ui_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ui_preferences_user_id_users_id_fk": {
+ "name": "ui_preferences_user_id_users_id_fk",
+ "tableFrom": "ui_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ui_preferences_user_id": {
+ "name": "ui_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_open_tabs_id": {
+ "name": "user_open_tabs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_preferences_user_id": {
+ "name": "user_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_roles_id": {
+ "name": "user_roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_workspaces": {
+ "name": "user_workspaces",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_workspaces_id": {
+ "name": "user_workspaces_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('openid email profile')"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "users_id": {
+ "name": "users_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_profiles_id": {
+ "name": "vault_profiles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_tokens_id": {
+ "name": "vault_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('preferred')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "webauthn_credentials_id": {
+ "name": "webauthn_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ }
+ },
+ "views": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "tables": {},
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/mysql/meta/0011_snapshot.json b/drizzle/mysql/meta/0011_snapshot.json
new file mode 100644
index 0000000..5c0040f
--- /dev/null
+++ b/drizzle/mysql/meta/0011_snapshot.json
@@ -0,0 +1,7639 @@
+{
+ "version": "5",
+ "dialect": "mysql",
+ "id": "b39562dc-20f4-4c06-99d8-ab57622376c7",
+ "prevId": "62dd3143-9a1c-472b-907b-ccefa7973916",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('warning')"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_alert_firings_rule": {
+ "name": "idx_alert_firings_rule",
+ "columns": [
+ "rule_id",
+ "fired_at"
+ ],
+ "isUnique": false
+ },
+ "idx_alert_firings_host": {
+ "name": "idx_alert_firings_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_firings_id": {
+ "name": "alert_firings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rule_channels_id": {
+ "name": "alert_rule_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rules_id": {
+ "name": "alert_rules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {
+ "idx_api_keys_user_id": {
+ "name": "idx_api_keys_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "api_keys_id": {
+ "name": "api_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_audit_logs_timestamp": {
+ "name": "idx_audit_logs_timestamp",
+ "columns": [
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_user_ts": {
+ "name": "idx_audit_logs_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_action_ts": {
+ "name": "idx_audit_logs_action_ts",
+ "columns": [
+ "action",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_resource_ts": {
+ "name": "idx_audit_logs_resource_ts",
+ "columns": [
+ "resource_type",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "audit_logs_id": {
+ "name": "audit_logs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "c2s_tunnel_presets_id": {
+ "name": "c2s_tunnel_presets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_command_history_user_host": {
+ "name": "idx_command_history_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "command_history_id": {
+ "name": "command_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "credential_sidebar_preferences_user_id": {
+ "name": "credential_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dashboard_service_links_id": {
+ "name": "dashboard_service_links_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_dismissed_alerts_user_id": {
+ "name": "idx_dismissed_alerts_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dismissed_alerts_id": {
+ "name": "dismissed_alerts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_pinned_user": {
+ "name": "idx_file_manager_pinned_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_pinned_id": {
+ "name": "file_manager_pinned_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_recent_user": {
+ "name": "idx_file_manager_recent_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_recent_id": {
+ "name": "file_manager_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_shortcuts_user": {
+ "name": "idx_file_manager_shortcuts_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_shortcuts_id": {
+ "name": "file_manager_shortcuts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "idx_fleet_inventory_user": {
+ "name": "idx_fleet_inventory_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_inventory_id": {
+ "name": "fleet_inventory_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ },
+ "idx_fleet_members_host": {
+ "name": "idx_fleet_members_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_members_id": {
+ "name": "fleet_members_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleets_id": {
+ "name": "fleets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_homepage_items_user_id": {
+ "name": "idx_homepage_items_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_items_id": {
+ "name": "homepage_items_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_layouts_id": {
+ "name": "homepage_layouts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('connect')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_host_access_user_id": {
+ "name": "idx_host_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_role_id": {
+ "name": "idx_host_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_host_id": {
+ "name": "idx_host_access_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_expires_at": {
+ "name": "idx_host_access_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_access_id": {
+ "name": "host_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_checks_id": {
+ "name": "host_health_checks_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_history_id": {
+ "name": "host_health_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_history_id": {
+ "name": "host_metrics_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_preferences_id": {
+ "name": "host_metrics_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_sidebar_preferences_user_id": {
+ "name": "host_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('ssh')"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('sha256')"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_data_user_id": {
+ "name": "idx_ssh_data_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_parent_host": {
+ "name": "idx_ssh_data_parent_host",
+ "columns": [
+ "parent_host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_credential": {
+ "name": "idx_ssh_data_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_data_id": {
+ "name": "ssh_data_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "network_topology_id": {
+ "name": "network_topology_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "notification_channels_id": {
+ "name": "notification_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "opkssh_tokens_id": {
+ "name": "opkssh_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_node_history_id": {
+ "name": "proxmox_node_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_stats_preferences_id": {
+ "name": "proxmox_stats_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_recent_activity_user_ts": {
+ "name": "idx_recent_activity_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "recent_activity_id": {
+ "name": "recent_activity_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "roles_id": {
+ "name": "roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('text')"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_session_recordings_user_started": {
+ "name": "idx_session_recordings_user_started",
+ "columns": [
+ "user_id",
+ "started_at"
+ ],
+ "isUnique": false
+ },
+ "idx_session_recordings_host": {
+ "name": "idx_session_recordings_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_recordings_id": {
+ "name": "session_recordings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_share_participants_id": {
+ "name": "session_share_participants_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('read-only')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_session_shares_session_id": {
+ "name": "idx_session_shares_session_id",
+ "columns": [
+ "session_id"
+ ],
+ "isUnique": false
+ },
+ "idx_session_shares_host_id": {
+ "name": "idx_session_shares_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_shares_id": {
+ "name": "session_shares_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_sessions_user_id": {
+ "name": "idx_sessions_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_sessions_expires_at": {
+ "name": "idx_sessions_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sessions_id": {
+ "name": "sessions_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "settings_key": {
+ "name": "settings_key",
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_auth_overrides_id": {
+ "name": "shared_host_auth_overrides_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('credential')"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_secrets_id": {
+ "name": "shared_host_secrets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('view')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_snippet_access_user_id": {
+ "name": "idx_snippet_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_snippet_access_snippet_id": {
+ "name": "idx_snippet_access_snippet_id",
+ "columns": [
+ "snippet_id"
+ ],
+ "isUnique": false
+ },
+ "idx_snippet_access_role_id": {
+ "name": "idx_snippet_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_access_id": {
+ "name": "snippet_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_folders_id": {
+ "name": "snippet_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_snippets_user_id": {
+ "name": "idx_snippets_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippets_id": {
+ "name": "snippets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credential_usage_credential": {
+ "name": "idx_ssh_credential_usage_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_credential_usage_user": {
+ "name": "idx_ssh_credential_usage_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credential_usage_id": {
+ "name": "ssh_credential_usage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credentials_user_id": {
+ "name": "idx_ssh_credentials_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credentials_id": {
+ "name": "ssh_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_folders_user_id": {
+ "name": "idx_ssh_folders_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_folders_id": {
+ "name": "ssh_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "sso_providers_id": {
+ "name": "sso_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sync_tombstones_id": {
+ "name": "sync_tombstones_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identities_id": {
+ "name": "termix_identities_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_ca_id": {
+ "name": "termix_identity_ca_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_keys_id": {
+ "name": "termix_identity_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tmux_session_tags_id": {
+ "name": "tmux_session_tags_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_transfer_recent_user": {
+ "name": "idx_transfer_recent_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "transfer_recent_id": {
+ "name": "transfer_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_trusted_devices_user_id": {
+ "name": "idx_trusted_devices_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "trusted_devices_id": {
+ "name": "trusted_devices_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ui_preferences": {
+ "name": "ui_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ui_preferences_user_id_users_id_fk": {
+ "name": "ui_preferences_user_id_users_id_fk",
+ "tableFrom": "ui_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ui_preferences_user_id": {
+ "name": "ui_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_open_tabs_user_id": {
+ "name": "idx_user_open_tabs_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_open_tabs_id": {
+ "name": "user_open_tabs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_preferences_user_id": {
+ "name": "user_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ },
+ "idx_user_roles_role_id": {
+ "name": "idx_user_roles_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_roles_id": {
+ "name": "user_roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_workspaces": {
+ "name": "user_workspaces",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_user_workspaces_user_id": {
+ "name": "idx_user_workspaces_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_workspaces_id": {
+ "name": "user_workspaces_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('openid email profile')"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "users_id": {
+ "name": "users_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_profiles_id": {
+ "name": "vault_profiles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_tokens_id": {
+ "name": "vault_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('preferred')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "webauthn_credentials_id": {
+ "name": "webauthn_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ }
+ },
+ "views": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "tables": {},
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/mysql/meta/0012_snapshot.json b/drizzle/mysql/meta/0012_snapshot.json
new file mode 100644
index 0000000..07beae3
--- /dev/null
+++ b/drizzle/mysql/meta/0012_snapshot.json
@@ -0,0 +1,8758 @@
+{
+ "version": "5",
+ "dialect": "mysql",
+ "id": "a615700d-8b91-4e11-abcd-a35ab807904d",
+ "prevId": "b39562dc-20f4-4c06-99d8-ab57622376c7",
+ "tables": {
+ "ai_conversations": {
+ "name": "ai_conversations",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ai_conversations_user": {
+ "name": "idx_ai_conversations_user",
+ "columns": [
+ "user_id",
+ "updated_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_conversations_user_id_users_id_fk": {
+ "name": "ai_conversations_user_id_users_id_fk",
+ "tableFrom": "ai_conversations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ai_conversations_id": {
+ "name": "ai_conversations_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ai_messages": {
+ "name": "ai_messages",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('')"
+ },
+ "tool_calls": {
+ "name": "tool_calls",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ai_messages_conversation": {
+ "name": "idx_ai_messages_conversation",
+ "columns": [
+ "conversation_id",
+ "created_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_messages_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_messages_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_messages",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ai_messages_id": {
+ "name": "ai_messages_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ai_proposals": {
+ "name": "ai_proposals",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'pending'"
+ },
+ "applied_at": {
+ "name": "applied_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "result_summary": {
+ "name": "result_summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ai_proposals_user": {
+ "name": "idx_ai_proposals_user",
+ "columns": [
+ "user_id",
+ "status"
+ ],
+ "isUnique": false
+ },
+ "idx_ai_proposals_conversation": {
+ "name": "idx_ai_proposals_conversation",
+ "columns": [
+ "conversation_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_proposals_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_proposals_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ai_proposals_user_id_users_id_fk": {
+ "name": "ai_proposals_user_id_users_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ai_proposals_id": {
+ "name": "ai_proposals_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ai_providers": {
+ "name": "ai_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "provider_type": {
+ "name": "provider_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "base_url": {
+ "name": "base_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "api_key": {
+ "name": "api_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "api_key_prefix": {
+ "name": "api_key_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "default_model": {
+ "name": "default_model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ai_providers_user_label": {
+ "name": "idx_ai_providers_user_label",
+ "columns": [
+ "user_id",
+ "label"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ai_providers_user_id_users_id_fk": {
+ "name": "ai_providers_user_id_users_id_fk",
+ "tableFrom": "ai_providers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ai_providers_id": {
+ "name": "ai_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('warning')"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_alert_firings_rule": {
+ "name": "idx_alert_firings_rule",
+ "columns": [
+ "rule_id",
+ "fired_at"
+ ],
+ "isUnique": false
+ },
+ "idx_alert_firings_host": {
+ "name": "idx_alert_firings_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_firings_id": {
+ "name": "alert_firings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rule_channels_id": {
+ "name": "alert_rule_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rules_id": {
+ "name": "alert_rules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {
+ "idx_api_keys_user_id": {
+ "name": "idx_api_keys_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "api_keys_id": {
+ "name": "api_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_audit_logs_timestamp": {
+ "name": "idx_audit_logs_timestamp",
+ "columns": [
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_user_ts": {
+ "name": "idx_audit_logs_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_action_ts": {
+ "name": "idx_audit_logs_action_ts",
+ "columns": [
+ "action",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_resource_ts": {
+ "name": "idx_audit_logs_resource_ts",
+ "columns": [
+ "resource_type",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "audit_logs_id": {
+ "name": "audit_logs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automation_channels": {
+ "name": "automation_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_channels_pair": {
+ "name": "idx_automation_channels_pair",
+ "columns": [
+ "automation_id",
+ "channel_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "automation_channels_automation_id_automations_id_fk": {
+ "name": "automation_channels_automation_id_automations_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_channels_channel_id_notification_channels_id_fk": {
+ "name": "automation_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automation_channels_id": {
+ "name": "automation_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automation_run_steps": {
+ "name": "automation_run_steps",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "run_id": {
+ "name": "run_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_index": {
+ "name": "step_index",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_id": {
+ "name": "step_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_type": {
+ "name": "step_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "output": {
+ "name": "output",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "truncated": {
+ "name": "truncated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_automation_run_steps_run": {
+ "name": "idx_automation_run_steps_run",
+ "columns": [
+ "run_id",
+ "step_index"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_run_steps_run_id_automation_runs_id_fk": {
+ "name": "automation_run_steps_run_id_automation_runs_id_fk",
+ "tableFrom": "automation_run_steps",
+ "tableTo": "automation_runs",
+ "columnsFrom": [
+ "run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automation_run_steps_id": {
+ "name": "automation_run_steps_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automation_runs": {
+ "name": "automation_runs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "trigger_context": {
+ "name": "trigger_context",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration_ms": {
+ "name": "duration_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "parent_run_id": {
+ "name": "parent_run_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_runs_automation": {
+ "name": "idx_automation_runs_automation",
+ "columns": [
+ "automation_id",
+ "started_at"
+ ],
+ "isUnique": false
+ },
+ "idx_automation_runs_user": {
+ "name": "idx_automation_runs_user",
+ "columns": [
+ "user_id",
+ "started_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_runs_automation_id_automations_id_fk": {
+ "name": "automation_runs_automation_id_automations_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_runs_user_id_users_id_fk": {
+ "name": "automation_runs_user_id_users_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automation_runs_id": {
+ "name": "automation_runs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automation_schedules": {
+ "name": "automation_schedules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "cron": {
+ "name": "cron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "next_due_at": {
+ "name": "next_due_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_tick_at": {
+ "name": "last_tick_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_schedules_automation": {
+ "name": "idx_automation_schedules_automation",
+ "columns": [
+ "automation_id"
+ ],
+ "isUnique": true
+ },
+ "idx_automation_schedules_due": {
+ "name": "idx_automation_schedules_due",
+ "columns": [
+ "next_due_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_schedules_automation_id_automations_id_fk": {
+ "name": "automation_schedules_automation_id_automations_id_fk",
+ "tableFrom": "automation_schedules",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automation_schedules_id": {
+ "name": "automation_schedules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automation_trigger_state": {
+ "name": "automation_trigger_state",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "state_key": {
+ "name": "state_key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "breach_started_at": {
+ "name": "breach_started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_fired_at": {
+ "name": "last_fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_value": {
+ "name": "last_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_observed_state": {
+ "name": "last_observed_state",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_automation_trigger_state_key": {
+ "name": "idx_automation_trigger_state_key",
+ "columns": [
+ "automation_id",
+ "state_key"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "automation_trigger_state_automation_id_automations_id_fk": {
+ "name": "automation_trigger_state_automation_id_automations_id_fk",
+ "tableFrom": "automation_trigger_state",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automation_trigger_state_id": {
+ "name": "automation_trigger_state_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automations": {
+ "name": "automations",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "definition": {
+ "name": "definition",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "definition_version": {
+ "name": "definition_version",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "concurrency_policy": {
+ "name": "concurrency_policy",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('skip')"
+ },
+ "max_run_seconds": {
+ "name": "max_run_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "last_run_at": {
+ "name": "last_run_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_run_status": {
+ "name": "last_run_status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_automations_user": {
+ "name": "idx_automations_user",
+ "columns": [
+ "user_id",
+ "enabled"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automations_user_id_users_id_fk": {
+ "name": "automations_user_id_users_id_fk",
+ "tableFrom": "automations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automations_id": {
+ "name": "automations_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "c2s_tunnel_presets_id": {
+ "name": "c2s_tunnel_presets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_command_history_user_host": {
+ "name": "idx_command_history_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "command_history_id": {
+ "name": "command_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "credential_sidebar_preferences_user_id": {
+ "name": "credential_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dashboard_service_links_id": {
+ "name": "dashboard_service_links_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_dismissed_alerts_user_id": {
+ "name": "idx_dismissed_alerts_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dismissed_alerts_id": {
+ "name": "dismissed_alerts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_pinned_user": {
+ "name": "idx_file_manager_pinned_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_pinned_id": {
+ "name": "file_manager_pinned_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_recent_user": {
+ "name": "idx_file_manager_recent_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_recent_id": {
+ "name": "file_manager_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_shortcuts_user": {
+ "name": "idx_file_manager_shortcuts_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_shortcuts_id": {
+ "name": "file_manager_shortcuts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "idx_fleet_inventory_user": {
+ "name": "idx_fleet_inventory_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_inventory_id": {
+ "name": "fleet_inventory_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ },
+ "idx_fleet_members_host": {
+ "name": "idx_fleet_members_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_members_id": {
+ "name": "fleet_members_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleets_id": {
+ "name": "fleets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_homepage_items_user_id": {
+ "name": "idx_homepage_items_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_items_id": {
+ "name": "homepage_items_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_layouts_id": {
+ "name": "homepage_layouts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('connect')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_host_access_user_id": {
+ "name": "idx_host_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_role_id": {
+ "name": "idx_host_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_host_id": {
+ "name": "idx_host_access_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_expires_at": {
+ "name": "idx_host_access_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_access_id": {
+ "name": "host_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_checks_id": {
+ "name": "host_health_checks_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_history_id": {
+ "name": "host_health_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_history_id": {
+ "name": "host_metrics_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_preferences_id": {
+ "name": "host_metrics_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_sidebar_preferences_user_id": {
+ "name": "host_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('ssh')"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('sha256')"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_data_user_id": {
+ "name": "idx_ssh_data_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_parent_host": {
+ "name": "idx_ssh_data_parent_host",
+ "columns": [
+ "parent_host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_credential": {
+ "name": "idx_ssh_data_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_data_id": {
+ "name": "ssh_data_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "network_topology_id": {
+ "name": "network_topology_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "notification_channels_id": {
+ "name": "notification_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "opkssh_tokens_id": {
+ "name": "opkssh_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_node_history_id": {
+ "name": "proxmox_node_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_stats_preferences_id": {
+ "name": "proxmox_stats_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_recent_activity_user_ts": {
+ "name": "idx_recent_activity_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "recent_activity_id": {
+ "name": "recent_activity_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "roles_id": {
+ "name": "roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('text')"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_session_recordings_user_started": {
+ "name": "idx_session_recordings_user_started",
+ "columns": [
+ "user_id",
+ "started_at"
+ ],
+ "isUnique": false
+ },
+ "idx_session_recordings_host": {
+ "name": "idx_session_recordings_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_recordings_id": {
+ "name": "session_recordings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_share_participants_id": {
+ "name": "session_share_participants_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('read-only')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_session_shares_session_id": {
+ "name": "idx_session_shares_session_id",
+ "columns": [
+ "session_id"
+ ],
+ "isUnique": false
+ },
+ "idx_session_shares_host_id": {
+ "name": "idx_session_shares_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_shares_id": {
+ "name": "session_shares_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_sessions_user_id": {
+ "name": "idx_sessions_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_sessions_expires_at": {
+ "name": "idx_sessions_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sessions_id": {
+ "name": "sessions_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "settings_key": {
+ "name": "settings_key",
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_auth_overrides_id": {
+ "name": "shared_host_auth_overrides_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('credential')"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_secrets_id": {
+ "name": "shared_host_secrets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('view')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_snippet_access_user_id": {
+ "name": "idx_snippet_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_snippet_access_snippet_id": {
+ "name": "idx_snippet_access_snippet_id",
+ "columns": [
+ "snippet_id"
+ ],
+ "isUnique": false
+ },
+ "idx_snippet_access_role_id": {
+ "name": "idx_snippet_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_access_id": {
+ "name": "snippet_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_folders_id": {
+ "name": "snippet_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_snippets_user_id": {
+ "name": "idx_snippets_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippets_id": {
+ "name": "snippets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credential_usage_credential": {
+ "name": "idx_ssh_credential_usage_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_credential_usage_user": {
+ "name": "idx_ssh_credential_usage_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credential_usage_id": {
+ "name": "ssh_credential_usage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credentials_user_id": {
+ "name": "idx_ssh_credentials_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credentials_id": {
+ "name": "ssh_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_folders_user_id": {
+ "name": "idx_ssh_folders_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_folders_id": {
+ "name": "ssh_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "sso_providers_id": {
+ "name": "sso_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sync_tombstones_id": {
+ "name": "sync_tombstones_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identities_id": {
+ "name": "termix_identities_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_ca_id": {
+ "name": "termix_identity_ca_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_keys_id": {
+ "name": "termix_identity_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tmux_session_tags_id": {
+ "name": "tmux_session_tags_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_transfer_recent_user": {
+ "name": "idx_transfer_recent_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "transfer_recent_id": {
+ "name": "transfer_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_trusted_devices_user_id": {
+ "name": "idx_trusted_devices_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "trusted_devices_id": {
+ "name": "trusted_devices_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ui_preferences": {
+ "name": "ui_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ui_preferences_user_id_users_id_fk": {
+ "name": "ui_preferences_user_id_users_id_fk",
+ "tableFrom": "ui_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ui_preferences_user_id": {
+ "name": "ui_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_open_tabs_user_id": {
+ "name": "idx_user_open_tabs_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_open_tabs_id": {
+ "name": "user_open_tabs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ai_assistant_enabled": {
+ "name": "ai_assistant_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ai_read_only_commands": {
+ "name": "ai_read_only_commands",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_preferences_user_id": {
+ "name": "user_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ },
+ "idx_user_roles_role_id": {
+ "name": "idx_user_roles_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_roles_id": {
+ "name": "user_roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_workspaces": {
+ "name": "user_workspaces",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_user_workspaces_user_id": {
+ "name": "idx_user_workspaces_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_workspaces_id": {
+ "name": "user_workspaces_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('openid email profile')"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "users_id": {
+ "name": "users_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_profiles_id": {
+ "name": "vault_profiles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_tokens_id": {
+ "name": "vault_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('preferred')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "webauthn_credentials_id": {
+ "name": "webauthn_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ }
+ },
+ "views": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "tables": {},
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/mysql/meta/0013_snapshot.json b/drizzle/mysql/meta/0013_snapshot.json
new file mode 100644
index 0000000..51223dd
--- /dev/null
+++ b/drizzle/mysql/meta/0013_snapshot.json
@@ -0,0 +1,8772 @@
+{
+ "version": "5",
+ "dialect": "mysql",
+ "id": "1ec357eb-b3c9-4025-937a-981e6479f867",
+ "prevId": "a615700d-8b91-4e11-abcd-a35ab807904d",
+ "tables": {
+ "ai_conversations": {
+ "name": "ai_conversations",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ai_conversations_user": {
+ "name": "idx_ai_conversations_user",
+ "columns": [
+ "user_id",
+ "updated_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_conversations_user_id_users_id_fk": {
+ "name": "ai_conversations_user_id_users_id_fk",
+ "tableFrom": "ai_conversations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ai_conversations_id": {
+ "name": "ai_conversations_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ai_messages": {
+ "name": "ai_messages",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('')"
+ },
+ "tool_calls": {
+ "name": "tool_calls",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ai_messages_conversation": {
+ "name": "idx_ai_messages_conversation",
+ "columns": [
+ "conversation_id",
+ "created_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_messages_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_messages_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_messages",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ai_messages_id": {
+ "name": "ai_messages_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ai_proposals": {
+ "name": "ai_proposals",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'pending'"
+ },
+ "applied_at": {
+ "name": "applied_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "result_summary": {
+ "name": "result_summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ai_proposals_user": {
+ "name": "idx_ai_proposals_user",
+ "columns": [
+ "user_id",
+ "status"
+ ],
+ "isUnique": false
+ },
+ "idx_ai_proposals_conversation": {
+ "name": "idx_ai_proposals_conversation",
+ "columns": [
+ "conversation_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_proposals_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_proposals_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ai_proposals_user_id_users_id_fk": {
+ "name": "ai_proposals_user_id_users_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ai_proposals_id": {
+ "name": "ai_proposals_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ai_providers": {
+ "name": "ai_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "provider_type": {
+ "name": "provider_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "base_url": {
+ "name": "base_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "api_key": {
+ "name": "api_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "api_key_prefix": {
+ "name": "api_key_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "default_model": {
+ "name": "default_model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ai_providers_user_label": {
+ "name": "idx_ai_providers_user_label",
+ "columns": [
+ "user_id",
+ "label"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ai_providers_user_id_users_id_fk": {
+ "name": "ai_providers_user_id_users_id_fk",
+ "tableFrom": "ai_providers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ai_providers_id": {
+ "name": "ai_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('warning')"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_alert_firings_rule": {
+ "name": "idx_alert_firings_rule",
+ "columns": [
+ "rule_id",
+ "fired_at"
+ ],
+ "isUnique": false
+ },
+ "idx_alert_firings_host": {
+ "name": "idx_alert_firings_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_firings_id": {
+ "name": "alert_firings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rule_channels_id": {
+ "name": "alert_rule_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rules_id": {
+ "name": "alert_rules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {
+ "idx_api_keys_user_id": {
+ "name": "idx_api_keys_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "api_keys_id": {
+ "name": "api_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_audit_logs_timestamp": {
+ "name": "idx_audit_logs_timestamp",
+ "columns": [
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_user_ts": {
+ "name": "idx_audit_logs_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_action_ts": {
+ "name": "idx_audit_logs_action_ts",
+ "columns": [
+ "action",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_resource_ts": {
+ "name": "idx_audit_logs_resource_ts",
+ "columns": [
+ "resource_type",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "audit_logs_id": {
+ "name": "audit_logs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automation_channels": {
+ "name": "automation_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_channels_pair": {
+ "name": "idx_automation_channels_pair",
+ "columns": [
+ "automation_id",
+ "channel_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "automation_channels_automation_id_automations_id_fk": {
+ "name": "automation_channels_automation_id_automations_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_channels_channel_id_notification_channels_id_fk": {
+ "name": "automation_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automation_channels_id": {
+ "name": "automation_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automation_run_steps": {
+ "name": "automation_run_steps",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "run_id": {
+ "name": "run_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_index": {
+ "name": "step_index",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_id": {
+ "name": "step_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_type": {
+ "name": "step_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "output": {
+ "name": "output",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "truncated": {
+ "name": "truncated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_automation_run_steps_run": {
+ "name": "idx_automation_run_steps_run",
+ "columns": [
+ "run_id",
+ "step_index"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_run_steps_run_id_automation_runs_id_fk": {
+ "name": "automation_run_steps_run_id_automation_runs_id_fk",
+ "tableFrom": "automation_run_steps",
+ "tableTo": "automation_runs",
+ "columnsFrom": [
+ "run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automation_run_steps_id": {
+ "name": "automation_run_steps_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automation_runs": {
+ "name": "automation_runs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "trigger_context": {
+ "name": "trigger_context",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration_ms": {
+ "name": "duration_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "parent_run_id": {
+ "name": "parent_run_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_runs_automation": {
+ "name": "idx_automation_runs_automation",
+ "columns": [
+ "automation_id",
+ "started_at"
+ ],
+ "isUnique": false
+ },
+ "idx_automation_runs_user": {
+ "name": "idx_automation_runs_user",
+ "columns": [
+ "user_id",
+ "started_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_runs_automation_id_automations_id_fk": {
+ "name": "automation_runs_automation_id_automations_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_runs_user_id_users_id_fk": {
+ "name": "automation_runs_user_id_users_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automation_runs_id": {
+ "name": "automation_runs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automation_schedules": {
+ "name": "automation_schedules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "cron": {
+ "name": "cron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "next_due_at": {
+ "name": "next_due_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_tick_at": {
+ "name": "last_tick_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_schedules_automation": {
+ "name": "idx_automation_schedules_automation",
+ "columns": [
+ "automation_id"
+ ],
+ "isUnique": true
+ },
+ "idx_automation_schedules_due": {
+ "name": "idx_automation_schedules_due",
+ "columns": [
+ "next_due_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_schedules_automation_id_automations_id_fk": {
+ "name": "automation_schedules_automation_id_automations_id_fk",
+ "tableFrom": "automation_schedules",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automation_schedules_id": {
+ "name": "automation_schedules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automation_trigger_state": {
+ "name": "automation_trigger_state",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "state_key": {
+ "name": "state_key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "breach_started_at": {
+ "name": "breach_started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_fired_at": {
+ "name": "last_fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_value": {
+ "name": "last_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_observed_state": {
+ "name": "last_observed_state",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_automation_trigger_state_key": {
+ "name": "idx_automation_trigger_state_key",
+ "columns": [
+ "automation_id",
+ "state_key"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "automation_trigger_state_automation_id_automations_id_fk": {
+ "name": "automation_trigger_state_automation_id_automations_id_fk",
+ "tableFrom": "automation_trigger_state",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automation_trigger_state_id": {
+ "name": "automation_trigger_state_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automations": {
+ "name": "automations",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "definition": {
+ "name": "definition",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "definition_version": {
+ "name": "definition_version",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "concurrency_policy": {
+ "name": "concurrency_policy",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('skip')"
+ },
+ "max_run_seconds": {
+ "name": "max_run_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "last_run_at": {
+ "name": "last_run_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_run_status": {
+ "name": "last_run_status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_automations_user": {
+ "name": "idx_automations_user",
+ "columns": [
+ "user_id",
+ "enabled"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automations_user_id_users_id_fk": {
+ "name": "automations_user_id_users_id_fk",
+ "tableFrom": "automations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automations_id": {
+ "name": "automations_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "c2s_tunnel_presets_id": {
+ "name": "c2s_tunnel_presets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_command_history_user_host": {
+ "name": "idx_command_history_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "command_history_id": {
+ "name": "command_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "credential_sidebar_preferences_user_id": {
+ "name": "credential_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dashboard_service_links_id": {
+ "name": "dashboard_service_links_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_dismissed_alerts_user_id": {
+ "name": "idx_dismissed_alerts_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dismissed_alerts_id": {
+ "name": "dismissed_alerts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_pinned_user": {
+ "name": "idx_file_manager_pinned_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_pinned_id": {
+ "name": "file_manager_pinned_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_recent_user": {
+ "name": "idx_file_manager_recent_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_recent_id": {
+ "name": "file_manager_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_shortcuts_user": {
+ "name": "idx_file_manager_shortcuts_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_shortcuts_id": {
+ "name": "file_manager_shortcuts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "idx_fleet_inventory_user": {
+ "name": "idx_fleet_inventory_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_inventory_id": {
+ "name": "fleet_inventory_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ },
+ "idx_fleet_members_host": {
+ "name": "idx_fleet_members_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_members_id": {
+ "name": "fleet_members_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleets_id": {
+ "name": "fleets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_homepage_items_user_id": {
+ "name": "idx_homepage_items_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_items_id": {
+ "name": "homepage_items_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_layouts_id": {
+ "name": "homepage_layouts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('connect')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_host_access_user_id": {
+ "name": "idx_host_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_role_id": {
+ "name": "idx_host_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_host_id": {
+ "name": "idx_host_access_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_expires_at": {
+ "name": "idx_host_access_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_access_id": {
+ "name": "host_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_checks_id": {
+ "name": "host_health_checks_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_history_id": {
+ "name": "host_health_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_history_id": {
+ "name": "host_metrics_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_preferences_id": {
+ "name": "host_metrics_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_sidebar_preferences_user_id": {
+ "name": "host_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('ssh')"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('sha256')"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_data_user_id": {
+ "name": "idx_ssh_data_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_parent_host": {
+ "name": "idx_ssh_data_parent_host",
+ "columns": [
+ "parent_host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_credential": {
+ "name": "idx_ssh_data_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_data_id": {
+ "name": "ssh_data_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "network_topology_id": {
+ "name": "network_topology_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "notification_channels_id": {
+ "name": "notification_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "opkssh_tokens_id": {
+ "name": "opkssh_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_node_history_id": {
+ "name": "proxmox_node_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_stats_preferences_id": {
+ "name": "proxmox_stats_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_recent_activity_user_ts": {
+ "name": "idx_recent_activity_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "recent_activity_id": {
+ "name": "recent_activity_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "roles_id": {
+ "name": "roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('text')"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_session_recordings_user_started": {
+ "name": "idx_session_recordings_user_started",
+ "columns": [
+ "user_id",
+ "started_at"
+ ],
+ "isUnique": false
+ },
+ "idx_session_recordings_host": {
+ "name": "idx_session_recordings_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_recordings_id": {
+ "name": "session_recordings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_share_participants_id": {
+ "name": "session_share_participants_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('read-only')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_session_shares_session_id": {
+ "name": "idx_session_shares_session_id",
+ "columns": [
+ "session_id"
+ ],
+ "isUnique": false
+ },
+ "idx_session_shares_host_id": {
+ "name": "idx_session_shares_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_shares_id": {
+ "name": "session_shares_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_sessions_user_id": {
+ "name": "idx_sessions_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_sessions_expires_at": {
+ "name": "idx_sessions_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sessions_id": {
+ "name": "sessions_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "settings_key": {
+ "name": "settings_key",
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_auth_overrides_id": {
+ "name": "shared_host_auth_overrides_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('credential')"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_secrets_id": {
+ "name": "shared_host_secrets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('view')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_snippet_access_user_id": {
+ "name": "idx_snippet_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_snippet_access_snippet_id": {
+ "name": "idx_snippet_access_snippet_id",
+ "columns": [
+ "snippet_id"
+ ],
+ "isUnique": false
+ },
+ "idx_snippet_access_role_id": {
+ "name": "idx_snippet_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_access_id": {
+ "name": "snippet_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_folders_id": {
+ "name": "snippet_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_snippets_user_id": {
+ "name": "idx_snippets_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippets_id": {
+ "name": "snippets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credential_usage_credential": {
+ "name": "idx_ssh_credential_usage_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_credential_usage_user": {
+ "name": "idx_ssh_credential_usage_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credential_usage_id": {
+ "name": "ssh_credential_usage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credentials_user_id": {
+ "name": "idx_ssh_credentials_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credentials_id": {
+ "name": "ssh_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_folders_user_id": {
+ "name": "idx_ssh_folders_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_folders_id": {
+ "name": "ssh_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "sso_providers_id": {
+ "name": "sso_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sync_tombstones_id": {
+ "name": "sync_tombstones_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identities_id": {
+ "name": "termix_identities_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_ca_id": {
+ "name": "termix_identity_ca_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_keys_id": {
+ "name": "termix_identity_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tmux_session_tags_id": {
+ "name": "tmux_session_tags_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_transfer_recent_user": {
+ "name": "idx_transfer_recent_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "transfer_recent_id": {
+ "name": "transfer_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_trusted_devices_user_id": {
+ "name": "idx_trusted_devices_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "trusted_devices_id": {
+ "name": "trusted_devices_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ui_preferences": {
+ "name": "ui_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ui_preferences_user_id_users_id_fk": {
+ "name": "ui_preferences_user_id_users_id_fk",
+ "tableFrom": "ui_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ui_preferences_user_id": {
+ "name": "ui_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_open_tabs_user_id": {
+ "name": "idx_user_open_tabs_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_open_tabs_id": {
+ "name": "user_open_tabs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ai_assistant_enabled": {
+ "name": "ai_assistant_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ai_read_only_commands": {
+ "name": "ai_read_only_commands",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_defaults": {
+ "name": "terminal_defaults",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_defaults": {
+ "name": "rdp_defaults",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_preferences_user_id": {
+ "name": "user_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ },
+ "idx_user_roles_role_id": {
+ "name": "idx_user_roles_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_roles_id": {
+ "name": "user_roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_workspaces": {
+ "name": "user_workspaces",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_user_workspaces_user_id": {
+ "name": "idx_user_workspaces_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_workspaces_id": {
+ "name": "user_workspaces_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('openid email profile')"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "users_id": {
+ "name": "users_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_profiles_id": {
+ "name": "vault_profiles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_tokens_id": {
+ "name": "vault_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('preferred')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "webauthn_credentials_id": {
+ "name": "webauthn_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ }
+ },
+ "views": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "tables": {},
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/mysql/meta/0014_snapshot.json b/drizzle/mysql/meta/0014_snapshot.json
new file mode 100644
index 0000000..4f633b3
--- /dev/null
+++ b/drizzle/mysql/meta/0014_snapshot.json
@@ -0,0 +1,8779 @@
+{
+ "version": "5",
+ "dialect": "mysql",
+ "id": "18a71d34-625b-452c-9035-b1b78df110f3",
+ "prevId": "1ec357eb-b3c9-4025-937a-981e6479f867",
+ "tables": {
+ "ai_conversations": {
+ "name": "ai_conversations",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ai_conversations_user": {
+ "name": "idx_ai_conversations_user",
+ "columns": [
+ "user_id",
+ "updated_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_conversations_user_id_users_id_fk": {
+ "name": "ai_conversations_user_id_users_id_fk",
+ "tableFrom": "ai_conversations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ai_conversations_id": {
+ "name": "ai_conversations_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ai_messages": {
+ "name": "ai_messages",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('')"
+ },
+ "tool_calls": {
+ "name": "tool_calls",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ai_messages_conversation": {
+ "name": "idx_ai_messages_conversation",
+ "columns": [
+ "conversation_id",
+ "created_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_messages_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_messages_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_messages",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ai_messages_id": {
+ "name": "ai_messages_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ai_proposals": {
+ "name": "ai_proposals",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'pending'"
+ },
+ "applied_at": {
+ "name": "applied_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "result_summary": {
+ "name": "result_summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ai_proposals_user": {
+ "name": "idx_ai_proposals_user",
+ "columns": [
+ "user_id",
+ "status"
+ ],
+ "isUnique": false
+ },
+ "idx_ai_proposals_conversation": {
+ "name": "idx_ai_proposals_conversation",
+ "columns": [
+ "conversation_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_proposals_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_proposals_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ai_proposals_user_id_users_id_fk": {
+ "name": "ai_proposals_user_id_users_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ai_proposals_id": {
+ "name": "ai_proposals_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ai_providers": {
+ "name": "ai_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "provider_type": {
+ "name": "provider_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "base_url": {
+ "name": "base_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "api_key": {
+ "name": "api_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "api_key_prefix": {
+ "name": "api_key_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "default_model": {
+ "name": "default_model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ai_providers_user_label": {
+ "name": "idx_ai_providers_user_label",
+ "columns": [
+ "user_id",
+ "label"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ai_providers_user_id_users_id_fk": {
+ "name": "ai_providers_user_id_users_id_fk",
+ "tableFrom": "ai_providers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ai_providers_id": {
+ "name": "ai_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('warning')"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_alert_firings_rule": {
+ "name": "idx_alert_firings_rule",
+ "columns": [
+ "rule_id",
+ "fired_at"
+ ],
+ "isUnique": false
+ },
+ "idx_alert_firings_host": {
+ "name": "idx_alert_firings_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_firings_id": {
+ "name": "alert_firings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rule_channels_id": {
+ "name": "alert_rule_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "alert_rules_id": {
+ "name": "alert_rules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {
+ "idx_api_keys_user_id": {
+ "name": "idx_api_keys_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "api_keys_id": {
+ "name": "api_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_audit_logs_timestamp": {
+ "name": "idx_audit_logs_timestamp",
+ "columns": [
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_user_ts": {
+ "name": "idx_audit_logs_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_action_ts": {
+ "name": "idx_audit_logs_action_ts",
+ "columns": [
+ "action",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_resource_ts": {
+ "name": "idx_audit_logs_resource_ts",
+ "columns": [
+ "resource_type",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "audit_logs_id": {
+ "name": "audit_logs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automation_channels": {
+ "name": "automation_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_channels_pair": {
+ "name": "idx_automation_channels_pair",
+ "columns": [
+ "automation_id",
+ "channel_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "automation_channels_automation_id_automations_id_fk": {
+ "name": "automation_channels_automation_id_automations_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_channels_channel_id_notification_channels_id_fk": {
+ "name": "automation_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automation_channels_id": {
+ "name": "automation_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automation_run_steps": {
+ "name": "automation_run_steps",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "run_id": {
+ "name": "run_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_index": {
+ "name": "step_index",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_id": {
+ "name": "step_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_type": {
+ "name": "step_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "output": {
+ "name": "output",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "truncated": {
+ "name": "truncated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_automation_run_steps_run": {
+ "name": "idx_automation_run_steps_run",
+ "columns": [
+ "run_id",
+ "step_index"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_run_steps_run_id_automation_runs_id_fk": {
+ "name": "automation_run_steps_run_id_automation_runs_id_fk",
+ "tableFrom": "automation_run_steps",
+ "tableTo": "automation_runs",
+ "columnsFrom": [
+ "run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automation_run_steps_id": {
+ "name": "automation_run_steps_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automation_runs": {
+ "name": "automation_runs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "trigger_context": {
+ "name": "trigger_context",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration_ms": {
+ "name": "duration_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "parent_run_id": {
+ "name": "parent_run_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_runs_automation": {
+ "name": "idx_automation_runs_automation",
+ "columns": [
+ "automation_id",
+ "started_at"
+ ],
+ "isUnique": false
+ },
+ "idx_automation_runs_user": {
+ "name": "idx_automation_runs_user",
+ "columns": [
+ "user_id",
+ "started_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_runs_automation_id_automations_id_fk": {
+ "name": "automation_runs_automation_id_automations_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_runs_user_id_users_id_fk": {
+ "name": "automation_runs_user_id_users_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automation_runs_id": {
+ "name": "automation_runs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automation_schedules": {
+ "name": "automation_schedules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "cron": {
+ "name": "cron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "next_due_at": {
+ "name": "next_due_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_tick_at": {
+ "name": "last_tick_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_schedules_automation": {
+ "name": "idx_automation_schedules_automation",
+ "columns": [
+ "automation_id"
+ ],
+ "isUnique": true
+ },
+ "idx_automation_schedules_due": {
+ "name": "idx_automation_schedules_due",
+ "columns": [
+ "next_due_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_schedules_automation_id_automations_id_fk": {
+ "name": "automation_schedules_automation_id_automations_id_fk",
+ "tableFrom": "automation_schedules",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automation_schedules_id": {
+ "name": "automation_schedules_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automation_trigger_state": {
+ "name": "automation_trigger_state",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "state_key": {
+ "name": "state_key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "breach_started_at": {
+ "name": "breach_started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_fired_at": {
+ "name": "last_fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_value": {
+ "name": "last_value",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_observed_state": {
+ "name": "last_observed_state",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_automation_trigger_state_key": {
+ "name": "idx_automation_trigger_state_key",
+ "columns": [
+ "automation_id",
+ "state_key"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "automation_trigger_state_automation_id_automations_id_fk": {
+ "name": "automation_trigger_state_automation_id_automations_id_fk",
+ "tableFrom": "automation_trigger_state",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automation_trigger_state_id": {
+ "name": "automation_trigger_state_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "automations": {
+ "name": "automations",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "definition": {
+ "name": "definition",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "definition_version": {
+ "name": "definition_version",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "concurrency_policy": {
+ "name": "concurrency_policy",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('skip')"
+ },
+ "max_run_seconds": {
+ "name": "max_run_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "last_run_at": {
+ "name": "last_run_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_run_status": {
+ "name": "last_run_status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_automations_user": {
+ "name": "idx_automations_user",
+ "columns": [
+ "user_id",
+ "enabled"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automations_user_id_users_id_fk": {
+ "name": "automations_user_id_users_id_fk",
+ "tableFrom": "automations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "automations_id": {
+ "name": "automations_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "c2s_tunnel_presets_id": {
+ "name": "c2s_tunnel_presets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_command_history_user_host": {
+ "name": "idx_command_history_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "command_history_id": {
+ "name": "command_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "credential_sidebar_preferences_user_id": {
+ "name": "credential_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dashboard_service_links_id": {
+ "name": "dashboard_service_links_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_dismissed_alerts_user_id": {
+ "name": "idx_dismissed_alerts_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "dismissed_alerts_id": {
+ "name": "dismissed_alerts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_pinned_user": {
+ "name": "idx_file_manager_pinned_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_pinned_id": {
+ "name": "file_manager_pinned_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_recent_user": {
+ "name": "idx_file_manager_recent_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_recent_id": {
+ "name": "file_manager_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_shortcuts_user": {
+ "name": "idx_file_manager_shortcuts_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "file_manager_shortcuts_id": {
+ "name": "file_manager_shortcuts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "idx_fleet_inventory_user": {
+ "name": "idx_fleet_inventory_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_inventory_id": {
+ "name": "fleet_inventory_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ },
+ "idx_fleet_members_host": {
+ "name": "idx_fleet_members_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleet_members_id": {
+ "name": "fleet_members_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "fleets_id": {
+ "name": "fleets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_homepage_items_user_id": {
+ "name": "idx_homepage_items_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_items_id": {
+ "name": "homepage_items_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "homepage_layouts_id": {
+ "name": "homepage_layouts_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('connect')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_host_access_user_id": {
+ "name": "idx_host_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_role_id": {
+ "name": "idx_host_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_host_id": {
+ "name": "idx_host_access_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_expires_at": {
+ "name": "idx_host_access_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_access_id": {
+ "name": "host_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_checks_id": {
+ "name": "host_health_checks_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_health_history_id": {
+ "name": "host_health_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_history_id": {
+ "name": "host_metrics_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_metrics_preferences_id": {
+ "name": "host_metrics_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "host_sidebar_preferences_user_id": {
+ "name": "host_sidebar_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('ssh')"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('sha256')"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_data_user_id": {
+ "name": "idx_ssh_data_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_parent_host": {
+ "name": "idx_ssh_data_parent_host",
+ "columns": [
+ "parent_host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_credential": {
+ "name": "idx_ssh_data_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_data_id": {
+ "name": "ssh_data_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "network_topology_id": {
+ "name": "network_topology_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "notification_channels_id": {
+ "name": "notification_channels_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "opkssh_tokens_id": {
+ "name": "opkssh_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_node_history_id": {
+ "name": "proxmox_node_history_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "proxmox_stats_preferences_id": {
+ "name": "proxmox_stats_preferences_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_recent_activity_user_ts": {
+ "name": "idx_recent_activity_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "recent_activity_id": {
+ "name": "recent_activity_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "roles_id": {
+ "name": "roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('text')"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_session_recordings_user_started": {
+ "name": "idx_session_recordings_user_started",
+ "columns": [
+ "user_id",
+ "started_at"
+ ],
+ "isUnique": false
+ },
+ "idx_session_recordings_host": {
+ "name": "idx_session_recordings_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_recordings_id": {
+ "name": "session_recordings_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_share_participants_id": {
+ "name": "session_share_participants_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('read-only')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_session_shares_session_id": {
+ "name": "idx_session_shares_session_id",
+ "columns": [
+ "session_id"
+ ],
+ "isUnique": false
+ },
+ "idx_session_shares_host_id": {
+ "name": "idx_session_shares_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "session_shares_id": {
+ "name": "session_shares_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_sessions_user_id": {
+ "name": "idx_sessions_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_sessions_expires_at": {
+ "name": "idx_sessions_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sessions_id": {
+ "name": "sessions_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "settings_key": {
+ "name": "settings_key",
+ "columns": [
+ "key"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_auth_overrides_id": {
+ "name": "shared_host_auth_overrides_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('credential')"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "shared_host_secrets_id": {
+ "name": "shared_host_secrets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('view')"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_snippet_access_user_id": {
+ "name": "idx_snippet_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_snippet_access_snippet_id": {
+ "name": "idx_snippet_access_snippet_id",
+ "columns": [
+ "snippet_id"
+ ],
+ "isUnique": false
+ },
+ "idx_snippet_access_role_id": {
+ "name": "idx_snippet_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_access_id": {
+ "name": "snippet_access_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippet_folders_id": {
+ "name": "snippet_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_snippets_user_id": {
+ "name": "idx_snippets_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "snippets_id": {
+ "name": "snippets_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credential_usage_credential": {
+ "name": "idx_ssh_credential_usage_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_credential_usage_user": {
+ "name": "idx_ssh_credential_usage_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credential_usage_id": {
+ "name": "ssh_credential_usage_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credentials_user_id": {
+ "name": "idx_ssh_credentials_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_credentials_id": {
+ "name": "ssh_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_ssh_folders_user_id": {
+ "name": "idx_ssh_folders_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ssh_folders_id": {
+ "name": "ssh_folders_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "sso_providers_id": {
+ "name": "sso_providers_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "sync_tombstones_id": {
+ "name": "sync_tombstones_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identities_id": {
+ "name": "termix_identities_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_ca_id": {
+ "name": "termix_identity_ca_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "termix_identity_keys_id": {
+ "name": "termix_identity_keys_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "tmux_session_tags_id": {
+ "name": "tmux_session_tags_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_transfer_recent_user": {
+ "name": "idx_transfer_recent_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "transfer_recent_id": {
+ "name": "transfer_recent_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_trusted_devices_user_id": {
+ "name": "idx_trusted_devices_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "trusted_devices_id": {
+ "name": "trusted_devices_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "ui_preferences": {
+ "name": "ui_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ui_preferences_user_id_users_id_fk": {
+ "name": "ui_preferences_user_id_users_id_fk",
+ "tableFrom": "ui_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "ui_preferences_user_id": {
+ "name": "ui_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_open_tabs_user_id": {
+ "name": "idx_user_open_tabs_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_open_tabs_id": {
+ "name": "user_open_tabs_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ai_assistant_enabled": {
+ "name": "ai_assistant_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ai_read_only_commands": {
+ "name": "ai_read_only_commands",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_defaults": {
+ "name": "terminal_defaults",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_defaults": {
+ "name": "rdp_defaults",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_macros": {
+ "name": "terminal_macros",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_preferences_user_id": {
+ "name": "user_preferences_user_id",
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ },
+ "idx_user_roles_role_id": {
+ "name": "idx_user_roles_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_roles_id": {
+ "name": "user_roles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "user_workspaces": {
+ "name": "user_workspaces",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('manual')"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('{}')"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_user_workspaces_user_id": {
+ "name": "idx_user_workspaces_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "user_workspaces_id": {
+ "name": "user_workspaces_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "('openid email profile')"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {
+ "users_id": {
+ "name": "users_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_profiles_id": {
+ "name": "vault_profiles_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "checkConstraint": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "vault_tokens_id": {
+ "name": "vault_tokens_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "int",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "('preferred')"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "(CURRENT_TIMESTAMP)"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {
+ "webauthn_credentials_id": {
+ "name": "webauthn_credentials_id",
+ "columns": [
+ "id"
+ ]
+ }
+ },
+ "uniqueConstraints": {},
+ "checkConstraint": {}
+ }
+ },
+ "views": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "tables": {},
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/mysql/meta/_journal.json b/drizzle/mysql/meta/_journal.json
new file mode 100644
index 0000000..0d80a61
--- /dev/null
+++ b/drizzle/mysql/meta/_journal.json
@@ -0,0 +1,111 @@
+{
+ "version": "7",
+ "dialect": "mysql",
+ "entries": [
+ {
+ "idx": 0,
+ "version": "5",
+ "when": 1785738871436,
+ "tag": "0000_clean_pretty_boy",
+ "breakpoints": true
+ },
+ {
+ "idx": 1,
+ "version": "5",
+ "when": 1786132418625,
+ "tag": "0001_puzzling_aqueduct",
+ "breakpoints": true
+ },
+ {
+ "idx": 2,
+ "version": "5",
+ "when": 1786147319261,
+ "tag": "0002_bumpy_korg",
+ "breakpoints": true
+ },
+ {
+ "idx": 3,
+ "version": "5",
+ "when": 1786258964346,
+ "tag": "0003_dry_human_robot",
+ "breakpoints": true
+ },
+ {
+ "idx": 4,
+ "version": "5",
+ "when": 1786423595505,
+ "tag": "0004_fancy_spencer_smythe",
+ "breakpoints": true
+ },
+ {
+ "idx": 5,
+ "version": "5",
+ "when": 1786428085301,
+ "tag": "0005_tearful_mindworm",
+ "breakpoints": true
+ },
+ {
+ "idx": 6,
+ "version": "5",
+ "when": 1786482021452,
+ "tag": "0006_last_fantastic_four",
+ "breakpoints": true
+ },
+ {
+ "idx": 7,
+ "version": "5",
+ "when": 1786487754919,
+ "tag": "0007_aspiring_turbo",
+ "breakpoints": true
+ },
+ {
+ "idx": 8,
+ "version": "5",
+ "when": 1786498680274,
+ "tag": "0008_lame_nighthawk",
+ "breakpoints": true
+ },
+ {
+ "idx": 9,
+ "version": "5",
+ "when": 1786509736628,
+ "tag": "0009_tan_skaar",
+ "breakpoints": true
+ },
+ {
+ "idx": 10,
+ "version": "5",
+ "when": 1786515117582,
+ "tag": "0010_small_infant_terrible",
+ "breakpoints": true
+ },
+ {
+ "idx": 11,
+ "version": "5",
+ "when": 1786519424221,
+ "tag": "0011_easy_the_order",
+ "breakpoints": true
+ },
+ {
+ "idx": 12,
+ "version": "5",
+ "when": 1786598522577,
+ "tag": "0012_outgoing_ultron",
+ "breakpoints": true
+ },
+ {
+ "idx": 13,
+ "version": "5",
+ "when": 1786737725732,
+ "tag": "0013_third_wraith",
+ "breakpoints": true
+ },
+ {
+ "idx": 14,
+ "version": "5",
+ "when": 1786757023790,
+ "tag": "0014_bitter_nextwave",
+ "breakpoints": true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/drizzle/postgres/0000_jazzy_infant_terrible.sql b/drizzle/postgres/0000_jazzy_infant_terrible.sql
new file mode 100644
index 0000000..dd4c931
--- /dev/null
+++ b/drizzle/postgres/0000_jazzy_infant_terrible.sql
@@ -0,0 +1,837 @@
+CREATE TABLE "alert_firings" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "rule_id" integer NOT NULL,
+ "host_id" integer NOT NULL,
+ "host_name" text NOT NULL,
+ "fired_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "resolved_at" text,
+ "value" double precision,
+ "message" text NOT NULL,
+ "severity" text DEFAULT 'warning' NOT NULL,
+ "acknowledged" boolean DEFAULT false NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "alert_rule_channels" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "rule_id" integer NOT NULL,
+ "channel_id" integer NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "alert_rules" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "host_id" integer,
+ "name" varchar(255) NOT NULL,
+ "enabled" boolean DEFAULT true NOT NULL,
+ "trigger_type" text NOT NULL,
+ "threshold_value" double precision,
+ "threshold_duration_seconds" integer,
+ "cooldown_minutes" integer DEFAULT 15 NOT NULL,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "api_keys" (
+ "id" varchar(255) PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "token_hash" text NOT NULL,
+ "token_prefix" text NOT NULL,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "expires_at" text,
+ "last_used_at" text,
+ "is_active" boolean DEFAULT true NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "audit_logs" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255),
+ "username" text NOT NULL,
+ "action" text NOT NULL,
+ "resource_type" text NOT NULL,
+ "resource_id" text,
+ "resource_name" text,
+ "details" text,
+ "ip_address" text,
+ "user_agent" text,
+ "success" boolean NOT NULL,
+ "error_message" text,
+ "timestamp" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "c2s_tunnel_presets" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "config" text NOT NULL,
+ "platform" text,
+ "computer_name" text,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "command_history" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "host_id" integer NOT NULL,
+ "command" text NOT NULL,
+ "executed_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "dashboard_service_links" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "label" text NOT NULL,
+ "url" text NOT NULL,
+ "order" integer DEFAULT 0 NOT NULL,
+ "sync_id" varchar(255),
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT "dashboard_service_links_sync_id_unique" UNIQUE("sync_id")
+);
+--> statement-breakpoint
+CREATE TABLE "dismissed_alerts" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "alert_id" text NOT NULL,
+ "dismissed_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "file_manager_pinned" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "host_id" integer NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "path" text NOT NULL,
+ "pinned_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "file_manager_recent" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "host_id" integer NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "path" text NOT NULL,
+ "last_opened" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "file_manager_shortcuts" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "host_id" integer NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "path" text NOT NULL,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "homepage_items" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "type_id" text NOT NULL,
+ "title" text,
+ "config" text DEFAULT '{}' NOT NULL,
+ "folder_id" integer,
+ "sync_id" varchar(255),
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT "homepage_items_sync_id_unique" UNIQUE("sync_id")
+);
+--> statement-breakpoint
+CREATE TABLE "homepage_layouts" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "layout" text DEFAULT '{}' NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT "homepage_layouts_user_id_unique" UNIQUE("user_id")
+);
+--> statement-breakpoint
+CREATE TABLE "host_access" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "host_id" integer NOT NULL,
+ "user_id" varchar(255),
+ "role_id" integer,
+ "granted_by" varchar(255) NOT NULL,
+ "permission_level" text DEFAULT 'connect' NOT NULL,
+ "expires_at" text,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "last_accessed_at" text,
+ "access_count" integer DEFAULT 0 NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "host_health_checks" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "host_id" integer NOT NULL,
+ "checks" text NOT NULL,
+ "interval_seconds" integer DEFAULT 300 NOT NULL,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "host_health_history" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "host_id" integer NOT NULL,
+ "check_id" text NOT NULL,
+ "ts" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "ok" boolean NOT NULL,
+ "latency_ms" integer,
+ "detail" text
+);
+--> statement-breakpoint
+CREATE TABLE "host_metrics_history" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "host_id" integer NOT NULL,
+ "ts" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "cpu_percent" double precision,
+ "mem_percent" double precision,
+ "disk_percent" double precision,
+ "net_rx_bytes" integer,
+ "net_tx_bytes" integer
+);
+--> statement-breakpoint
+CREATE TABLE "host_metrics_preferences" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "host_id" integer NOT NULL,
+ "layout" text NOT NULL,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "ssh_data" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "connection_type" text DEFAULT 'ssh' NOT NULL,
+ "name" varchar(255),
+ "ip" text NOT NULL,
+ "port" integer NOT NULL,
+ "username" text NOT NULL,
+ "folder" text,
+ "tags" text,
+ "pin" boolean DEFAULT false NOT NULL,
+ "auth_type" text NOT NULL,
+ "use_warpgate" boolean DEFAULT false NOT NULL,
+ "share_ssh_auth" boolean DEFAULT false NOT NULL,
+ "force_keyboard_interactive" text,
+ "password" text,
+ "key" text,
+ "key_password" text,
+ "key_type" text,
+ "sudo_password" text,
+ "autostart_password" text,
+ "autostart_key" text,
+ "autostart_key_password" text,
+ "credential_id" integer,
+ "override_credential_username" boolean,
+ "vault_profile_id" integer,
+ "enable_terminal" boolean DEFAULT true NOT NULL,
+ "enable_session_logging" boolean DEFAULT true NOT NULL,
+ "allow_session_sharing" boolean DEFAULT true NOT NULL,
+ "enable_command_history" boolean DEFAULT true NOT NULL,
+ "enable_tunnel" boolean DEFAULT true NOT NULL,
+ "tunnel_connections" text,
+ "jump_hosts" text,
+ "enable_file_manager" boolean DEFAULT true NOT NULL,
+ "scp_legacy" boolean DEFAULT false NOT NULL,
+ "enable_docker" boolean DEFAULT false NOT NULL,
+ "enable_tmux_monitor" boolean DEFAULT false NOT NULL,
+ "show_terminal_in_sidebar" boolean DEFAULT true NOT NULL,
+ "show_file_manager_in_sidebar" boolean DEFAULT false NOT NULL,
+ "show_tunnel_in_sidebar" boolean DEFAULT false NOT NULL,
+ "show_docker_in_sidebar" boolean DEFAULT false NOT NULL,
+ "show_server_stats_in_sidebar" boolean DEFAULT false NOT NULL,
+ "default_path" text,
+ "stats_config" text,
+ "docker_config" text,
+ "enable_proxmox" boolean DEFAULT false NOT NULL,
+ "proxmox_config" text,
+ "terminal_config" text,
+ "quick_actions" text,
+ "notes" text,
+ "enable_ssh" boolean DEFAULT true NOT NULL,
+ "enable_rdp" boolean DEFAULT false NOT NULL,
+ "enable_vnc" boolean DEFAULT false NOT NULL,
+ "enable_telnet" boolean DEFAULT false NOT NULL,
+ "ssh_port" integer DEFAULT 22,
+ "rdp_port" integer DEFAULT 3389,
+ "vnc_port" integer DEFAULT 5900,
+ "telnet_port" integer DEFAULT 23,
+ "rdp_credential_id" integer,
+ "rdp_user" text,
+ "rdp_password" text,
+ "rdp_domain" text,
+ "rdp_security" text,
+ "rdp_ignore_cert" boolean DEFAULT false,
+ "vnc_credential_id" integer,
+ "vnc_password" text,
+ "vnc_user" text,
+ "telnet_user" text,
+ "telnet_password" text,
+ "telnet_credential_id" integer,
+ "rdp_auth_type" text,
+ "vnc_auth_type" text,
+ "telnet_auth_type" text,
+ "domain" text,
+ "security" text,
+ "ignore_cert" boolean DEFAULT false,
+ "guacamole_config" text,
+ "use_socks5" boolean,
+ "socks5_host" text,
+ "socks5_port" integer,
+ "socks5_username" text,
+ "socks5_password" text,
+ "socks5_proxy_chain" text,
+ "connection_origin" text,
+ "mac_address" text,
+ "wol_broadcast_address" text,
+ "port_knock_sequence" text,
+ "host_key_fingerprint" text,
+ "host_key_type" text,
+ "host_key_algorithm" text DEFAULT 'sha256',
+ "host_key_first_seen" text,
+ "host_key_last_verified" text,
+ "host_key_changed_count" integer DEFAULT 0,
+ "sync_id" varchar(255),
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT "ssh_data_sync_id_unique" UNIQUE("sync_id")
+);
+--> statement-breakpoint
+CREATE TABLE "network_topology" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "topology" text,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "notification_channels" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "type" text NOT NULL,
+ "config" text NOT NULL,
+ "enabled" boolean DEFAULT true NOT NULL,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "opkssh_tokens" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "host_id" integer NOT NULL,
+ "ssh_cert" text NOT NULL,
+ "private_key" text NOT NULL,
+ "email" text,
+ "sub" text,
+ "issuer" text,
+ "audience" text,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "expires_at" text NOT NULL,
+ "last_used" text
+);
+--> statement-breakpoint
+CREATE TABLE "recent_activity" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "type" text NOT NULL,
+ "host_id" integer NOT NULL,
+ "host_name" text,
+ "timestamp" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "roles" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "display_name" text NOT NULL,
+ "description" text,
+ "is_system" boolean DEFAULT false NOT NULL,
+ "permissions" text,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT "roles_name_unique" UNIQUE("name")
+);
+--> statement-breakpoint
+CREATE TABLE "session_recordings" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "host_id" integer NOT NULL,
+ "user_id" varchar(255),
+ "username" text,
+ "access_id" integer,
+ "started_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "ended_at" text,
+ "duration" integer,
+ "commands" text,
+ "dangerous_actions" text,
+ "recording_path" text,
+ "protocol" varchar(255) DEFAULT 'ssh' NOT NULL,
+ "format" text DEFAULT 'text' NOT NULL,
+ "terminated_by_owner" boolean DEFAULT false,
+ "termination_reason" text
+);
+--> statement-breakpoint
+CREATE TABLE "session_share_participants" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "share_id" varchar(255) NOT NULL,
+ "user_id" varchar(255),
+ "guest_label" text,
+ "joined_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "left_at" text
+);
+--> statement-breakpoint
+CREATE TABLE "session_shares" (
+ "id" varchar(255) PRIMARY KEY NOT NULL,
+ "host_id" integer NOT NULL,
+ "owner_user_id" varchar(255) NOT NULL,
+ "protocol" varchar(255) NOT NULL,
+ "session_id" text NOT NULL,
+ "tab_instance_id" text,
+ "share_type" text NOT NULL,
+ "target_user_id" varchar(255),
+ "link_token" varchar(255),
+ "permission_level" text DEFAULT 'read-only' NOT NULL,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "expires_at" text NOT NULL,
+ "revoked_at" text,
+ "last_joined_at" text,
+ "join_count" integer DEFAULT 0 NOT NULL,
+ CONSTRAINT "session_shares_link_token_unique" UNIQUE("link_token")
+);
+--> statement-breakpoint
+CREATE TABLE "sessions" (
+ "id" varchar(255) PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "jwt_token" text NOT NULL,
+ "device_type" text NOT NULL,
+ "device_info" text NOT NULL,
+ "oidc_sub" text,
+ "oidc_sid" text,
+ "sso_provider_id" integer,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "expires_at" text NOT NULL,
+ "last_active_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "settings" (
+ "key" varchar(255) PRIMARY KEY NOT NULL,
+ "value" text NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "shared_host_auth_overrides" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "host_id" integer NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "protocol" varchar(255) DEFAULT 'ssh' NOT NULL,
+ "credential_id" integer NOT NULL,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "shared_host_secrets" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "host_access_id" integer NOT NULL,
+ "target_user_id" varchar(255) NOT NULL,
+ "protocol" varchar(255) DEFAULT 'ssh' NOT NULL,
+ "source_type" text DEFAULT 'credential' NOT NULL,
+ "original_credential_id" integer,
+ "encrypted_username" text,
+ "encrypted_auth_type" text,
+ "encrypted_password" text,
+ "encrypted_key" text,
+ "encrypted_key_password" text,
+ "encrypted_key_type" text,
+ "encrypted_domain" text,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "snippet_access" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "snippet_id" integer NOT NULL,
+ "user_id" varchar(255),
+ "role_id" integer,
+ "granted_by" varchar(255) NOT NULL,
+ "permission_level" text DEFAULT 'view' NOT NULL,
+ "expires_at" text,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "snippet_folders" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "color" text,
+ "icon" text,
+ "sync_id" varchar(255),
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT "snippet_folders_sync_id_unique" UNIQUE("sync_id")
+);
+--> statement-breakpoint
+CREATE TABLE "snippets" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "content" text NOT NULL,
+ "description" text,
+ "folder" text,
+ "order" integer DEFAULT 0 NOT NULL,
+ "sync_id" varchar(255),
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "host_filter" text,
+ CONSTRAINT "snippets_sync_id_unique" UNIQUE("sync_id")
+);
+--> statement-breakpoint
+CREATE TABLE "ssh_credential_usage" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "credential_id" integer NOT NULL,
+ "host_id" integer NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "used_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "ssh_credentials" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "description" text,
+ "folder" text,
+ "tags" text,
+ "auth_type" text NOT NULL,
+ "username" text,
+ "password" text,
+ "key" text,
+ "private_key" text,
+ "public_key" text,
+ "key_password" text,
+ "key_type" text,
+ "detected_key_type" text,
+ "cert_public_key" text,
+ "usage_count" integer DEFAULT 0 NOT NULL,
+ "last_used" text,
+ "sync_id" varchar(255),
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT "ssh_credentials_sync_id_unique" UNIQUE("sync_id")
+);
+--> statement-breakpoint
+CREATE TABLE "ssh_folders" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "color" text,
+ "icon" text,
+ "credential_id" integer,
+ "sync_id" varchar(255),
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT "ssh_folders_sync_id_unique" UNIQUE("sync_id")
+);
+--> statement-breakpoint
+CREATE TABLE "sso_providers" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "type" text NOT NULL,
+ "enabled" boolean DEFAULT true NOT NULL,
+ "display_order" integer DEFAULT 0 NOT NULL,
+ "config" text NOT NULL,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "sync_tombstones" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "entity_type" text NOT NULL,
+ "sync_id" varchar(255) NOT NULL,
+ "deleted_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "termix_identities" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "handle" varchar(255) NOT NULL,
+ "description" text,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT "termix_identities_user_id_unique" UNIQUE("user_id"),
+ CONSTRAINT "termix_identities_handle_unique" UNIQUE("handle")
+);
+--> statement-breakpoint
+CREATE TABLE "termix_identity_ca" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "identity_id" integer NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "public_key" text NOT NULL,
+ "private_key" text NOT NULL,
+ "validity_days" integer DEFAULT 90 NOT NULL,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT "termix_identity_ca_identity_id_unique" UNIQUE("identity_id")
+);
+--> statement-breakpoint
+CREATE TABLE "termix_identity_keys" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "identity_id" integer NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "public_key" text NOT NULL,
+ "key_type" text NOT NULL,
+ "algorithm" text NOT NULL,
+ "label" text,
+ "comment" text,
+ "source" text DEFAULT 'manual' NOT NULL,
+ "credential_id" integer,
+ "enabled" boolean DEFAULT true NOT NULL,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "tmux_session_tags" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "host_id" integer NOT NULL,
+ "session_name" text NOT NULL,
+ "tag" text NOT NULL,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "transfer_recent" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "source_host_id" integer NOT NULL,
+ "dest_host_id" integer NOT NULL,
+ "dest_path" text NOT NULL,
+ "dest_path_label" text NOT NULL,
+ "last_used" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "trusted_devices" (
+ "id" varchar(255) PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "device_fingerprint" text NOT NULL,
+ "device_type" text NOT NULL,
+ "device_info" text NOT NULL,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "expires_at" text NOT NULL,
+ "last_used_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "user_open_tabs" (
+ "id" varchar(255) PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "tab_type" text NOT NULL,
+ "host_id" integer,
+ "label" text NOT NULL,
+ "tab_order" integer DEFAULT 0 NOT NULL,
+ "backend_session_id" text,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "user_preferences" (
+ "user_id" varchar(255) PRIMARY KEY NOT NULL,
+ "reopen_tabs_on_login" boolean DEFAULT false NOT NULL,
+ "theme" text,
+ "font_size" text,
+ "accent_color" text,
+ "language" text,
+ "storage_mode" text,
+ "command_autocomplete" boolean,
+ "command_palette_enabled" boolean,
+ "show_host_tags" boolean,
+ "host_tray_on_click" boolean,
+ "pin_app_rail" boolean,
+ "expand_app_rail_on_hover" boolean,
+ "folders_collapsed" boolean,
+ "confirm_snippet_execution" boolean,
+ "disable_update_check" boolean,
+ "confirm_tab_close" boolean,
+ "hidden_rail_tabs" text,
+ "compact_host_view" boolean,
+ "status_color_scheme" text,
+ "custom_themes" text,
+ "custom_keybindings" text,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "user_roles" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "role_id" integer NOT NULL,
+ "granted_by" varchar(255),
+ "granted_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "users" (
+ "id" varchar(255) PRIMARY KEY NOT NULL,
+ "username" text NOT NULL,
+ "password_hash" text NOT NULL,
+ "is_admin" boolean DEFAULT false NOT NULL,
+ "is_oidc" boolean DEFAULT false NOT NULL,
+ "oidc_identifier" text,
+ "sso_provider_id" integer,
+ "client_id" text,
+ "client_secret" text,
+ "issuer_url" text,
+ "authorization_url" text,
+ "token_url" text,
+ "identifier_path" text,
+ "name_path" text,
+ "scopes" text DEFAULT 'openid email profile',
+ "totp_secret" text,
+ "totp_enabled" boolean DEFAULT false NOT NULL,
+ "totp_backup_codes" text,
+ "registered_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "donation_modal_dismissed" boolean DEFAULT false NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "vault_profiles" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "description" text,
+ "folder" text,
+ "tags" text,
+ "vault_addr" text NOT NULL,
+ "vault_namespace" text,
+ "oidc_mount" text,
+ "oidc_role" text,
+ "ssh_mount" text,
+ "ssh_role" text NOT NULL,
+ "valid_principals" text,
+ "key_type" text,
+ "shared" boolean DEFAULT false NOT NULL,
+ "sync_id" varchar(255),
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT "vault_profiles_sync_id_unique" UNIQUE("sync_id")
+);
+--> statement-breakpoint
+CREATE TABLE "vault_tokens" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "profile_id" integer NOT NULL,
+ "ssh_cert" text NOT NULL,
+ "private_key" text NOT NULL,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "expires_at" text NOT NULL,
+ "last_used" text
+);
+--> statement-breakpoint
+CREATE TABLE "webauthn_credentials" (
+ "id" varchar(255) PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "credential_id" text NOT NULL,
+ "public_key" text NOT NULL,
+ "counter" integer DEFAULT 0 NOT NULL,
+ "device_type" text,
+ "backed_up" boolean DEFAULT false NOT NULL,
+ "transports" text,
+ "user_verification" text DEFAULT 'preferred' NOT NULL,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "last_used_at" text
+);
+--> statement-breakpoint
+ALTER TABLE "alert_firings" ADD CONSTRAINT "alert_firings_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "alert_firings" ADD CONSTRAINT "alert_firings_rule_id_alert_rules_id_fk" FOREIGN KEY ("rule_id") REFERENCES "public"."alert_rules"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "alert_rule_channels" ADD CONSTRAINT "alert_rule_channels_rule_id_alert_rules_id_fk" FOREIGN KEY ("rule_id") REFERENCES "public"."alert_rules"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "alert_rule_channels" ADD CONSTRAINT "alert_rule_channels_channel_id_notification_channels_id_fk" FOREIGN KEY ("channel_id") REFERENCES "public"."notification_channels"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "alert_rules" ADD CONSTRAINT "alert_rules_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "alert_rules" ADD CONSTRAINT "alert_rules_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "api_keys" ADD CONSTRAINT "api_keys_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "audit_logs" ADD CONSTRAINT "audit_logs_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "c2s_tunnel_presets" ADD CONSTRAINT "c2s_tunnel_presets_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "command_history" ADD CONSTRAINT "command_history_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "command_history" ADD CONSTRAINT "command_history_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "dashboard_service_links" ADD CONSTRAINT "dashboard_service_links_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "dismissed_alerts" ADD CONSTRAINT "dismissed_alerts_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "file_manager_pinned" ADD CONSTRAINT "file_manager_pinned_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "file_manager_pinned" ADD CONSTRAINT "file_manager_pinned_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "file_manager_recent" ADD CONSTRAINT "file_manager_recent_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "file_manager_recent" ADD CONSTRAINT "file_manager_recent_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "file_manager_shortcuts" ADD CONSTRAINT "file_manager_shortcuts_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "file_manager_shortcuts" ADD CONSTRAINT "file_manager_shortcuts_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "homepage_items" ADD CONSTRAINT "homepage_items_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "homepage_layouts" ADD CONSTRAINT "homepage_layouts_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "host_access" ADD CONSTRAINT "host_access_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "host_access" ADD CONSTRAINT "host_access_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "host_access" ADD CONSTRAINT "host_access_role_id_roles_id_fk" FOREIGN KEY ("role_id") REFERENCES "public"."roles"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "host_access" ADD CONSTRAINT "host_access_granted_by_users_id_fk" FOREIGN KEY ("granted_by") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "host_health_checks" ADD CONSTRAINT "host_health_checks_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "host_health_checks" ADD CONSTRAINT "host_health_checks_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "host_health_history" ADD CONSTRAINT "host_health_history_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "host_health_history" ADD CONSTRAINT "host_health_history_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "host_metrics_history" ADD CONSTRAINT "host_metrics_history_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "host_metrics_preferences" ADD CONSTRAINT "host_metrics_preferences_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "host_metrics_preferences" ADD CONSTRAINT "host_metrics_preferences_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ssh_data" ADD CONSTRAINT "ssh_data_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ssh_data" ADD CONSTRAINT "ssh_data_credential_id_ssh_credentials_id_fk" FOREIGN KEY ("credential_id") REFERENCES "public"."ssh_credentials"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ssh_data" ADD CONSTRAINT "ssh_data_vault_profile_id_vault_profiles_id_fk" FOREIGN KEY ("vault_profile_id") REFERENCES "public"."vault_profiles"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ssh_data" ADD CONSTRAINT "ssh_data_rdp_credential_id_ssh_credentials_id_fk" FOREIGN KEY ("rdp_credential_id") REFERENCES "public"."ssh_credentials"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ssh_data" ADD CONSTRAINT "ssh_data_vnc_credential_id_ssh_credentials_id_fk" FOREIGN KEY ("vnc_credential_id") REFERENCES "public"."ssh_credentials"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ssh_data" ADD CONSTRAINT "ssh_data_telnet_credential_id_ssh_credentials_id_fk" FOREIGN KEY ("telnet_credential_id") REFERENCES "public"."ssh_credentials"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "network_topology" ADD CONSTRAINT "network_topology_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "notification_channels" ADD CONSTRAINT "notification_channels_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "opkssh_tokens" ADD CONSTRAINT "opkssh_tokens_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "opkssh_tokens" ADD CONSTRAINT "opkssh_tokens_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "recent_activity" ADD CONSTRAINT "recent_activity_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "recent_activity" ADD CONSTRAINT "recent_activity_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "session_recordings" ADD CONSTRAINT "session_recordings_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "session_recordings" ADD CONSTRAINT "session_recordings_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "session_recordings" ADD CONSTRAINT "session_recordings_access_id_host_access_id_fk" FOREIGN KEY ("access_id") REFERENCES "public"."host_access"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "session_share_participants" ADD CONSTRAINT "session_share_participants_share_id_session_shares_id_fk" FOREIGN KEY ("share_id") REFERENCES "public"."session_shares"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "session_share_participants" ADD CONSTRAINT "session_share_participants_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "session_shares" ADD CONSTRAINT "session_shares_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "session_shares" ADD CONSTRAINT "session_shares_owner_user_id_users_id_fk" FOREIGN KEY ("owner_user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "session_shares" ADD CONSTRAINT "session_shares_target_user_id_users_id_fk" FOREIGN KEY ("target_user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "sessions" ADD CONSTRAINT "sessions_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "shared_host_auth_overrides" ADD CONSTRAINT "shared_host_auth_overrides_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "shared_host_auth_overrides" ADD CONSTRAINT "shared_host_auth_overrides_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "shared_host_auth_overrides" ADD CONSTRAINT "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk" FOREIGN KEY ("credential_id") REFERENCES "public"."ssh_credentials"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "shared_host_secrets" ADD CONSTRAINT "shared_host_secrets_host_access_id_host_access_id_fk" FOREIGN KEY ("host_access_id") REFERENCES "public"."host_access"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "shared_host_secrets" ADD CONSTRAINT "shared_host_secrets_target_user_id_users_id_fk" FOREIGN KEY ("target_user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "shared_host_secrets" ADD CONSTRAINT "shared_host_secrets_original_credential_id_ssh_credentials_id_fk" FOREIGN KEY ("original_credential_id") REFERENCES "public"."ssh_credentials"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "snippet_access" ADD CONSTRAINT "snippet_access_snippet_id_snippets_id_fk" FOREIGN KEY ("snippet_id") REFERENCES "public"."snippets"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "snippet_access" ADD CONSTRAINT "snippet_access_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "snippet_access" ADD CONSTRAINT "snippet_access_role_id_roles_id_fk" FOREIGN KEY ("role_id") REFERENCES "public"."roles"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "snippet_access" ADD CONSTRAINT "snippet_access_granted_by_users_id_fk" FOREIGN KEY ("granted_by") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "snippet_folders" ADD CONSTRAINT "snippet_folders_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "snippets" ADD CONSTRAINT "snippets_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ssh_credential_usage" ADD CONSTRAINT "ssh_credential_usage_credential_id_ssh_credentials_id_fk" FOREIGN KEY ("credential_id") REFERENCES "public"."ssh_credentials"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ssh_credential_usage" ADD CONSTRAINT "ssh_credential_usage_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ssh_credential_usage" ADD CONSTRAINT "ssh_credential_usage_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ssh_credentials" ADD CONSTRAINT "ssh_credentials_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ssh_folders" ADD CONSTRAINT "ssh_folders_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ssh_folders" ADD CONSTRAINT "ssh_folders_credential_id_ssh_credentials_id_fk" FOREIGN KEY ("credential_id") REFERENCES "public"."ssh_credentials"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "sync_tombstones" ADD CONSTRAINT "sync_tombstones_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "termix_identities" ADD CONSTRAINT "termix_identities_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "termix_identity_ca" ADD CONSTRAINT "termix_identity_ca_identity_id_termix_identities_id_fk" FOREIGN KEY ("identity_id") REFERENCES "public"."termix_identities"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "termix_identity_ca" ADD CONSTRAINT "termix_identity_ca_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "termix_identity_keys" ADD CONSTRAINT "termix_identity_keys_identity_id_termix_identities_id_fk" FOREIGN KEY ("identity_id") REFERENCES "public"."termix_identities"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "termix_identity_keys" ADD CONSTRAINT "termix_identity_keys_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "termix_identity_keys" ADD CONSTRAINT "termix_identity_keys_credential_id_ssh_credentials_id_fk" FOREIGN KEY ("credential_id") REFERENCES "public"."ssh_credentials"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "tmux_session_tags" ADD CONSTRAINT "tmux_session_tags_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "tmux_session_tags" ADD CONSTRAINT "tmux_session_tags_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "transfer_recent" ADD CONSTRAINT "transfer_recent_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "transfer_recent" ADD CONSTRAINT "transfer_recent_source_host_id_ssh_data_id_fk" FOREIGN KEY ("source_host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "transfer_recent" ADD CONSTRAINT "transfer_recent_dest_host_id_ssh_data_id_fk" FOREIGN KEY ("dest_host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "trusted_devices" ADD CONSTRAINT "trusted_devices_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "user_open_tabs" ADD CONSTRAINT "user_open_tabs_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "user_open_tabs" ADD CONSTRAINT "user_open_tabs_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "user_preferences" ADD CONSTRAINT "user_preferences_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "user_roles" ADD CONSTRAINT "user_roles_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "user_roles" ADD CONSTRAINT "user_roles_role_id_roles_id_fk" FOREIGN KEY ("role_id") REFERENCES "public"."roles"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "user_roles" ADD CONSTRAINT "user_roles_granted_by_users_id_fk" FOREIGN KEY ("granted_by") REFERENCES "public"."users"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "vault_profiles" ADD CONSTRAINT "vault_profiles_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "vault_tokens" ADD CONSTRAINT "vault_tokens_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "vault_tokens" ADD CONSTRAINT "vault_tokens_profile_id_vault_profiles_id_fk" FOREIGN KEY ("profile_id") REFERENCES "public"."vault_profiles"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "webauthn_credentials" ADD CONSTRAINT "webauthn_credentials_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+CREATE UNIQUE INDEX "idx_host_health_checks_user_host" ON "host_health_checks" USING btree ("user_id","host_id");--> statement-breakpoint
+CREATE UNIQUE INDEX "idx_host_metrics_prefs_user_host" ON "host_metrics_preferences" USING btree ("user_id","host_id");--> statement-breakpoint
+CREATE UNIQUE INDEX "idx_opkssh_tokens_user_host" ON "opkssh_tokens" USING btree ("user_id","host_id");--> statement-breakpoint
+CREATE UNIQUE INDEX "shared_host_auth_overrides_host_user_protocol_unique" ON "shared_host_auth_overrides" USING btree ("host_id","user_id","protocol");--> statement-breakpoint
+CREATE UNIQUE INDEX "idx_shared_host_secrets_scope" ON "shared_host_secrets" USING btree ("host_access_id","target_user_id","protocol");--> statement-breakpoint
+CREATE UNIQUE INDEX "idx_user_roles_user_role" ON "user_roles" USING btree ("user_id","role_id");--> statement-breakpoint
+CREATE UNIQUE INDEX "idx_vault_tokens_user_profile" ON "vault_tokens" USING btree ("user_id","profile_id");
\ No newline at end of file
diff --git a/drizzle/postgres/0001_worried_silvermane.sql b/drizzle/postgres/0001_worried_silvermane.sql
new file mode 100644
index 0000000..5164820
--- /dev/null
+++ b/drizzle/postgres/0001_worried_silvermane.sql
@@ -0,0 +1,9 @@
+CREATE TABLE "host_sidebar_preferences" (
+ "user_id" varchar(255) PRIMARY KEY NOT NULL,
+ "data" text NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "ssh_data" ADD COLUMN "sort_order" integer;--> statement-breakpoint
+ALTER TABLE "ssh_folders" ADD COLUMN "sort_order" integer;--> statement-breakpoint
+ALTER TABLE "host_sidebar_preferences" ADD CONSTRAINT "host_sidebar_preferences_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/drizzle/postgres/0002_clear_cerebro.sql b/drizzle/postgres/0002_clear_cerebro.sql
new file mode 100644
index 0000000..0910be5
--- /dev/null
+++ b/drizzle/postgres/0002_clear_cerebro.sql
@@ -0,0 +1,9 @@
+CREATE TABLE "credential_sidebar_preferences" (
+ "user_id" varchar(255) PRIMARY KEY NOT NULL,
+ "data" text NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "ssh_credentials" ADD COLUMN "pin" boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE "ssh_credentials" ADD COLUMN "sort_order" integer;--> statement-breakpoint
+ALTER TABLE "credential_sidebar_preferences" ADD CONSTRAINT "credential_sidebar_preferences_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/drizzle/postgres/0003_harsh_gravity.sql b/drizzle/postgres/0003_harsh_gravity.sql
new file mode 100644
index 0000000..0d49e05
--- /dev/null
+++ b/drizzle/postgres/0003_harsh_gravity.sql
@@ -0,0 +1 @@
+ALTER TABLE "snippets" ADD COLUMN "is_note" boolean DEFAULT false NOT NULL;
\ No newline at end of file
diff --git a/drizzle/postgres/0004_great_victor_mancha.sql b/drizzle/postgres/0004_great_victor_mancha.sql
new file mode 100644
index 0000000..7b414a8
--- /dev/null
+++ b/drizzle/postgres/0004_great_victor_mancha.sql
@@ -0,0 +1,26 @@
+CREATE TABLE "proxmox_node_history" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "host_id" integer NOT NULL,
+ "ts" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "cpu_percent" double precision,
+ "mem_percent" double precision,
+ "disk_percent" double precision,
+ "net_rx_bytes" integer,
+ "net_tx_bytes" integer
+);
+--> statement-breakpoint
+CREATE TABLE "proxmox_stats_preferences" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "host_id" integer NOT NULL,
+ "layout" text NOT NULL,
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "ssh_data" ADD COLUMN "enable_proxmox_stats" boolean DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE "ssh_data" ADD COLUMN "proxmox_stats_config" text;--> statement-breakpoint
+ALTER TABLE "proxmox_node_history" ADD CONSTRAINT "proxmox_node_history_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "proxmox_stats_preferences" ADD CONSTRAINT "proxmox_stats_preferences_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "proxmox_stats_preferences" ADD CONSTRAINT "proxmox_stats_preferences_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+CREATE UNIQUE INDEX "idx_proxmox_stats_prefs_user_host" ON "proxmox_stats_preferences" USING btree ("user_id","host_id");
\ No newline at end of file
diff --git a/drizzle/postgres/0005_loose_captain_marvel.sql b/drizzle/postgres/0005_loose_captain_marvel.sql
new file mode 100644
index 0000000..ed87ffc
--- /dev/null
+++ b/drizzle/postgres/0005_loose_captain_marvel.sql
@@ -0,0 +1 @@
+ALTER TABLE "ssh_data" ADD COLUMN "enable_terminal_toolbar" boolean DEFAULT true NOT NULL;
\ No newline at end of file
diff --git a/drizzle/postgres/0006_gigantic_thor_girl.sql b/drizzle/postgres/0006_gigantic_thor_girl.sql
new file mode 100644
index 0000000..7496d3c
--- /dev/null
+++ b/drizzle/postgres/0006_gigantic_thor_girl.sql
@@ -0,0 +1,42 @@
+CREATE TABLE "fleet_inventory" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "host_id" integer NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "os_pretty_name" text,
+ "kernel" text,
+ "architecture" text,
+ "hostname" text,
+ "uptime_seconds" integer,
+ "ip" text,
+ "package_manager" text,
+ "collected_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "fleet_members" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "fleet_id" integer NOT NULL,
+ "host_id" integer NOT NULL,
+ "added_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "fleets" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "description" text,
+ "color" text,
+ "icon" text,
+ "tag_rules" text,
+ "sync_id" varchar(255),
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT "fleets_sync_id_unique" UNIQUE("sync_id")
+);
+--> statement-breakpoint
+ALTER TABLE "fleet_inventory" ADD CONSTRAINT "fleet_inventory_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "fleet_inventory" ADD CONSTRAINT "fleet_inventory_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "fleet_members" ADD CONSTRAINT "fleet_members_fleet_id_fleets_id_fk" FOREIGN KEY ("fleet_id") REFERENCES "public"."fleets"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "fleet_members" ADD CONSTRAINT "fleet_members_host_id_ssh_data_id_fk" FOREIGN KEY ("host_id") REFERENCES "public"."ssh_data"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "fleets" ADD CONSTRAINT "fleets_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+CREATE UNIQUE INDEX "idx_fleet_inventory_host" ON "fleet_inventory" USING btree ("host_id","user_id");--> statement-breakpoint
+CREATE UNIQUE INDEX "idx_fleet_members_fleet_host" ON "fleet_members" USING btree ("fleet_id","host_id");
\ No newline at end of file
diff --git a/drizzle/postgres/0007_orange_mandrill.sql b/drizzle/postgres/0007_orange_mandrill.sql
new file mode 100644
index 0000000..352912f
--- /dev/null
+++ b/drizzle/postgres/0007_orange_mandrill.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "ssh_data" ADD COLUMN "parent_host_id" integer;--> statement-breakpoint
+ALTER TABLE "ssh_data" ADD CONSTRAINT "ssh_data_parent_host_id_ssh_data_id_fk" FOREIGN KEY ("parent_host_id") REFERENCES "public"."ssh_data"("id") ON DELETE set null ON UPDATE no action;
\ No newline at end of file
diff --git a/drizzle/postgres/0008_bright_miss_america.sql b/drizzle/postgres/0008_bright_miss_america.sql
new file mode 100644
index 0000000..9f100bf
--- /dev/null
+++ b/drizzle/postgres/0008_bright_miss_america.sql
@@ -0,0 +1,17 @@
+CREATE TABLE "user_workspaces" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "color" text,
+ "icon" text,
+ "kind" text DEFAULT 'manual' NOT NULL,
+ "is_default" boolean DEFAULT false NOT NULL,
+ "payload" text DEFAULT '{}' NOT NULL,
+ "sync_id" varchar(255),
+ "created_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "last_used_at" text,
+ CONSTRAINT "user_workspaces_sync_id_unique" UNIQUE("sync_id")
+);
+--> statement-breakpoint
+ALTER TABLE "user_workspaces" ADD CONSTRAINT "user_workspaces_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/drizzle/postgres/0009_spicy_the_leader.sql b/drizzle/postgres/0009_spicy_the_leader.sql
new file mode 100644
index 0000000..91a25f6
--- /dev/null
+++ b/drizzle/postgres/0009_spicy_the_leader.sql
@@ -0,0 +1,28 @@
+ALTER TABLE "api_keys" ALTER COLUMN "expires_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "audit_logs" ALTER COLUMN "action" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "audit_logs" ALTER COLUMN "resource_type" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "audit_logs" ALTER COLUMN "timestamp" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "audit_logs" ALTER COLUMN "timestamp" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "host_access" ALTER COLUMN "expires_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "opkssh_tokens" ALTER COLUMN "expires_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "recent_activity" ALTER COLUMN "timestamp" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "recent_activity" ALTER COLUMN "timestamp" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "session_shares" ALTER COLUMN "expires_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "sessions" ALTER COLUMN "expires_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "snippet_access" ALTER COLUMN "expires_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "trusted_devices" ALTER COLUMN "expires_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "vault_tokens" ALTER COLUMN "expires_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "webauthn_credentials" ALTER COLUMN "credential_id" SET DATA TYPE varchar(255);--> statement-breakpoint
+CREATE INDEX "idx_audit_logs_timestamp" ON "audit_logs" USING btree ("timestamp");--> statement-breakpoint
+CREATE INDEX "idx_audit_logs_user_ts" ON "audit_logs" USING btree ("user_id","timestamp");--> statement-breakpoint
+CREATE INDEX "idx_audit_logs_action_ts" ON "audit_logs" USING btree ("action","timestamp");--> statement-breakpoint
+CREATE INDEX "idx_audit_logs_resource_ts" ON "audit_logs" USING btree ("resource_type","timestamp");--> statement-breakpoint
+CREATE INDEX "idx_host_access_user_id" ON "host_access" USING btree ("user_id");--> statement-breakpoint
+CREATE INDEX "idx_host_access_role_id" ON "host_access" USING btree ("role_id");--> statement-breakpoint
+CREATE INDEX "idx_host_access_host_id" ON "host_access" USING btree ("host_id");--> statement-breakpoint
+CREATE INDEX "idx_host_access_expires_at" ON "host_access" USING btree ("expires_at");--> statement-breakpoint
+CREATE INDEX "idx_ssh_data_user_id" ON "ssh_data" USING btree ("user_id");--> statement-breakpoint
+CREATE INDEX "idx_ssh_data_parent_host" ON "ssh_data" USING btree ("parent_host_id");--> statement-breakpoint
+CREATE INDEX "idx_ssh_data_credential" ON "ssh_data" USING btree ("credential_id");--> statement-breakpoint
+CREATE INDEX "idx_sessions_user_id" ON "sessions" USING btree ("user_id");--> statement-breakpoint
+CREATE INDEX "idx_sessions_expires_at" ON "sessions" USING btree ("expires_at");
\ No newline at end of file
diff --git a/drizzle/postgres/0010_nasty_mordo.sql b/drizzle/postgres/0010_nasty_mordo.sql
new file mode 100644
index 0000000..27193da
--- /dev/null
+++ b/drizzle/postgres/0010_nasty_mordo.sql
@@ -0,0 +1,7 @@
+CREATE TABLE "ui_preferences" (
+ "user_id" varchar(255) PRIMARY KEY NOT NULL,
+ "data" text NOT NULL,
+ "updated_at" text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "ui_preferences" ADD CONSTRAINT "ui_preferences_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;
\ No newline at end of file
diff --git a/drizzle/postgres/0011_unique_sleepwalker.sql b/drizzle/postgres/0011_unique_sleepwalker.sql
new file mode 100644
index 0000000..bc63bd0
--- /dev/null
+++ b/drizzle/postgres/0011_unique_sleepwalker.sql
@@ -0,0 +1,34 @@
+ALTER TABLE "alert_firings" ALTER COLUMN "fired_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "alert_firings" ALTER COLUMN "fired_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "session_recordings" ALTER COLUMN "started_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "session_recordings" ALTER COLUMN "started_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "session_shares" ALTER COLUMN "session_id" SET DATA TYPE varchar(255);--> statement-breakpoint
+CREATE INDEX "idx_alert_firings_rule" ON "alert_firings" USING btree ("rule_id","fired_at");--> statement-breakpoint
+CREATE INDEX "idx_alert_firings_host" ON "alert_firings" USING btree ("host_id");--> statement-breakpoint
+CREATE INDEX "idx_api_keys_user_id" ON "api_keys" USING btree ("user_id");--> statement-breakpoint
+CREATE INDEX "idx_command_history_user_host" ON "command_history" USING btree ("user_id","host_id");--> statement-breakpoint
+CREATE INDEX "idx_dismissed_alerts_user_id" ON "dismissed_alerts" USING btree ("user_id");--> statement-breakpoint
+CREATE INDEX "idx_file_manager_pinned_user" ON "file_manager_pinned" USING btree ("user_id","host_id");--> statement-breakpoint
+CREATE INDEX "idx_file_manager_recent_user" ON "file_manager_recent" USING btree ("user_id","host_id");--> statement-breakpoint
+CREATE INDEX "idx_file_manager_shortcuts_user" ON "file_manager_shortcuts" USING btree ("user_id","host_id");--> statement-breakpoint
+CREATE INDEX "idx_fleet_inventory_user" ON "fleet_inventory" USING btree ("user_id");--> statement-breakpoint
+CREATE INDEX "idx_fleet_members_host" ON "fleet_members" USING btree ("host_id");--> statement-breakpoint
+CREATE INDEX "idx_homepage_items_user_id" ON "homepage_items" USING btree ("user_id");--> statement-breakpoint
+CREATE INDEX "idx_recent_activity_user_ts" ON "recent_activity" USING btree ("user_id","timestamp");--> statement-breakpoint
+CREATE INDEX "idx_session_recordings_user_started" ON "session_recordings" USING btree ("user_id","started_at");--> statement-breakpoint
+CREATE INDEX "idx_session_recordings_host" ON "session_recordings" USING btree ("host_id");--> statement-breakpoint
+CREATE INDEX "idx_session_shares_session_id" ON "session_shares" USING btree ("session_id");--> statement-breakpoint
+CREATE INDEX "idx_session_shares_host_id" ON "session_shares" USING btree ("host_id");--> statement-breakpoint
+CREATE INDEX "idx_snippet_access_user_id" ON "snippet_access" USING btree ("user_id");--> statement-breakpoint
+CREATE INDEX "idx_snippet_access_snippet_id" ON "snippet_access" USING btree ("snippet_id");--> statement-breakpoint
+CREATE INDEX "idx_snippet_access_role_id" ON "snippet_access" USING btree ("role_id");--> statement-breakpoint
+CREATE INDEX "idx_snippets_user_id" ON "snippets" USING btree ("user_id");--> statement-breakpoint
+CREATE INDEX "idx_ssh_credential_usage_credential" ON "ssh_credential_usage" USING btree ("credential_id");--> statement-breakpoint
+CREATE INDEX "idx_ssh_credential_usage_user" ON "ssh_credential_usage" USING btree ("user_id");--> statement-breakpoint
+CREATE INDEX "idx_ssh_credentials_user_id" ON "ssh_credentials" USING btree ("user_id");--> statement-breakpoint
+CREATE INDEX "idx_ssh_folders_user_id" ON "ssh_folders" USING btree ("user_id");--> statement-breakpoint
+CREATE INDEX "idx_transfer_recent_user" ON "transfer_recent" USING btree ("user_id");--> statement-breakpoint
+CREATE INDEX "idx_trusted_devices_user_id" ON "trusted_devices" USING btree ("user_id");--> statement-breakpoint
+CREATE INDEX "idx_user_open_tabs_user_id" ON "user_open_tabs" USING btree ("user_id");--> statement-breakpoint
+CREATE INDEX "idx_user_roles_role_id" ON "user_roles" USING btree ("role_id");--> statement-breakpoint
+CREATE INDEX "idx_user_workspaces_user_id" ON "user_workspaces" USING btree ("user_id");
\ No newline at end of file
diff --git a/drizzle/postgres/0012_dashing_mandroid.sql b/drizzle/postgres/0012_dashing_mandroid.sql
new file mode 100644
index 0000000..f999260
--- /dev/null
+++ b/drizzle/postgres/0012_dashing_mandroid.sql
@@ -0,0 +1,278 @@
+CREATE TABLE "ai_conversations" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "title" text,
+ "provider_id" integer,
+ "model" text,
+ "created_at" varchar(255) DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" varchar(255) DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "ai_messages" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "conversation_id" integer NOT NULL,
+ "role" text NOT NULL,
+ "content" text DEFAULT '' NOT NULL,
+ "tool_calls" text,
+ "created_at" varchar(255) DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "ai_proposals" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "conversation_id" integer NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "kind" text NOT NULL,
+ "summary" text,
+ "payload" text DEFAULT '{}' NOT NULL,
+ "status" varchar(255) DEFAULT 'pending' NOT NULL,
+ "applied_at" text,
+ "result_summary" text,
+ "created_at" varchar(255) DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "ai_providers" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "provider_type" text NOT NULL,
+ "label" varchar(255) NOT NULL,
+ "base_url" text,
+ "api_key" text,
+ "api_key_prefix" text,
+ "default_model" text,
+ "enabled" boolean DEFAULT true NOT NULL,
+ "created_at" varchar(255) DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" varchar(255) DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "automation_channels" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "automation_id" integer NOT NULL,
+ "channel_id" integer NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "automation_run_steps" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "run_id" integer NOT NULL,
+ "step_index" integer NOT NULL,
+ "step_id" text NOT NULL,
+ "step_type" text NOT NULL,
+ "status" varchar(255) NOT NULL,
+ "started_at" varchar(255) DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "finished_at" text,
+ "output" text,
+ "error" text,
+ "truncated" boolean DEFAULT false NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "automation_runs" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "automation_id" integer NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "trigger_type" text NOT NULL,
+ "trigger_context" text,
+ "status" varchar(255) NOT NULL,
+ "started_at" varchar(255) DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "finished_at" text,
+ "duration_ms" integer,
+ "error" text,
+ "dry_run" boolean DEFAULT false NOT NULL,
+ "parent_run_id" integer
+);
+--> statement-breakpoint
+CREATE TABLE "automation_schedules" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "automation_id" integer NOT NULL,
+ "cron" text,
+ "interval_seconds" integer,
+ "timezone" text,
+ "next_due_at" varchar(255),
+ "last_tick_at" text
+);
+--> statement-breakpoint
+CREATE TABLE "automation_trigger_state" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "automation_id" integer NOT NULL,
+ "state_key" varchar(255) NOT NULL,
+ "breach_started_at" text,
+ "last_fired_at" text,
+ "last_value" double precision,
+ "last_observed_state" text,
+ "updated_at" varchar(255) DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE "automations" (
+ "id" serial PRIMARY KEY NOT NULL,
+ "user_id" varchar(255) NOT NULL,
+ "name" varchar(255) NOT NULL,
+ "description" text,
+ "enabled" boolean DEFAULT true NOT NULL,
+ "definition" text NOT NULL,
+ "definition_version" integer DEFAULT 1 NOT NULL,
+ "concurrency_policy" text DEFAULT 'skip' NOT NULL,
+ "max_run_seconds" integer DEFAULT 300 NOT NULL,
+ "dry_run" boolean DEFAULT false NOT NULL,
+ "last_run_at" text,
+ "last_run_status" text,
+ "created_at" varchar(255) DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ "updated_at" varchar(255) DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+ALTER TABLE "alert_rules" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "alert_rules" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "alert_rules" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "alert_rules" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "api_keys" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "api_keys" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "c2s_tunnel_presets" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "c2s_tunnel_presets" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "c2s_tunnel_presets" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "c2s_tunnel_presets" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "credential_sidebar_preferences" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "credential_sidebar_preferences" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "dashboard_service_links" ALTER COLUMN "label" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "dashboard_service_links" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "dashboard_service_links" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "dashboard_service_links" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "dashboard_service_links" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "file_manager_shortcuts" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "file_manager_shortcuts" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "fleets" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "fleets" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "fleets" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "fleets" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "homepage_items" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "homepage_items" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "homepage_items" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "homepage_items" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "homepage_layouts" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "homepage_layouts" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "host_access" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "host_access" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "host_health_checks" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "host_health_checks" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "host_health_checks" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "host_health_checks" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "host_metrics_preferences" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "host_metrics_preferences" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "host_metrics_preferences" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "host_metrics_preferences" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "host_sidebar_preferences" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "host_sidebar_preferences" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "ssh_data" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "ssh_data" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "ssh_data" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "ssh_data" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "network_topology" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "network_topology" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "network_topology" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "network_topology" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "notification_channels" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "notification_channels" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "opkssh_tokens" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "opkssh_tokens" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "proxmox_stats_preferences" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "proxmox_stats_preferences" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "proxmox_stats_preferences" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "proxmox_stats_preferences" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "roles" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "roles" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "roles" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "roles" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "session_shares" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "session_shares" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "sessions" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "sessions" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "shared_host_auth_overrides" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "shared_host_auth_overrides" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "shared_host_auth_overrides" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "shared_host_auth_overrides" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "shared_host_secrets" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "shared_host_secrets" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "shared_host_secrets" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "shared_host_secrets" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "snippet_access" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "snippet_access" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "snippet_folders" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "snippet_folders" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "snippet_folders" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "snippet_folders" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "snippets" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "snippets" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "snippets" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "snippets" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "ssh_credentials" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "ssh_credentials" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "ssh_credentials" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "ssh_credentials" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "ssh_folders" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "ssh_folders" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "ssh_folders" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "ssh_folders" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "sso_providers" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "sso_providers" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "sso_providers" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "sso_providers" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "termix_identities" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "termix_identities" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "termix_identities" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "termix_identities" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "termix_identity_ca" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "termix_identity_ca" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "termix_identity_ca" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "termix_identity_ca" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "termix_identity_keys" ALTER COLUMN "label" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "termix_identity_keys" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "termix_identity_keys" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "tmux_session_tags" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "tmux_session_tags" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "trusted_devices" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "trusted_devices" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "ui_preferences" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "ui_preferences" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "user_open_tabs" ALTER COLUMN "label" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "user_open_tabs" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "user_open_tabs" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "user_open_tabs" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "user_open_tabs" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "user_preferences" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "user_preferences" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "user_workspaces" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "user_workspaces" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "user_workspaces" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "user_workspaces" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "vault_profiles" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "vault_profiles" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "vault_profiles" ALTER COLUMN "updated_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "vault_profiles" ALTER COLUMN "updated_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "vault_tokens" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "vault_tokens" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "webauthn_credentials" ALTER COLUMN "created_at" SET DATA TYPE varchar(255);--> statement-breakpoint
+ALTER TABLE "webauthn_credentials" ALTER COLUMN "created_at" SET DEFAULT CURRENT_TIMESTAMP;--> statement-breakpoint
+ALTER TABLE "user_preferences" ADD COLUMN "ai_assistant_enabled" boolean;--> statement-breakpoint
+ALTER TABLE "user_preferences" ADD COLUMN "ai_read_only_commands" boolean;--> statement-breakpoint
+ALTER TABLE "ai_conversations" ADD CONSTRAINT "ai_conversations_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ai_messages" ADD CONSTRAINT "ai_messages_conversation_id_ai_conversations_id_fk" FOREIGN KEY ("conversation_id") REFERENCES "public"."ai_conversations"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ai_proposals" ADD CONSTRAINT "ai_proposals_conversation_id_ai_conversations_id_fk" FOREIGN KEY ("conversation_id") REFERENCES "public"."ai_conversations"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ai_proposals" ADD CONSTRAINT "ai_proposals_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "ai_providers" ADD CONSTRAINT "ai_providers_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "automation_channels" ADD CONSTRAINT "automation_channels_automation_id_automations_id_fk" FOREIGN KEY ("automation_id") REFERENCES "public"."automations"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "automation_channels" ADD CONSTRAINT "automation_channels_channel_id_notification_channels_id_fk" FOREIGN KEY ("channel_id") REFERENCES "public"."notification_channels"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "automation_run_steps" ADD CONSTRAINT "automation_run_steps_run_id_automation_runs_id_fk" FOREIGN KEY ("run_id") REFERENCES "public"."automation_runs"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "automation_runs" ADD CONSTRAINT "automation_runs_automation_id_automations_id_fk" FOREIGN KEY ("automation_id") REFERENCES "public"."automations"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "automation_runs" ADD CONSTRAINT "automation_runs_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "automation_schedules" ADD CONSTRAINT "automation_schedules_automation_id_automations_id_fk" FOREIGN KEY ("automation_id") REFERENCES "public"."automations"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "automation_trigger_state" ADD CONSTRAINT "automation_trigger_state_automation_id_automations_id_fk" FOREIGN KEY ("automation_id") REFERENCES "public"."automations"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+ALTER TABLE "automations" ADD CONSTRAINT "automations_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
+CREATE INDEX "idx_ai_conversations_user" ON "ai_conversations" USING btree ("user_id","updated_at");--> statement-breakpoint
+CREATE INDEX "idx_ai_messages_conversation" ON "ai_messages" USING btree ("conversation_id","created_at");--> statement-breakpoint
+CREATE INDEX "idx_ai_proposals_user" ON "ai_proposals" USING btree ("user_id","status");--> statement-breakpoint
+CREATE INDEX "idx_ai_proposals_conversation" ON "ai_proposals" USING btree ("conversation_id");--> statement-breakpoint
+CREATE UNIQUE INDEX "idx_ai_providers_user_label" ON "ai_providers" USING btree ("user_id","label");--> statement-breakpoint
+CREATE UNIQUE INDEX "idx_automation_channels_pair" ON "automation_channels" USING btree ("automation_id","channel_id");--> statement-breakpoint
+CREATE INDEX "idx_automation_run_steps_run" ON "automation_run_steps" USING btree ("run_id","step_index");--> statement-breakpoint
+CREATE INDEX "idx_automation_runs_automation" ON "automation_runs" USING btree ("automation_id","started_at");--> statement-breakpoint
+CREATE INDEX "idx_automation_runs_user" ON "automation_runs" USING btree ("user_id","started_at");--> statement-breakpoint
+CREATE UNIQUE INDEX "idx_automation_schedules_automation" ON "automation_schedules" USING btree ("automation_id");--> statement-breakpoint
+CREATE INDEX "idx_automation_schedules_due" ON "automation_schedules" USING btree ("next_due_at");--> statement-breakpoint
+CREATE UNIQUE INDEX "idx_automation_trigger_state_key" ON "automation_trigger_state" USING btree ("automation_id","state_key");--> statement-breakpoint
+CREATE INDEX "idx_automations_user" ON "automations" USING btree ("user_id","enabled");
\ No newline at end of file
diff --git a/drizzle/postgres/0013_open_swarm.sql b/drizzle/postgres/0013_open_swarm.sql
new file mode 100644
index 0000000..c6f8a31
--- /dev/null
+++ b/drizzle/postgres/0013_open_swarm.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "user_preferences" ADD COLUMN "terminal_defaults" text;--> statement-breakpoint
+ALTER TABLE "user_preferences" ADD COLUMN "rdp_defaults" text;
\ No newline at end of file
diff --git a/drizzle/postgres/0014_unusual_maelstrom.sql b/drizzle/postgres/0014_unusual_maelstrom.sql
new file mode 100644
index 0000000..658d3b8
--- /dev/null
+++ b/drizzle/postgres/0014_unusual_maelstrom.sql
@@ -0,0 +1 @@
+ALTER TABLE "user_preferences" ADD COLUMN "terminal_macros" text;
\ No newline at end of file
diff --git a/drizzle/postgres/meta/0000_snapshot.json b/drizzle/postgres/meta/0000_snapshot.json
new file mode 100644
index 0000000..3ace594
--- /dev/null
+++ b/drizzle/postgres/meta/0000_snapshot.json
@@ -0,0 +1,5778 @@
+{
+ "id": "3d15ec30-87a9-4af4-855a-75e325a74c5d",
+ "prevId": "00000000-0000-0000-0000-000000000000",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.alert_firings": {
+ "name": "alert_firings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rules": {
+ "name": "alert_rules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.api_keys": {
+ "name": "api_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_logs": {
+ "name": "audit_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.command_history": {
+ "name": "command_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_recent": {
+ "name": "file_manager_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_items": {
+ "name": "homepage_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_layouts": {
+ "name": "homepage_layouts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_access": {
+ "name": "host_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_checks": {
+ "name": "host_health_checks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_history": {
+ "name": "host_health_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_history": {
+ "name": "host_metrics_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_data": {
+ "name": "ssh_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.network_topology": {
+ "name": "network_topology",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification_channels": {
+ "name": "notification_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.recent_activity": {
+ "name": "recent_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_recordings": {
+ "name": "session_recordings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_share_participants": {
+ "name": "session_share_participants",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_shares": {
+ "name": "session_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sessions": {
+ "name": "sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.settings": {
+ "name": "settings",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ {
+ "expression": "host_access_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_access": {
+ "name": "snippet_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_folders": {
+ "name": "snippet_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippets": {
+ "name": "snippets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credentials": {
+ "name": "ssh_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_folders": {
+ "name": "ssh_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_providers": {
+ "name": "sso_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_tombstones": {
+ "name": "sync_tombstones",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identities": {
+ "name": "termix_identities",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.transfer_recent": {
+ "name": "transfer_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.trusted_devices": {
+ "name": "trusted_devices",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_open_tabs": {
+ "name": "user_open_tabs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preferences": {
+ "name": "user_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_profiles": {
+ "name": "vault_profiles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_tokens": {
+ "name": "vault_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "profile_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/postgres/meta/0001_snapshot.json b/drizzle/postgres/meta/0001_snapshot.json
new file mode 100644
index 0000000..007a381
--- /dev/null
+++ b/drizzle/postgres/meta/0001_snapshot.json
@@ -0,0 +1,5836 @@
+{
+ "id": "c1bfa827-464a-4704-be00-456c5bdaa1a8",
+ "prevId": "3d15ec30-87a9-4af4-855a-75e325a74c5d",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.alert_firings": {
+ "name": "alert_firings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rules": {
+ "name": "alert_rules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.api_keys": {
+ "name": "api_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_logs": {
+ "name": "audit_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.command_history": {
+ "name": "command_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_recent": {
+ "name": "file_manager_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_items": {
+ "name": "homepage_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_layouts": {
+ "name": "homepage_layouts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_access": {
+ "name": "host_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_checks": {
+ "name": "host_health_checks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_history": {
+ "name": "host_health_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_history": {
+ "name": "host_metrics_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_data": {
+ "name": "ssh_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.network_topology": {
+ "name": "network_topology",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification_channels": {
+ "name": "notification_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.recent_activity": {
+ "name": "recent_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_recordings": {
+ "name": "session_recordings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_share_participants": {
+ "name": "session_share_participants",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_shares": {
+ "name": "session_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sessions": {
+ "name": "sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.settings": {
+ "name": "settings",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ {
+ "expression": "host_access_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_access": {
+ "name": "snippet_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_folders": {
+ "name": "snippet_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippets": {
+ "name": "snippets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credentials": {
+ "name": "ssh_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_folders": {
+ "name": "ssh_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_providers": {
+ "name": "sso_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_tombstones": {
+ "name": "sync_tombstones",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identities": {
+ "name": "termix_identities",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.transfer_recent": {
+ "name": "transfer_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.trusted_devices": {
+ "name": "trusted_devices",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_open_tabs": {
+ "name": "user_open_tabs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preferences": {
+ "name": "user_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_profiles": {
+ "name": "vault_profiles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_tokens": {
+ "name": "vault_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "profile_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/postgres/meta/0002_snapshot.json b/drizzle/postgres/meta/0002_snapshot.json
new file mode 100644
index 0000000..ab437ce
--- /dev/null
+++ b/drizzle/postgres/meta/0002_snapshot.json
@@ -0,0 +1,5895 @@
+{
+ "id": "f7c2232a-3513-4c49-bbf4-b7afbaf1ac19",
+ "prevId": "c1bfa827-464a-4704-be00-456c5bdaa1a8",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.alert_firings": {
+ "name": "alert_firings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rules": {
+ "name": "alert_rules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.api_keys": {
+ "name": "api_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_logs": {
+ "name": "audit_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.command_history": {
+ "name": "command_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_recent": {
+ "name": "file_manager_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_items": {
+ "name": "homepage_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_layouts": {
+ "name": "homepage_layouts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_access": {
+ "name": "host_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_checks": {
+ "name": "host_health_checks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_history": {
+ "name": "host_health_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_history": {
+ "name": "host_metrics_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_data": {
+ "name": "ssh_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.network_topology": {
+ "name": "network_topology",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification_channels": {
+ "name": "notification_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.recent_activity": {
+ "name": "recent_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_recordings": {
+ "name": "session_recordings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_share_participants": {
+ "name": "session_share_participants",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_shares": {
+ "name": "session_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sessions": {
+ "name": "sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.settings": {
+ "name": "settings",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ {
+ "expression": "host_access_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_access": {
+ "name": "snippet_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_folders": {
+ "name": "snippet_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippets": {
+ "name": "snippets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credentials": {
+ "name": "ssh_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_folders": {
+ "name": "ssh_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_providers": {
+ "name": "sso_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_tombstones": {
+ "name": "sync_tombstones",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identities": {
+ "name": "termix_identities",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.transfer_recent": {
+ "name": "transfer_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.trusted_devices": {
+ "name": "trusted_devices",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_open_tabs": {
+ "name": "user_open_tabs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preferences": {
+ "name": "user_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_profiles": {
+ "name": "vault_profiles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_tokens": {
+ "name": "vault_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "profile_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/postgres/meta/0003_snapshot.json b/drizzle/postgres/meta/0003_snapshot.json
new file mode 100644
index 0000000..6aa2a30
--- /dev/null
+++ b/drizzle/postgres/meta/0003_snapshot.json
@@ -0,0 +1,5902 @@
+{
+ "id": "cb4c2e4f-4af0-4400-8c42-19d867cf7943",
+ "prevId": "f7c2232a-3513-4c49-bbf4-b7afbaf1ac19",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.alert_firings": {
+ "name": "alert_firings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rules": {
+ "name": "alert_rules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.api_keys": {
+ "name": "api_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_logs": {
+ "name": "audit_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.command_history": {
+ "name": "command_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_recent": {
+ "name": "file_manager_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_items": {
+ "name": "homepage_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_layouts": {
+ "name": "homepage_layouts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_access": {
+ "name": "host_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_checks": {
+ "name": "host_health_checks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_history": {
+ "name": "host_health_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_history": {
+ "name": "host_metrics_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_data": {
+ "name": "ssh_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.network_topology": {
+ "name": "network_topology",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification_channels": {
+ "name": "notification_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.recent_activity": {
+ "name": "recent_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_recordings": {
+ "name": "session_recordings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_share_participants": {
+ "name": "session_share_participants",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_shares": {
+ "name": "session_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sessions": {
+ "name": "sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.settings": {
+ "name": "settings",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ {
+ "expression": "host_access_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_access": {
+ "name": "snippet_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_folders": {
+ "name": "snippet_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippets": {
+ "name": "snippets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credentials": {
+ "name": "ssh_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_folders": {
+ "name": "ssh_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_providers": {
+ "name": "sso_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_tombstones": {
+ "name": "sync_tombstones",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identities": {
+ "name": "termix_identities",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.transfer_recent": {
+ "name": "transfer_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.trusted_devices": {
+ "name": "trusted_devices",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_open_tabs": {
+ "name": "user_open_tabs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preferences": {
+ "name": "user_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_profiles": {
+ "name": "vault_profiles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_tokens": {
+ "name": "vault_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "profile_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/postgres/meta/0004_snapshot.json b/drizzle/postgres/meta/0004_snapshot.json
new file mode 100644
index 0000000..150186f
--- /dev/null
+++ b/drizzle/postgres/meta/0004_snapshot.json
@@ -0,0 +1,6091 @@
+{
+ "id": "f518d6ad-56f7-4bf4-82d2-6f7ad9a72c5b",
+ "prevId": "cb4c2e4f-4af0-4400-8c42-19d867cf7943",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.alert_firings": {
+ "name": "alert_firings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rules": {
+ "name": "alert_rules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.api_keys": {
+ "name": "api_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_logs": {
+ "name": "audit_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.command_history": {
+ "name": "command_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_recent": {
+ "name": "file_manager_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_items": {
+ "name": "homepage_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_layouts": {
+ "name": "homepage_layouts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_access": {
+ "name": "host_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_checks": {
+ "name": "host_health_checks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_history": {
+ "name": "host_health_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_history": {
+ "name": "host_metrics_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_data": {
+ "name": "ssh_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.network_topology": {
+ "name": "network_topology",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification_channels": {
+ "name": "notification_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.recent_activity": {
+ "name": "recent_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_recordings": {
+ "name": "session_recordings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_share_participants": {
+ "name": "session_share_participants",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_shares": {
+ "name": "session_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sessions": {
+ "name": "sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.settings": {
+ "name": "settings",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ {
+ "expression": "host_access_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_access": {
+ "name": "snippet_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_folders": {
+ "name": "snippet_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippets": {
+ "name": "snippets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credentials": {
+ "name": "ssh_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_folders": {
+ "name": "ssh_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_providers": {
+ "name": "sso_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_tombstones": {
+ "name": "sync_tombstones",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identities": {
+ "name": "termix_identities",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.transfer_recent": {
+ "name": "transfer_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.trusted_devices": {
+ "name": "trusted_devices",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_open_tabs": {
+ "name": "user_open_tabs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preferences": {
+ "name": "user_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_profiles": {
+ "name": "vault_profiles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_tokens": {
+ "name": "vault_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "profile_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/postgres/meta/0005_snapshot.json b/drizzle/postgres/meta/0005_snapshot.json
new file mode 100644
index 0000000..7b278b2
--- /dev/null
+++ b/drizzle/postgres/meta/0005_snapshot.json
@@ -0,0 +1,6098 @@
+{
+ "id": "4435715f-2ccd-48f4-b0a7-7f8f44e6a125",
+ "prevId": "f518d6ad-56f7-4bf4-82d2-6f7ad9a72c5b",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.alert_firings": {
+ "name": "alert_firings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rules": {
+ "name": "alert_rules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.api_keys": {
+ "name": "api_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_logs": {
+ "name": "audit_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.command_history": {
+ "name": "command_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_recent": {
+ "name": "file_manager_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_items": {
+ "name": "homepage_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_layouts": {
+ "name": "homepage_layouts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_access": {
+ "name": "host_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_checks": {
+ "name": "host_health_checks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_history": {
+ "name": "host_health_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_history": {
+ "name": "host_metrics_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_data": {
+ "name": "ssh_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.network_topology": {
+ "name": "network_topology",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification_channels": {
+ "name": "notification_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.recent_activity": {
+ "name": "recent_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_recordings": {
+ "name": "session_recordings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_share_participants": {
+ "name": "session_share_participants",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_shares": {
+ "name": "session_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sessions": {
+ "name": "sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.settings": {
+ "name": "settings",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ {
+ "expression": "host_access_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_access": {
+ "name": "snippet_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_folders": {
+ "name": "snippet_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippets": {
+ "name": "snippets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credentials": {
+ "name": "ssh_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_folders": {
+ "name": "ssh_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_providers": {
+ "name": "sso_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_tombstones": {
+ "name": "sync_tombstones",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identities": {
+ "name": "termix_identities",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.transfer_recent": {
+ "name": "transfer_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.trusted_devices": {
+ "name": "trusted_devices",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_open_tabs": {
+ "name": "user_open_tabs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preferences": {
+ "name": "user_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_profiles": {
+ "name": "vault_profiles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_tokens": {
+ "name": "vault_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "profile_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/postgres/meta/0006_snapshot.json b/drizzle/postgres/meta/0006_snapshot.json
new file mode 100644
index 0000000..e66c435
--- /dev/null
+++ b/drizzle/postgres/meta/0006_snapshot.json
@@ -0,0 +1,6411 @@
+{
+ "id": "58f37c2b-5c79-4b28-b7eb-aadc75561215",
+ "prevId": "4435715f-2ccd-48f4-b0a7-7f8f44e6a125",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.alert_firings": {
+ "name": "alert_firings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rules": {
+ "name": "alert_rules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.api_keys": {
+ "name": "api_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_logs": {
+ "name": "audit_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.command_history": {
+ "name": "command_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_recent": {
+ "name": "file_manager_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_inventory": {
+ "name": "fleet_inventory",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_members": {
+ "name": "fleet_members",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ {
+ "expression": "fleet_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleets": {
+ "name": "fleets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_items": {
+ "name": "homepage_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_layouts": {
+ "name": "homepage_layouts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_access": {
+ "name": "host_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_checks": {
+ "name": "host_health_checks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_history": {
+ "name": "host_health_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_history": {
+ "name": "host_metrics_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_data": {
+ "name": "ssh_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.network_topology": {
+ "name": "network_topology",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification_channels": {
+ "name": "notification_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.recent_activity": {
+ "name": "recent_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_recordings": {
+ "name": "session_recordings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_share_participants": {
+ "name": "session_share_participants",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_shares": {
+ "name": "session_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sessions": {
+ "name": "sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.settings": {
+ "name": "settings",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ {
+ "expression": "host_access_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_access": {
+ "name": "snippet_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_folders": {
+ "name": "snippet_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippets": {
+ "name": "snippets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credentials": {
+ "name": "ssh_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_folders": {
+ "name": "ssh_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_providers": {
+ "name": "sso_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_tombstones": {
+ "name": "sync_tombstones",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identities": {
+ "name": "termix_identities",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.transfer_recent": {
+ "name": "transfer_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.trusted_devices": {
+ "name": "trusted_devices",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_open_tabs": {
+ "name": "user_open_tabs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preferences": {
+ "name": "user_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_profiles": {
+ "name": "vault_profiles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_tokens": {
+ "name": "vault_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "profile_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/postgres/meta/0007_snapshot.json b/drizzle/postgres/meta/0007_snapshot.json
new file mode 100644
index 0000000..5ce600e
--- /dev/null
+++ b/drizzle/postgres/meta/0007_snapshot.json
@@ -0,0 +1,6430 @@
+{
+ "id": "c4007e77-b1f2-468b-93eb-93a9a2462991",
+ "prevId": "58f37c2b-5c79-4b28-b7eb-aadc75561215",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.alert_firings": {
+ "name": "alert_firings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rules": {
+ "name": "alert_rules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.api_keys": {
+ "name": "api_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_logs": {
+ "name": "audit_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.command_history": {
+ "name": "command_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_recent": {
+ "name": "file_manager_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_inventory": {
+ "name": "fleet_inventory",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_members": {
+ "name": "fleet_members",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ {
+ "expression": "fleet_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleets": {
+ "name": "fleets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_items": {
+ "name": "homepage_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_layouts": {
+ "name": "homepage_layouts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_access": {
+ "name": "host_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_checks": {
+ "name": "host_health_checks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_history": {
+ "name": "host_health_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_history": {
+ "name": "host_metrics_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_data": {
+ "name": "ssh_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.network_topology": {
+ "name": "network_topology",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification_channels": {
+ "name": "notification_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.recent_activity": {
+ "name": "recent_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_recordings": {
+ "name": "session_recordings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_share_participants": {
+ "name": "session_share_participants",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_shares": {
+ "name": "session_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sessions": {
+ "name": "sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.settings": {
+ "name": "settings",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ {
+ "expression": "host_access_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_access": {
+ "name": "snippet_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_folders": {
+ "name": "snippet_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippets": {
+ "name": "snippets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credentials": {
+ "name": "ssh_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_folders": {
+ "name": "ssh_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_providers": {
+ "name": "sso_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_tombstones": {
+ "name": "sync_tombstones",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identities": {
+ "name": "termix_identities",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.transfer_recent": {
+ "name": "transfer_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.trusted_devices": {
+ "name": "trusted_devices",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_open_tabs": {
+ "name": "user_open_tabs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preferences": {
+ "name": "user_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_profiles": {
+ "name": "vault_profiles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_tokens": {
+ "name": "vault_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "profile_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/postgres/meta/0008_snapshot.json b/drizzle/postgres/meta/0008_snapshot.json
new file mode 100644
index 0000000..e38eb4a
--- /dev/null
+++ b/drizzle/postgres/meta/0008_snapshot.json
@@ -0,0 +1,6542 @@
+{
+ "id": "5da91934-3c75-4ec0-a626-207b6af81f29",
+ "prevId": "c4007e77-b1f2-468b-93eb-93a9a2462991",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.alert_firings": {
+ "name": "alert_firings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rules": {
+ "name": "alert_rules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.api_keys": {
+ "name": "api_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_logs": {
+ "name": "audit_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.command_history": {
+ "name": "command_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_recent": {
+ "name": "file_manager_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_inventory": {
+ "name": "fleet_inventory",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_members": {
+ "name": "fleet_members",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ {
+ "expression": "fleet_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleets": {
+ "name": "fleets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_items": {
+ "name": "homepage_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_layouts": {
+ "name": "homepage_layouts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_access": {
+ "name": "host_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_checks": {
+ "name": "host_health_checks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_history": {
+ "name": "host_health_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_history": {
+ "name": "host_metrics_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_data": {
+ "name": "ssh_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.network_topology": {
+ "name": "network_topology",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification_channels": {
+ "name": "notification_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.recent_activity": {
+ "name": "recent_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_recordings": {
+ "name": "session_recordings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_share_participants": {
+ "name": "session_share_participants",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_shares": {
+ "name": "session_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sessions": {
+ "name": "sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.settings": {
+ "name": "settings",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ {
+ "expression": "host_access_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_access": {
+ "name": "snippet_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_folders": {
+ "name": "snippet_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippets": {
+ "name": "snippets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credentials": {
+ "name": "ssh_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_folders": {
+ "name": "ssh_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_providers": {
+ "name": "sso_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_tombstones": {
+ "name": "sync_tombstones",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identities": {
+ "name": "termix_identities",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.transfer_recent": {
+ "name": "transfer_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.trusted_devices": {
+ "name": "trusted_devices",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_open_tabs": {
+ "name": "user_open_tabs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preferences": {
+ "name": "user_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_workspaces": {
+ "name": "user_workspaces",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_profiles": {
+ "name": "vault_profiles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_tokens": {
+ "name": "vault_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "profile_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/postgres/meta/0009_snapshot.json b/drizzle/postgres/meta/0009_snapshot.json
new file mode 100644
index 0000000..d772145
--- /dev/null
+++ b/drizzle/postgres/meta/0009_snapshot.json
@@ -0,0 +1,6759 @@
+{
+ "id": "cc725657-acdc-4449-9814-94fac6a334e1",
+ "prevId": "5da91934-3c75-4ec0-a626-207b6af81f29",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.alert_firings": {
+ "name": "alert_firings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rules": {
+ "name": "alert_rules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.api_keys": {
+ "name": "api_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_logs": {
+ "name": "audit_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_audit_logs_timestamp": {
+ "name": "idx_audit_logs_timestamp",
+ "columns": [
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_user_ts": {
+ "name": "idx_audit_logs_user_ts",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_action_ts": {
+ "name": "idx_audit_logs_action_ts",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_resource_ts": {
+ "name": "idx_audit_logs_resource_ts",
+ "columns": [
+ {
+ "expression": "resource_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.command_history": {
+ "name": "command_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_recent": {
+ "name": "file_manager_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_inventory": {
+ "name": "fleet_inventory",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_members": {
+ "name": "fleet_members",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ {
+ "expression": "fleet_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleets": {
+ "name": "fleets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_items": {
+ "name": "homepage_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_layouts": {
+ "name": "homepage_layouts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_access": {
+ "name": "host_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_host_access_user_id": {
+ "name": "idx_host_access_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_role_id": {
+ "name": "idx_host_access_role_id",
+ "columns": [
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_host_id": {
+ "name": "idx_host_access_host_id",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_expires_at": {
+ "name": "idx_host_access_expires_at",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_checks": {
+ "name": "host_health_checks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_history": {
+ "name": "host_health_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_history": {
+ "name": "host_metrics_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_data": {
+ "name": "ssh_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_data_user_id": {
+ "name": "idx_ssh_data_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ssh_data_parent_host": {
+ "name": "idx_ssh_data_parent_host",
+ "columns": [
+ {
+ "expression": "parent_host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ssh_data_credential": {
+ "name": "idx_ssh_data_credential",
+ "columns": [
+ {
+ "expression": "credential_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.network_topology": {
+ "name": "network_topology",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification_channels": {
+ "name": "notification_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.recent_activity": {
+ "name": "recent_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_recordings": {
+ "name": "session_recordings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_share_participants": {
+ "name": "session_share_participants",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_shares": {
+ "name": "session_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sessions": {
+ "name": "sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_sessions_user_id": {
+ "name": "idx_sessions_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sessions_expires_at": {
+ "name": "idx_sessions_expires_at",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.settings": {
+ "name": "settings",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ {
+ "expression": "host_access_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_access": {
+ "name": "snippet_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_folders": {
+ "name": "snippet_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippets": {
+ "name": "snippets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credentials": {
+ "name": "ssh_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_folders": {
+ "name": "ssh_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_providers": {
+ "name": "sso_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_tombstones": {
+ "name": "sync_tombstones",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identities": {
+ "name": "termix_identities",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.transfer_recent": {
+ "name": "transfer_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.trusted_devices": {
+ "name": "trusted_devices",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_open_tabs": {
+ "name": "user_open_tabs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preferences": {
+ "name": "user_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_workspaces": {
+ "name": "user_workspaces",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_profiles": {
+ "name": "vault_profiles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_tokens": {
+ "name": "vault_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "profile_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/postgres/meta/0010_snapshot.json b/drizzle/postgres/meta/0010_snapshot.json
new file mode 100644
index 0000000..25afe28
--- /dev/null
+++ b/drizzle/postgres/meta/0010_snapshot.json
@@ -0,0 +1,6805 @@
+{
+ "id": "23ea2a99-7d72-4c02-8daf-708c04b62097",
+ "prevId": "cc725657-acdc-4449-9814-94fac6a334e1",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.alert_firings": {
+ "name": "alert_firings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rules": {
+ "name": "alert_rules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.api_keys": {
+ "name": "api_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_logs": {
+ "name": "audit_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_audit_logs_timestamp": {
+ "name": "idx_audit_logs_timestamp",
+ "columns": [
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_user_ts": {
+ "name": "idx_audit_logs_user_ts",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_action_ts": {
+ "name": "idx_audit_logs_action_ts",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_resource_ts": {
+ "name": "idx_audit_logs_resource_ts",
+ "columns": [
+ {
+ "expression": "resource_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.command_history": {
+ "name": "command_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_recent": {
+ "name": "file_manager_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_inventory": {
+ "name": "fleet_inventory",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_members": {
+ "name": "fleet_members",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ {
+ "expression": "fleet_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleets": {
+ "name": "fleets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_items": {
+ "name": "homepage_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_layouts": {
+ "name": "homepage_layouts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_access": {
+ "name": "host_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_host_access_user_id": {
+ "name": "idx_host_access_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_role_id": {
+ "name": "idx_host_access_role_id",
+ "columns": [
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_host_id": {
+ "name": "idx_host_access_host_id",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_expires_at": {
+ "name": "idx_host_access_expires_at",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_checks": {
+ "name": "host_health_checks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_history": {
+ "name": "host_health_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_history": {
+ "name": "host_metrics_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_data": {
+ "name": "ssh_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_data_user_id": {
+ "name": "idx_ssh_data_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ssh_data_parent_host": {
+ "name": "idx_ssh_data_parent_host",
+ "columns": [
+ {
+ "expression": "parent_host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ssh_data_credential": {
+ "name": "idx_ssh_data_credential",
+ "columns": [
+ {
+ "expression": "credential_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.network_topology": {
+ "name": "network_topology",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification_channels": {
+ "name": "notification_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.recent_activity": {
+ "name": "recent_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_recordings": {
+ "name": "session_recordings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_share_participants": {
+ "name": "session_share_participants",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_shares": {
+ "name": "session_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sessions": {
+ "name": "sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_sessions_user_id": {
+ "name": "idx_sessions_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sessions_expires_at": {
+ "name": "idx_sessions_expires_at",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.settings": {
+ "name": "settings",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ {
+ "expression": "host_access_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_access": {
+ "name": "snippet_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_folders": {
+ "name": "snippet_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippets": {
+ "name": "snippets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credentials": {
+ "name": "ssh_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_folders": {
+ "name": "ssh_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_providers": {
+ "name": "sso_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_tombstones": {
+ "name": "sync_tombstones",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identities": {
+ "name": "termix_identities",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.transfer_recent": {
+ "name": "transfer_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.trusted_devices": {
+ "name": "trusted_devices",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ui_preferences": {
+ "name": "ui_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ui_preferences_user_id_users_id_fk": {
+ "name": "ui_preferences_user_id_users_id_fk",
+ "tableFrom": "ui_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_open_tabs": {
+ "name": "user_open_tabs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preferences": {
+ "name": "user_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_workspaces": {
+ "name": "user_workspaces",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_profiles": {
+ "name": "vault_profiles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_tokens": {
+ "name": "vault_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "profile_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/postgres/meta/0011_snapshot.json b/drizzle/postgres/meta/0011_snapshot.json
new file mode 100644
index 0000000..f377ad7
--- /dev/null
+++ b/drizzle/postgres/meta/0011_snapshot.json
@@ -0,0 +1,7302 @@
+{
+ "id": "679ef592-a6fd-4c81-9889-89b0bcde7e19",
+ "prevId": "23ea2a99-7d72-4c02-8daf-708c04b62097",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.alert_firings": {
+ "name": "alert_firings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_alert_firings_rule": {
+ "name": "idx_alert_firings_rule",
+ "columns": [
+ {
+ "expression": "rule_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "fired_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_alert_firings_host": {
+ "name": "idx_alert_firings_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rules": {
+ "name": "alert_rules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.api_keys": {
+ "name": "api_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {
+ "idx_api_keys_user_id": {
+ "name": "idx_api_keys_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_logs": {
+ "name": "audit_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_audit_logs_timestamp": {
+ "name": "idx_audit_logs_timestamp",
+ "columns": [
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_user_ts": {
+ "name": "idx_audit_logs_user_ts",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_action_ts": {
+ "name": "idx_audit_logs_action_ts",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_resource_ts": {
+ "name": "idx_audit_logs_resource_ts",
+ "columns": [
+ {
+ "expression": "resource_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.command_history": {
+ "name": "command_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_command_history_user_host": {
+ "name": "idx_command_history_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_dismissed_alerts_user_id": {
+ "name": "idx_dismissed_alerts_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_pinned_user": {
+ "name": "idx_file_manager_pinned_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_recent": {
+ "name": "file_manager_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_recent_user": {
+ "name": "idx_file_manager_recent_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_shortcuts_user": {
+ "name": "idx_file_manager_shortcuts_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_inventory": {
+ "name": "fleet_inventory",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_fleet_inventory_user": {
+ "name": "idx_fleet_inventory_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_members": {
+ "name": "fleet_members",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ {
+ "expression": "fleet_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_fleet_members_host": {
+ "name": "idx_fleet_members_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleets": {
+ "name": "fleets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_items": {
+ "name": "homepage_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_homepage_items_user_id": {
+ "name": "idx_homepage_items_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_layouts": {
+ "name": "homepage_layouts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_access": {
+ "name": "host_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_host_access_user_id": {
+ "name": "idx_host_access_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_role_id": {
+ "name": "idx_host_access_role_id",
+ "columns": [
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_host_id": {
+ "name": "idx_host_access_host_id",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_expires_at": {
+ "name": "idx_host_access_expires_at",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_checks": {
+ "name": "host_health_checks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_history": {
+ "name": "host_health_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_history": {
+ "name": "host_metrics_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_data": {
+ "name": "ssh_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_data_user_id": {
+ "name": "idx_ssh_data_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ssh_data_parent_host": {
+ "name": "idx_ssh_data_parent_host",
+ "columns": [
+ {
+ "expression": "parent_host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ssh_data_credential": {
+ "name": "idx_ssh_data_credential",
+ "columns": [
+ {
+ "expression": "credential_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.network_topology": {
+ "name": "network_topology",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification_channels": {
+ "name": "notification_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.recent_activity": {
+ "name": "recent_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_recent_activity_user_ts": {
+ "name": "idx_recent_activity_user_ts",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_recordings": {
+ "name": "session_recordings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_session_recordings_user_started": {
+ "name": "idx_session_recordings_user_started",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "started_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_session_recordings_host": {
+ "name": "idx_session_recordings_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_share_participants": {
+ "name": "session_share_participants",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_shares": {
+ "name": "session_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_session_shares_session_id": {
+ "name": "idx_session_shares_session_id",
+ "columns": [
+ {
+ "expression": "session_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_session_shares_host_id": {
+ "name": "idx_session_shares_host_id",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sessions": {
+ "name": "sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_sessions_user_id": {
+ "name": "idx_sessions_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sessions_expires_at": {
+ "name": "idx_sessions_expires_at",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.settings": {
+ "name": "settings",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ {
+ "expression": "host_access_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_access": {
+ "name": "snippet_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_snippet_access_user_id": {
+ "name": "idx_snippet_access_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_snippet_access_snippet_id": {
+ "name": "idx_snippet_access_snippet_id",
+ "columns": [
+ {
+ "expression": "snippet_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_snippet_access_role_id": {
+ "name": "idx_snippet_access_role_id",
+ "columns": [
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_folders": {
+ "name": "snippet_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippets": {
+ "name": "snippets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_snippets_user_id": {
+ "name": "idx_snippets_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credential_usage_credential": {
+ "name": "idx_ssh_credential_usage_credential",
+ "columns": [
+ {
+ "expression": "credential_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ssh_credential_usage_user": {
+ "name": "idx_ssh_credential_usage_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credentials": {
+ "name": "ssh_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credentials_user_id": {
+ "name": "idx_ssh_credentials_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_folders": {
+ "name": "ssh_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_folders_user_id": {
+ "name": "idx_ssh_folders_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_providers": {
+ "name": "sso_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_tombstones": {
+ "name": "sync_tombstones",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identities": {
+ "name": "termix_identities",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.transfer_recent": {
+ "name": "transfer_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_transfer_recent_user": {
+ "name": "idx_transfer_recent_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.trusted_devices": {
+ "name": "trusted_devices",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_trusted_devices_user_id": {
+ "name": "idx_trusted_devices_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ui_preferences": {
+ "name": "ui_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ui_preferences_user_id_users_id_fk": {
+ "name": "ui_preferences_user_id_users_id_fk",
+ "tableFrom": "ui_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_open_tabs": {
+ "name": "user_open_tabs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_open_tabs_user_id": {
+ "name": "idx_user_open_tabs_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preferences": {
+ "name": "user_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_user_roles_role_id": {
+ "name": "idx_user_roles_role_id",
+ "columns": [
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_workspaces": {
+ "name": "user_workspaces",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_user_workspaces_user_id": {
+ "name": "idx_user_workspaces_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_profiles": {
+ "name": "vault_profiles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_tokens": {
+ "name": "vault_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "profile_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/postgres/meta/0012_snapshot.json b/drizzle/postgres/meta/0012_snapshot.json
new file mode 100644
index 0000000..3060143
--- /dev/null
+++ b/drizzle/postgres/meta/0012_snapshot.json
@@ -0,0 +1,8444 @@
+{
+ "id": "029820e0-269d-489c-a0db-641be03ea389",
+ "prevId": "679ef592-a6fd-4c81-9889-89b0bcde7e19",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.ai_conversations": {
+ "name": "ai_conversations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_conversations_user": {
+ "name": "idx_ai_conversations_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ai_conversations_user_id_users_id_fk": {
+ "name": "ai_conversations_user_id_users_id_fk",
+ "tableFrom": "ai_conversations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai_messages": {
+ "name": "ai_messages",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "tool_calls": {
+ "name": "tool_calls",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_messages_conversation": {
+ "name": "idx_ai_messages_conversation",
+ "columns": [
+ {
+ "expression": "conversation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ai_messages_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_messages_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_messages",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai_proposals": {
+ "name": "ai_proposals",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "applied_at": {
+ "name": "applied_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "result_summary": {
+ "name": "result_summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_proposals_user": {
+ "name": "idx_ai_proposals_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ai_proposals_conversation": {
+ "name": "idx_ai_proposals_conversation",
+ "columns": [
+ {
+ "expression": "conversation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ai_proposals_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_proposals_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ai_proposals_user_id_users_id_fk": {
+ "name": "ai_proposals_user_id_users_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai_providers": {
+ "name": "ai_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider_type": {
+ "name": "provider_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_url": {
+ "name": "base_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_key": {
+ "name": "api_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_key_prefix": {
+ "name": "api_key_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "default_model": {
+ "name": "default_model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_providers_user_label": {
+ "name": "idx_ai_providers_user_label",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "label",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ai_providers_user_id_users_id_fk": {
+ "name": "ai_providers_user_id_users_id_fk",
+ "tableFrom": "ai_providers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_firings": {
+ "name": "alert_firings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_alert_firings_rule": {
+ "name": "idx_alert_firings_rule",
+ "columns": [
+ {
+ "expression": "rule_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "fired_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_alert_firings_host": {
+ "name": "idx_alert_firings_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rules": {
+ "name": "alert_rules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.api_keys": {
+ "name": "api_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {
+ "idx_api_keys_user_id": {
+ "name": "idx_api_keys_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_logs": {
+ "name": "audit_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_audit_logs_timestamp": {
+ "name": "idx_audit_logs_timestamp",
+ "columns": [
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_user_ts": {
+ "name": "idx_audit_logs_user_ts",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_action_ts": {
+ "name": "idx_audit_logs_action_ts",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_resource_ts": {
+ "name": "idx_audit_logs_resource_ts",
+ "columns": [
+ {
+ "expression": "resource_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automation_channels": {
+ "name": "automation_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "idx_automation_channels_pair": {
+ "name": "idx_automation_channels_pair",
+ "columns": [
+ {
+ "expression": "automation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "channel_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automation_channels_automation_id_automations_id_fk": {
+ "name": "automation_channels_automation_id_automations_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_channels_channel_id_notification_channels_id_fk": {
+ "name": "automation_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automation_run_steps": {
+ "name": "automation_run_steps",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "run_id": {
+ "name": "run_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "step_index": {
+ "name": "step_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "step_id": {
+ "name": "step_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "step_type": {
+ "name": "step_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "output": {
+ "name": "output",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "truncated": {
+ "name": "truncated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_automation_run_steps_run": {
+ "name": "idx_automation_run_steps_run",
+ "columns": [
+ {
+ "expression": "run_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "step_index",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automation_run_steps_run_id_automation_runs_id_fk": {
+ "name": "automation_run_steps_run_id_automation_runs_id_fk",
+ "tableFrom": "automation_run_steps",
+ "tableTo": "automation_runs",
+ "columnsFrom": [
+ "run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automation_runs": {
+ "name": "automation_runs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "trigger_context": {
+ "name": "trigger_context",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration_ms": {
+ "name": "duration_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "parent_run_id": {
+ "name": "parent_run_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_automation_runs_automation": {
+ "name": "idx_automation_runs_automation",
+ "columns": [
+ {
+ "expression": "automation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "started_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_automation_runs_user": {
+ "name": "idx_automation_runs_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "started_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automation_runs_automation_id_automations_id_fk": {
+ "name": "automation_runs_automation_id_automations_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_runs_user_id_users_id_fk": {
+ "name": "automation_runs_user_id_users_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automation_schedules": {
+ "name": "automation_schedules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cron": {
+ "name": "cron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "next_due_at": {
+ "name": "next_due_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_tick_at": {
+ "name": "last_tick_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_automation_schedules_automation": {
+ "name": "idx_automation_schedules_automation",
+ "columns": [
+ {
+ "expression": "automation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_automation_schedules_due": {
+ "name": "idx_automation_schedules_due",
+ "columns": [
+ {
+ "expression": "next_due_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automation_schedules_automation_id_automations_id_fk": {
+ "name": "automation_schedules_automation_id_automations_id_fk",
+ "tableFrom": "automation_schedules",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automation_trigger_state": {
+ "name": "automation_trigger_state",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state_key": {
+ "name": "state_key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "breach_started_at": {
+ "name": "breach_started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_fired_at": {
+ "name": "last_fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_value": {
+ "name": "last_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_observed_state": {
+ "name": "last_observed_state",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_automation_trigger_state_key": {
+ "name": "idx_automation_trigger_state_key",
+ "columns": [
+ {
+ "expression": "automation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "state_key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automation_trigger_state_automation_id_automations_id_fk": {
+ "name": "automation_trigger_state_automation_id_automations_id_fk",
+ "tableFrom": "automation_trigger_state",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automations": {
+ "name": "automations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "definition": {
+ "name": "definition",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "definition_version": {
+ "name": "definition_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "concurrency_policy": {
+ "name": "concurrency_policy",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'skip'"
+ },
+ "max_run_seconds": {
+ "name": "max_run_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "last_run_at": {
+ "name": "last_run_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_run_status": {
+ "name": "last_run_status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_automations_user": {
+ "name": "idx_automations_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "enabled",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automations_user_id_users_id_fk": {
+ "name": "automations_user_id_users_id_fk",
+ "tableFrom": "automations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.command_history": {
+ "name": "command_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_command_history_user_host": {
+ "name": "idx_command_history_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_dismissed_alerts_user_id": {
+ "name": "idx_dismissed_alerts_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_pinned_user": {
+ "name": "idx_file_manager_pinned_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_recent": {
+ "name": "file_manager_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_recent_user": {
+ "name": "idx_file_manager_recent_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_shortcuts_user": {
+ "name": "idx_file_manager_shortcuts_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_inventory": {
+ "name": "fleet_inventory",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_fleet_inventory_user": {
+ "name": "idx_fleet_inventory_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_members": {
+ "name": "fleet_members",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ {
+ "expression": "fleet_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_fleet_members_host": {
+ "name": "idx_fleet_members_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleets": {
+ "name": "fleets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_items": {
+ "name": "homepage_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_homepage_items_user_id": {
+ "name": "idx_homepage_items_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_layouts": {
+ "name": "homepage_layouts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_access": {
+ "name": "host_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_host_access_user_id": {
+ "name": "idx_host_access_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_role_id": {
+ "name": "idx_host_access_role_id",
+ "columns": [
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_host_id": {
+ "name": "idx_host_access_host_id",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_expires_at": {
+ "name": "idx_host_access_expires_at",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_checks": {
+ "name": "host_health_checks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_history": {
+ "name": "host_health_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_history": {
+ "name": "host_metrics_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_data": {
+ "name": "ssh_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_data_user_id": {
+ "name": "idx_ssh_data_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ssh_data_parent_host": {
+ "name": "idx_ssh_data_parent_host",
+ "columns": [
+ {
+ "expression": "parent_host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ssh_data_credential": {
+ "name": "idx_ssh_data_credential",
+ "columns": [
+ {
+ "expression": "credential_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.network_topology": {
+ "name": "network_topology",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification_channels": {
+ "name": "notification_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.recent_activity": {
+ "name": "recent_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_recent_activity_user_ts": {
+ "name": "idx_recent_activity_user_ts",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_recordings": {
+ "name": "session_recordings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_session_recordings_user_started": {
+ "name": "idx_session_recordings_user_started",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "started_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_session_recordings_host": {
+ "name": "idx_session_recordings_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_share_participants": {
+ "name": "session_share_participants",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_shares": {
+ "name": "session_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_session_shares_session_id": {
+ "name": "idx_session_shares_session_id",
+ "columns": [
+ {
+ "expression": "session_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_session_shares_host_id": {
+ "name": "idx_session_shares_host_id",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sessions": {
+ "name": "sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_sessions_user_id": {
+ "name": "idx_sessions_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sessions_expires_at": {
+ "name": "idx_sessions_expires_at",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.settings": {
+ "name": "settings",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ {
+ "expression": "host_access_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_access": {
+ "name": "snippet_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_snippet_access_user_id": {
+ "name": "idx_snippet_access_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_snippet_access_snippet_id": {
+ "name": "idx_snippet_access_snippet_id",
+ "columns": [
+ {
+ "expression": "snippet_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_snippet_access_role_id": {
+ "name": "idx_snippet_access_role_id",
+ "columns": [
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_folders": {
+ "name": "snippet_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippets": {
+ "name": "snippets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_snippets_user_id": {
+ "name": "idx_snippets_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credential_usage_credential": {
+ "name": "idx_ssh_credential_usage_credential",
+ "columns": [
+ {
+ "expression": "credential_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ssh_credential_usage_user": {
+ "name": "idx_ssh_credential_usage_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credentials": {
+ "name": "ssh_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credentials_user_id": {
+ "name": "idx_ssh_credentials_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_folders": {
+ "name": "ssh_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_folders_user_id": {
+ "name": "idx_ssh_folders_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_providers": {
+ "name": "sso_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_tombstones": {
+ "name": "sync_tombstones",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identities": {
+ "name": "termix_identities",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.transfer_recent": {
+ "name": "transfer_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_transfer_recent_user": {
+ "name": "idx_transfer_recent_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.trusted_devices": {
+ "name": "trusted_devices",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_trusted_devices_user_id": {
+ "name": "idx_trusted_devices_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ui_preferences": {
+ "name": "ui_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ui_preferences_user_id_users_id_fk": {
+ "name": "ui_preferences_user_id_users_id_fk",
+ "tableFrom": "ui_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_open_tabs": {
+ "name": "user_open_tabs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_open_tabs_user_id": {
+ "name": "idx_user_open_tabs_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preferences": {
+ "name": "user_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ai_assistant_enabled": {
+ "name": "ai_assistant_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ai_read_only_commands": {
+ "name": "ai_read_only_commands",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_user_roles_role_id": {
+ "name": "idx_user_roles_role_id",
+ "columns": [
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_workspaces": {
+ "name": "user_workspaces",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_user_workspaces_user_id": {
+ "name": "idx_user_workspaces_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_profiles": {
+ "name": "vault_profiles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_tokens": {
+ "name": "vault_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "profile_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/postgres/meta/0013_snapshot.json b/drizzle/postgres/meta/0013_snapshot.json
new file mode 100644
index 0000000..e30099c
--- /dev/null
+++ b/drizzle/postgres/meta/0013_snapshot.json
@@ -0,0 +1,8456 @@
+{
+ "id": "d48c48e5-ea0c-4f17-9848-49445db3a0e6",
+ "prevId": "029820e0-269d-489c-a0db-641be03ea389",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.ai_conversations": {
+ "name": "ai_conversations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_conversations_user": {
+ "name": "idx_ai_conversations_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ai_conversations_user_id_users_id_fk": {
+ "name": "ai_conversations_user_id_users_id_fk",
+ "tableFrom": "ai_conversations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai_messages": {
+ "name": "ai_messages",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "tool_calls": {
+ "name": "tool_calls",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_messages_conversation": {
+ "name": "idx_ai_messages_conversation",
+ "columns": [
+ {
+ "expression": "conversation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ai_messages_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_messages_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_messages",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai_proposals": {
+ "name": "ai_proposals",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "applied_at": {
+ "name": "applied_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "result_summary": {
+ "name": "result_summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_proposals_user": {
+ "name": "idx_ai_proposals_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ai_proposals_conversation": {
+ "name": "idx_ai_proposals_conversation",
+ "columns": [
+ {
+ "expression": "conversation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ai_proposals_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_proposals_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ai_proposals_user_id_users_id_fk": {
+ "name": "ai_proposals_user_id_users_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai_providers": {
+ "name": "ai_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider_type": {
+ "name": "provider_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_url": {
+ "name": "base_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_key": {
+ "name": "api_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_key_prefix": {
+ "name": "api_key_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "default_model": {
+ "name": "default_model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_providers_user_label": {
+ "name": "idx_ai_providers_user_label",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "label",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ai_providers_user_id_users_id_fk": {
+ "name": "ai_providers_user_id_users_id_fk",
+ "tableFrom": "ai_providers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_firings": {
+ "name": "alert_firings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_alert_firings_rule": {
+ "name": "idx_alert_firings_rule",
+ "columns": [
+ {
+ "expression": "rule_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "fired_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_alert_firings_host": {
+ "name": "idx_alert_firings_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rules": {
+ "name": "alert_rules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.api_keys": {
+ "name": "api_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {
+ "idx_api_keys_user_id": {
+ "name": "idx_api_keys_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_logs": {
+ "name": "audit_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_audit_logs_timestamp": {
+ "name": "idx_audit_logs_timestamp",
+ "columns": [
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_user_ts": {
+ "name": "idx_audit_logs_user_ts",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_action_ts": {
+ "name": "idx_audit_logs_action_ts",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_resource_ts": {
+ "name": "idx_audit_logs_resource_ts",
+ "columns": [
+ {
+ "expression": "resource_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automation_channels": {
+ "name": "automation_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "idx_automation_channels_pair": {
+ "name": "idx_automation_channels_pair",
+ "columns": [
+ {
+ "expression": "automation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "channel_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automation_channels_automation_id_automations_id_fk": {
+ "name": "automation_channels_automation_id_automations_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_channels_channel_id_notification_channels_id_fk": {
+ "name": "automation_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automation_run_steps": {
+ "name": "automation_run_steps",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "run_id": {
+ "name": "run_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "step_index": {
+ "name": "step_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "step_id": {
+ "name": "step_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "step_type": {
+ "name": "step_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "output": {
+ "name": "output",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "truncated": {
+ "name": "truncated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_automation_run_steps_run": {
+ "name": "idx_automation_run_steps_run",
+ "columns": [
+ {
+ "expression": "run_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "step_index",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automation_run_steps_run_id_automation_runs_id_fk": {
+ "name": "automation_run_steps_run_id_automation_runs_id_fk",
+ "tableFrom": "automation_run_steps",
+ "tableTo": "automation_runs",
+ "columnsFrom": [
+ "run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automation_runs": {
+ "name": "automation_runs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "trigger_context": {
+ "name": "trigger_context",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration_ms": {
+ "name": "duration_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "parent_run_id": {
+ "name": "parent_run_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_automation_runs_automation": {
+ "name": "idx_automation_runs_automation",
+ "columns": [
+ {
+ "expression": "automation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "started_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_automation_runs_user": {
+ "name": "idx_automation_runs_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "started_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automation_runs_automation_id_automations_id_fk": {
+ "name": "automation_runs_automation_id_automations_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_runs_user_id_users_id_fk": {
+ "name": "automation_runs_user_id_users_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automation_schedules": {
+ "name": "automation_schedules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cron": {
+ "name": "cron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "next_due_at": {
+ "name": "next_due_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_tick_at": {
+ "name": "last_tick_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_automation_schedules_automation": {
+ "name": "idx_automation_schedules_automation",
+ "columns": [
+ {
+ "expression": "automation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_automation_schedules_due": {
+ "name": "idx_automation_schedules_due",
+ "columns": [
+ {
+ "expression": "next_due_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automation_schedules_automation_id_automations_id_fk": {
+ "name": "automation_schedules_automation_id_automations_id_fk",
+ "tableFrom": "automation_schedules",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automation_trigger_state": {
+ "name": "automation_trigger_state",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state_key": {
+ "name": "state_key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "breach_started_at": {
+ "name": "breach_started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_fired_at": {
+ "name": "last_fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_value": {
+ "name": "last_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_observed_state": {
+ "name": "last_observed_state",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_automation_trigger_state_key": {
+ "name": "idx_automation_trigger_state_key",
+ "columns": [
+ {
+ "expression": "automation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "state_key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automation_trigger_state_automation_id_automations_id_fk": {
+ "name": "automation_trigger_state_automation_id_automations_id_fk",
+ "tableFrom": "automation_trigger_state",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automations": {
+ "name": "automations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "definition": {
+ "name": "definition",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "definition_version": {
+ "name": "definition_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "concurrency_policy": {
+ "name": "concurrency_policy",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'skip'"
+ },
+ "max_run_seconds": {
+ "name": "max_run_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "last_run_at": {
+ "name": "last_run_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_run_status": {
+ "name": "last_run_status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_automations_user": {
+ "name": "idx_automations_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "enabled",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automations_user_id_users_id_fk": {
+ "name": "automations_user_id_users_id_fk",
+ "tableFrom": "automations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.command_history": {
+ "name": "command_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_command_history_user_host": {
+ "name": "idx_command_history_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_dismissed_alerts_user_id": {
+ "name": "idx_dismissed_alerts_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_pinned_user": {
+ "name": "idx_file_manager_pinned_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_recent": {
+ "name": "file_manager_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_recent_user": {
+ "name": "idx_file_manager_recent_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_shortcuts_user": {
+ "name": "idx_file_manager_shortcuts_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_inventory": {
+ "name": "fleet_inventory",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_fleet_inventory_user": {
+ "name": "idx_fleet_inventory_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_members": {
+ "name": "fleet_members",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ {
+ "expression": "fleet_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_fleet_members_host": {
+ "name": "idx_fleet_members_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleets": {
+ "name": "fleets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_items": {
+ "name": "homepage_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_homepage_items_user_id": {
+ "name": "idx_homepage_items_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_layouts": {
+ "name": "homepage_layouts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_access": {
+ "name": "host_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_host_access_user_id": {
+ "name": "idx_host_access_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_role_id": {
+ "name": "idx_host_access_role_id",
+ "columns": [
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_host_id": {
+ "name": "idx_host_access_host_id",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_expires_at": {
+ "name": "idx_host_access_expires_at",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_checks": {
+ "name": "host_health_checks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_history": {
+ "name": "host_health_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_history": {
+ "name": "host_metrics_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_data": {
+ "name": "ssh_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_data_user_id": {
+ "name": "idx_ssh_data_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ssh_data_parent_host": {
+ "name": "idx_ssh_data_parent_host",
+ "columns": [
+ {
+ "expression": "parent_host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ssh_data_credential": {
+ "name": "idx_ssh_data_credential",
+ "columns": [
+ {
+ "expression": "credential_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.network_topology": {
+ "name": "network_topology",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification_channels": {
+ "name": "notification_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.recent_activity": {
+ "name": "recent_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_recent_activity_user_ts": {
+ "name": "idx_recent_activity_user_ts",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_recordings": {
+ "name": "session_recordings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_session_recordings_user_started": {
+ "name": "idx_session_recordings_user_started",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "started_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_session_recordings_host": {
+ "name": "idx_session_recordings_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_share_participants": {
+ "name": "session_share_participants",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_shares": {
+ "name": "session_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_session_shares_session_id": {
+ "name": "idx_session_shares_session_id",
+ "columns": [
+ {
+ "expression": "session_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_session_shares_host_id": {
+ "name": "idx_session_shares_host_id",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sessions": {
+ "name": "sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_sessions_user_id": {
+ "name": "idx_sessions_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sessions_expires_at": {
+ "name": "idx_sessions_expires_at",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.settings": {
+ "name": "settings",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ {
+ "expression": "host_access_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_access": {
+ "name": "snippet_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_snippet_access_user_id": {
+ "name": "idx_snippet_access_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_snippet_access_snippet_id": {
+ "name": "idx_snippet_access_snippet_id",
+ "columns": [
+ {
+ "expression": "snippet_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_snippet_access_role_id": {
+ "name": "idx_snippet_access_role_id",
+ "columns": [
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_folders": {
+ "name": "snippet_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippets": {
+ "name": "snippets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_snippets_user_id": {
+ "name": "idx_snippets_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credential_usage_credential": {
+ "name": "idx_ssh_credential_usage_credential",
+ "columns": [
+ {
+ "expression": "credential_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ssh_credential_usage_user": {
+ "name": "idx_ssh_credential_usage_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credentials": {
+ "name": "ssh_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credentials_user_id": {
+ "name": "idx_ssh_credentials_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_folders": {
+ "name": "ssh_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_folders_user_id": {
+ "name": "idx_ssh_folders_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_providers": {
+ "name": "sso_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_tombstones": {
+ "name": "sync_tombstones",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identities": {
+ "name": "termix_identities",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.transfer_recent": {
+ "name": "transfer_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_transfer_recent_user": {
+ "name": "idx_transfer_recent_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.trusted_devices": {
+ "name": "trusted_devices",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_trusted_devices_user_id": {
+ "name": "idx_trusted_devices_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ui_preferences": {
+ "name": "ui_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ui_preferences_user_id_users_id_fk": {
+ "name": "ui_preferences_user_id_users_id_fk",
+ "tableFrom": "ui_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_open_tabs": {
+ "name": "user_open_tabs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_open_tabs_user_id": {
+ "name": "idx_user_open_tabs_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preferences": {
+ "name": "user_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ai_assistant_enabled": {
+ "name": "ai_assistant_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ai_read_only_commands": {
+ "name": "ai_read_only_commands",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_defaults": {
+ "name": "terminal_defaults",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_defaults": {
+ "name": "rdp_defaults",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_user_roles_role_id": {
+ "name": "idx_user_roles_role_id",
+ "columns": [
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_workspaces": {
+ "name": "user_workspaces",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_user_workspaces_user_id": {
+ "name": "idx_user_workspaces_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_profiles": {
+ "name": "vault_profiles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_tokens": {
+ "name": "vault_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "profile_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/postgres/meta/0014_snapshot.json b/drizzle/postgres/meta/0014_snapshot.json
new file mode 100644
index 0000000..dc7101d
--- /dev/null
+++ b/drizzle/postgres/meta/0014_snapshot.json
@@ -0,0 +1,8462 @@
+{
+ "id": "63268872-e33c-4e4c-ae9d-bd5c7340bf8b",
+ "prevId": "d48c48e5-ea0c-4f17-9848-49445db3a0e6",
+ "version": "7",
+ "dialect": "postgresql",
+ "tables": {
+ "public.ai_conversations": {
+ "name": "ai_conversations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_conversations_user": {
+ "name": "idx_ai_conversations_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "updated_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ai_conversations_user_id_users_id_fk": {
+ "name": "ai_conversations_user_id_users_id_fk",
+ "tableFrom": "ai_conversations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai_messages": {
+ "name": "ai_messages",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "''"
+ },
+ "tool_calls": {
+ "name": "tool_calls",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_messages_conversation": {
+ "name": "idx_ai_messages_conversation",
+ "columns": [
+ {
+ "expression": "conversation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "created_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ai_messages_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_messages_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_messages",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai_proposals": {
+ "name": "ai_proposals",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'pending'"
+ },
+ "applied_at": {
+ "name": "applied_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "result_summary": {
+ "name": "result_summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_proposals_user": {
+ "name": "idx_ai_proposals_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "status",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ai_proposals_conversation": {
+ "name": "idx_ai_proposals_conversation",
+ "columns": [
+ {
+ "expression": "conversation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ai_proposals_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_proposals_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ai_proposals_user_id_users_id_fk": {
+ "name": "ai_proposals_user_id_users_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ai_providers": {
+ "name": "ai_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "provider_type": {
+ "name": "provider_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "base_url": {
+ "name": "base_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_key": {
+ "name": "api_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "api_key_prefix": {
+ "name": "api_key_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "default_model": {
+ "name": "default_model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_providers_user_label": {
+ "name": "idx_ai_providers_user_label",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "label",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ai_providers_user_id_users_id_fk": {
+ "name": "ai_providers_user_id_users_id_fk",
+ "tableFrom": "ai_providers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_firings": {
+ "name": "alert_firings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "value": {
+ "name": "value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_alert_firings_rule": {
+ "name": "idx_alert_firings_rule",
+ "columns": [
+ {
+ "expression": "rule_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "fired_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_alert_firings_host": {
+ "name": "idx_alert_firings_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.alert_rules": {
+ "name": "alert_rules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.api_keys": {
+ "name": "api_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ }
+ },
+ "indexes": {
+ "idx_api_keys_user_id": {
+ "name": "idx_api_keys_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.audit_logs": {
+ "name": "audit_logs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "action": {
+ "name": "action",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "success": {
+ "name": "success",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_audit_logs_timestamp": {
+ "name": "idx_audit_logs_timestamp",
+ "columns": [
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_user_ts": {
+ "name": "idx_audit_logs_user_ts",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_action_ts": {
+ "name": "idx_audit_logs_action_ts",
+ "columns": [
+ {
+ "expression": "action",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_audit_logs_resource_ts": {
+ "name": "idx_audit_logs_resource_ts",
+ "columns": [
+ {
+ "expression": "resource_type",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automation_channels": {
+ "name": "automation_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {
+ "idx_automation_channels_pair": {
+ "name": "idx_automation_channels_pair",
+ "columns": [
+ {
+ "expression": "automation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "channel_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automation_channels_automation_id_automations_id_fk": {
+ "name": "automation_channels_automation_id_automations_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_channels_channel_id_notification_channels_id_fk": {
+ "name": "automation_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automation_run_steps": {
+ "name": "automation_run_steps",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "run_id": {
+ "name": "run_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "step_index": {
+ "name": "step_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "step_id": {
+ "name": "step_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "step_type": {
+ "name": "step_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "output": {
+ "name": "output",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "truncated": {
+ "name": "truncated",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_automation_run_steps_run": {
+ "name": "idx_automation_run_steps_run",
+ "columns": [
+ {
+ "expression": "run_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "step_index",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automation_run_steps_run_id_automation_runs_id_fk": {
+ "name": "automation_run_steps_run_id_automation_runs_id_fk",
+ "tableFrom": "automation_run_steps",
+ "tableTo": "automation_runs",
+ "columnsFrom": [
+ "run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automation_runs": {
+ "name": "automation_runs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "trigger_context": {
+ "name": "trigger_context",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status": {
+ "name": "status",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration_ms": {
+ "name": "duration_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "parent_run_id": {
+ "name": "parent_run_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_automation_runs_automation": {
+ "name": "idx_automation_runs_automation",
+ "columns": [
+ {
+ "expression": "automation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "started_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_automation_runs_user": {
+ "name": "idx_automation_runs_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "started_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automation_runs_automation_id_automations_id_fk": {
+ "name": "automation_runs_automation_id_automations_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_runs_user_id_users_id_fk": {
+ "name": "automation_runs_user_id_users_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automation_schedules": {
+ "name": "automation_schedules",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "cron": {
+ "name": "cron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "next_due_at": {
+ "name": "next_due_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_tick_at": {
+ "name": "last_tick_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_automation_schedules_automation": {
+ "name": "idx_automation_schedules_automation",
+ "columns": [
+ {
+ "expression": "automation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_automation_schedules_due": {
+ "name": "idx_automation_schedules_due",
+ "columns": [
+ {
+ "expression": "next_due_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automation_schedules_automation_id_automations_id_fk": {
+ "name": "automation_schedules_automation_id_automations_id_fk",
+ "tableFrom": "automation_schedules",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automation_trigger_state": {
+ "name": "automation_trigger_state",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "state_key": {
+ "name": "state_key",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "breach_started_at": {
+ "name": "breach_started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_fired_at": {
+ "name": "last_fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_value": {
+ "name": "last_value",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_observed_state": {
+ "name": "last_observed_state",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_automation_trigger_state_key": {
+ "name": "idx_automation_trigger_state_key",
+ "columns": [
+ {
+ "expression": "automation_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "state_key",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automation_trigger_state_automation_id_automations_id_fk": {
+ "name": "automation_trigger_state_automation_id_automations_id_fk",
+ "tableFrom": "automation_trigger_state",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.automations": {
+ "name": "automations",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "definition": {
+ "name": "definition",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "definition_version": {
+ "name": "definition_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 1
+ },
+ "concurrency_policy": {
+ "name": "concurrency_policy",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'skip'"
+ },
+ "max_run_seconds": {
+ "name": "max_run_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "last_run_at": {
+ "name": "last_run_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_run_status": {
+ "name": "last_run_status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_automations_user": {
+ "name": "idx_automations_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "enabled",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "automations_user_id_users_id_fk": {
+ "name": "automations_user_id_users_id_fk",
+ "tableFrom": "automations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.command_history": {
+ "name": "command_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_command_history_user_host": {
+ "name": "idx_command_history_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_dismissed_alerts_user_id": {
+ "name": "idx_dismissed_alerts_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_pinned_user": {
+ "name": "idx_file_manager_pinned_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_recent": {
+ "name": "file_manager_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_recent_user": {
+ "name": "idx_file_manager_recent_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_shortcuts_user": {
+ "name": "idx_file_manager_shortcuts_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_inventory": {
+ "name": "fleet_inventory",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_fleet_inventory_user": {
+ "name": "idx_fleet_inventory_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleet_members": {
+ "name": "fleet_members",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ {
+ "expression": "fleet_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_fleet_members_host": {
+ "name": "idx_fleet_members_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.fleets": {
+ "name": "fleets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_items": {
+ "name": "homepage_items",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_homepage_items_user_id": {
+ "name": "idx_homepage_items_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.homepage_layouts": {
+ "name": "homepage_layouts",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_access": {
+ "name": "host_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_host_access_user_id": {
+ "name": "idx_host_access_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_role_id": {
+ "name": "idx_host_access_role_id",
+ "columns": [
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_host_id": {
+ "name": "idx_host_access_host_id",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_host_access_expires_at": {
+ "name": "idx_host_access_expires_at",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_checks": {
+ "name": "host_health_checks",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_health_history": {
+ "name": "host_health_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_history": {
+ "name": "host_metrics_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_data": {
+ "name": "ssh_data",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_data_user_id": {
+ "name": "idx_ssh_data_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ssh_data_parent_host": {
+ "name": "idx_ssh_data_parent_host",
+ "columns": [
+ {
+ "expression": "parent_host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ssh_data_credential": {
+ "name": "idx_ssh_data_credential",
+ "columns": [
+ {
+ "expression": "credential_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.network_topology": {
+ "name": "network_topology",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.notification_channels": {
+ "name": "notification_channels",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "double precision",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.recent_activity": {
+ "name": "recent_activity",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_recent_activity_user_ts": {
+ "name": "idx_recent_activity_user_ts",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "timestamp",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.roles": {
+ "name": "roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "name"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_recordings": {
+ "name": "session_recordings",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_session_recordings_user_started": {
+ "name": "idx_session_recordings_user_started",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "started_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_session_recordings_host": {
+ "name": "idx_session_recordings_host",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_share_participants": {
+ "name": "session_share_participants",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.session_shares": {
+ "name": "session_shares",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_session_shares_session_id": {
+ "name": "idx_session_shares_session_id",
+ "columns": [
+ {
+ "expression": "session_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_session_shares_host_id": {
+ "name": "idx_session_shares_host_id",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "link_token"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sessions": {
+ "name": "sessions",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_sessions_user_id": {
+ "name": "idx_sessions_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_sessions_expires_at": {
+ "name": "idx_sessions_expires_at",
+ "columns": [
+ {
+ "expression": "expires_at",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.settings": {
+ "name": "settings",
+ "schema": "",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ {
+ "expression": "host_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ {
+ "expression": "host_access_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "target_user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "protocol",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_access": {
+ "name": "snippet_access",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_snippet_access_user_id": {
+ "name": "idx_snippet_access_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_snippet_access_snippet_id": {
+ "name": "idx_snippet_access_snippet_id",
+ "columns": [
+ {
+ "expression": "snippet_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_snippet_access_role_id": {
+ "name": "idx_snippet_access_role_id",
+ "columns": [
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippet_folders": {
+ "name": "snippet_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.snippets": {
+ "name": "snippets",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_snippets_user_id": {
+ "name": "idx_snippets_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credential_usage_credential": {
+ "name": "idx_ssh_credential_usage_credential",
+ "columns": [
+ {
+ "expression": "credential_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_ssh_credential_usage_user": {
+ "name": "idx_ssh_credential_usage_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_credentials": {
+ "name": "ssh_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credentials_user_id": {
+ "name": "idx_ssh_credentials_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ssh_folders": {
+ "name": "ssh_folders",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_folders_user_id": {
+ "name": "idx_ssh_folders_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sso_providers": {
+ "name": "sso_providers",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.sync_tombstones": {
+ "name": "sync_tombstones",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identities": {
+ "name": "termix_identities",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "handle": {
+ "name": "handle",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "user_id"
+ ]
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "handle"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "identity_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.transfer_recent": {
+ "name": "transfer_recent",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_transfer_recent_user": {
+ "name": "idx_transfer_recent_user",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.trusted_devices": {
+ "name": "trusted_devices",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_trusted_devices_user_id": {
+ "name": "idx_trusted_devices_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.ui_preferences": {
+ "name": "ui_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ui_preferences_user_id_users_id_fk": {
+ "name": "ui_preferences_user_id_users_id_fk",
+ "tableFrom": "ui_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_open_tabs": {
+ "name": "user_open_tabs",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "label": {
+ "name": "label",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_open_tabs_user_id": {
+ "name": "idx_user_open_tabs_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_preferences": {
+ "name": "user_preferences",
+ "schema": "",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ai_assistant_enabled": {
+ "name": "ai_assistant_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ai_read_only_commands": {
+ "name": "ai_read_only_commands",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_defaults": {
+ "name": "terminal_defaults",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "rdp_defaults": {
+ "name": "rdp_defaults",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "terminal_macros": {
+ "name": "terminal_macros",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_roles": {
+ "name": "user_roles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ },
+ "idx_user_roles_role_id": {
+ "name": "idx_user_roles_role_id",
+ "columns": [
+ {
+ "expression": "role_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.user_workspaces": {
+ "name": "user_workspaces",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'manual'"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'{}'"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_user_workspaces_user_id": {
+ "name": "idx_user_workspaces_user_id",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": false,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.users": {
+ "name": "users",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_profiles": {
+ "name": "vault_profiles",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "nullsNotDistinct": false,
+ "columns": [
+ "sync_id"
+ ]
+ }
+ },
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.vault_tokens": {
+ "name": "vault_tokens",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "serial",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ {
+ "expression": "user_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ },
+ {
+ "expression": "profile_id",
+ "isExpression": false,
+ "asc": true,
+ "nulls": "last"
+ }
+ ],
+ "isUnique": true,
+ "concurrently": false,
+ "method": "btree",
+ "with": {}
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ },
+ "public.webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "schema": "",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "varchar(255)",
+ "primaryKey": true,
+ "notNull": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "name": {
+ "name": "name",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "boolean",
+ "primaryKey": false,
+ "notNull": true,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "varchar(255)",
+ "primaryKey": false,
+ "notNull": true,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "policies": {},
+ "checkConstraints": {},
+ "isRLSEnabled": false
+ }
+ },
+ "enums": {},
+ "schemas": {},
+ "sequences": {},
+ "roles": {},
+ "policies": {},
+ "views": {},
+ "_meta": {
+ "columns": {},
+ "schemas": {},
+ "tables": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/postgres/meta/_journal.json b/drizzle/postgres/meta/_journal.json
new file mode 100644
index 0000000..ed3a208
--- /dev/null
+++ b/drizzle/postgres/meta/_journal.json
@@ -0,0 +1,111 @@
+{
+ "version": "7",
+ "dialect": "postgresql",
+ "entries": [
+ {
+ "idx": 0,
+ "version": "7",
+ "when": 1785738871078,
+ "tag": "0000_jazzy_infant_terrible",
+ "breakpoints": true
+ },
+ {
+ "idx": 1,
+ "version": "7",
+ "when": 1786132418140,
+ "tag": "0001_worried_silvermane",
+ "breakpoints": true
+ },
+ {
+ "idx": 2,
+ "version": "7",
+ "when": 1786147318741,
+ "tag": "0002_clear_cerebro",
+ "breakpoints": true
+ },
+ {
+ "idx": 3,
+ "version": "7",
+ "when": 1786258963173,
+ "tag": "0003_harsh_gravity",
+ "breakpoints": true
+ },
+ {
+ "idx": 4,
+ "version": "7",
+ "when": 1786423595034,
+ "tag": "0004_great_victor_mancha",
+ "breakpoints": true
+ },
+ {
+ "idx": 5,
+ "version": "7",
+ "when": 1786428084849,
+ "tag": "0005_loose_captain_marvel",
+ "breakpoints": true
+ },
+ {
+ "idx": 6,
+ "version": "7",
+ "when": 1786482020978,
+ "tag": "0006_gigantic_thor_girl",
+ "breakpoints": true
+ },
+ {
+ "idx": 7,
+ "version": "7",
+ "when": 1786487750371,
+ "tag": "0007_orange_mandrill",
+ "breakpoints": true
+ },
+ {
+ "idx": 8,
+ "version": "7",
+ "when": 1786498679719,
+ "tag": "0008_bright_miss_america",
+ "breakpoints": true
+ },
+ {
+ "idx": 9,
+ "version": "7",
+ "when": 1786509724258,
+ "tag": "0009_spicy_the_leader",
+ "breakpoints": true
+ },
+ {
+ "idx": 10,
+ "version": "7",
+ "when": 1786515117043,
+ "tag": "0010_nasty_mordo",
+ "breakpoints": true
+ },
+ {
+ "idx": 11,
+ "version": "7",
+ "when": 1786519423735,
+ "tag": "0011_unique_sleepwalker",
+ "breakpoints": true
+ },
+ {
+ "idx": 12,
+ "version": "7",
+ "when": 1786598522041,
+ "tag": "0012_dashing_mandroid",
+ "breakpoints": true
+ },
+ {
+ "idx": 13,
+ "version": "7",
+ "when": 1786737723263,
+ "tag": "0013_open_swarm",
+ "breakpoints": true
+ },
+ {
+ "idx": 14,
+ "version": "7",
+ "when": 1786757021444,
+ "tag": "0014_unusual_maelstrom",
+ "breakpoints": true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/drizzle/sqlite/0000_stormy_veda.sql b/drizzle/sqlite/0000_stormy_veda.sql
new file mode 100644
index 0000000..e1f4bed
--- /dev/null
+++ b/drizzle/sqlite/0000_stormy_veda.sql
@@ -0,0 +1,855 @@
+CREATE TABLE `alert_firings` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `rule_id` integer NOT NULL,
+ `host_id` integer NOT NULL,
+ `host_name` text NOT NULL,
+ `fired_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `resolved_at` text,
+ `value` real,
+ `message` text NOT NULL,
+ `severity` text DEFAULT 'warning' NOT NULL,
+ `acknowledged` integer DEFAULT false NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`rule_id`) REFERENCES `alert_rules`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `alert_rule_channels` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `rule_id` integer NOT NULL,
+ `channel_id` integer NOT NULL,
+ FOREIGN KEY (`rule_id`) REFERENCES `alert_rules`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`channel_id`) REFERENCES `notification_channels`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `alert_rules` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `host_id` integer,
+ `name` text NOT NULL,
+ `enabled` integer DEFAULT true NOT NULL,
+ `trigger_type` text NOT NULL,
+ `threshold_value` real,
+ `threshold_duration_seconds` integer,
+ `cooldown_minutes` integer DEFAULT 15 NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `api_keys` (
+ `id` text PRIMARY KEY NOT NULL,
+ `user_id` text NOT NULL,
+ `name` text NOT NULL,
+ `token_hash` text NOT NULL,
+ `token_prefix` text NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `expires_at` text,
+ `last_used_at` text,
+ `is_active` integer DEFAULT true NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `audit_logs` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text,
+ `username` text NOT NULL,
+ `action` text NOT NULL,
+ `resource_type` text NOT NULL,
+ `resource_id` text,
+ `resource_name` text,
+ `details` text,
+ `ip_address` text,
+ `user_agent` text,
+ `success` integer NOT NULL,
+ `error_message` text,
+ `timestamp` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE set null
+);
+--> statement-breakpoint
+CREATE TABLE `c2s_tunnel_presets` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `name` text NOT NULL,
+ `config` text NOT NULL,
+ `platform` text,
+ `computer_name` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `command_history` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `host_id` integer NOT NULL,
+ `command` text NOT NULL,
+ `executed_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `credential_sidebar_preferences` (
+ `user_id` text PRIMARY KEY NOT NULL,
+ `data` text NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `dashboard_service_links` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `label` text NOT NULL,
+ `url` text NOT NULL,
+ `order` integer DEFAULT 0 NOT NULL,
+ `sync_id` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `dashboard_service_links_sync_id_unique` ON `dashboard_service_links` (`sync_id`);--> statement-breakpoint
+CREATE TABLE `dismissed_alerts` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `alert_id` text NOT NULL,
+ `dismissed_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `file_manager_pinned` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `host_id` integer NOT NULL,
+ `name` text NOT NULL,
+ `path` text NOT NULL,
+ `pinned_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `file_manager_recent` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `host_id` integer NOT NULL,
+ `name` text NOT NULL,
+ `path` text NOT NULL,
+ `last_opened` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `file_manager_shortcuts` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `host_id` integer NOT NULL,
+ `name` text NOT NULL,
+ `path` text NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `homepage_items` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `type_id` text NOT NULL,
+ `title` text,
+ `config` text DEFAULT '{}' NOT NULL,
+ `folder_id` integer,
+ `sync_id` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `homepage_items_sync_id_unique` ON `homepage_items` (`sync_id`);--> statement-breakpoint
+CREATE TABLE `homepage_layouts` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `layout` text DEFAULT '{}' NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `homepage_layouts_user_id_unique` ON `homepage_layouts` (`user_id`);--> statement-breakpoint
+CREATE TABLE `host_access` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `host_id` integer NOT NULL,
+ `user_id` text,
+ `role_id` integer,
+ `granted_by` text NOT NULL,
+ `permission_level` text DEFAULT 'connect' NOT NULL,
+ `expires_at` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `last_accessed_at` text,
+ `access_count` integer DEFAULT 0 NOT NULL,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`role_id`) REFERENCES `roles`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`granted_by`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `host_health_checks` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `host_id` integer NOT NULL,
+ `checks` text NOT NULL,
+ `interval_seconds` integer DEFAULT 300 NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `idx_host_health_checks_user_host` ON `host_health_checks` (`user_id`,`host_id`);--> statement-breakpoint
+CREATE TABLE `host_health_history` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `host_id` integer NOT NULL,
+ `check_id` text NOT NULL,
+ `ts` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `ok` integer NOT NULL,
+ `latency_ms` integer,
+ `detail` text,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `host_metrics_history` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `host_id` integer NOT NULL,
+ `ts` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `cpu_percent` real,
+ `mem_percent` real,
+ `disk_percent` real,
+ `net_rx_bytes` integer,
+ `net_tx_bytes` integer,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `host_metrics_preferences` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `host_id` integer NOT NULL,
+ `layout` text NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `idx_host_metrics_prefs_user_host` ON `host_metrics_preferences` (`user_id`,`host_id`);--> statement-breakpoint
+CREATE TABLE `host_sidebar_preferences` (
+ `user_id` text PRIMARY KEY NOT NULL,
+ `data` text NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `ssh_data` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `connection_type` text DEFAULT 'ssh' NOT NULL,
+ `name` text,
+ `ip` text NOT NULL,
+ `port` integer NOT NULL,
+ `username` text NOT NULL,
+ `folder` text,
+ `tags` text,
+ `pin` integer DEFAULT false NOT NULL,
+ `sort_order` integer,
+ `auth_type` text NOT NULL,
+ `use_warpgate` integer DEFAULT false NOT NULL,
+ `share_ssh_auth` integer DEFAULT false NOT NULL,
+ `force_keyboard_interactive` text,
+ `password` text,
+ `key` text(8192),
+ `key_password` text,
+ `key_type` text,
+ `sudo_password` text,
+ `autostart_password` text,
+ `autostart_key` text(8192),
+ `autostart_key_password` text,
+ `credential_id` integer,
+ `override_credential_username` integer,
+ `vault_profile_id` integer,
+ `enable_terminal` integer DEFAULT true NOT NULL,
+ `enable_session_logging` integer DEFAULT true NOT NULL,
+ `allow_session_sharing` integer DEFAULT true NOT NULL,
+ `enable_command_history` integer DEFAULT true NOT NULL,
+ `enable_tunnel` integer DEFAULT true NOT NULL,
+ `tunnel_connections` text,
+ `jump_hosts` text,
+ `enable_file_manager` integer DEFAULT true NOT NULL,
+ `scp_legacy` integer DEFAULT false NOT NULL,
+ `enable_docker` integer DEFAULT false NOT NULL,
+ `enable_tmux_monitor` integer DEFAULT false NOT NULL,
+ `show_terminal_in_sidebar` integer DEFAULT true NOT NULL,
+ `show_file_manager_in_sidebar` integer DEFAULT false NOT NULL,
+ `show_tunnel_in_sidebar` integer DEFAULT false NOT NULL,
+ `show_docker_in_sidebar` integer DEFAULT false NOT NULL,
+ `show_server_stats_in_sidebar` integer DEFAULT false NOT NULL,
+ `default_path` text,
+ `stats_config` text,
+ `docker_config` text,
+ `enable_proxmox` integer DEFAULT false NOT NULL,
+ `proxmox_config` text,
+ `terminal_config` text,
+ `quick_actions` text,
+ `notes` text,
+ `enable_ssh` integer DEFAULT true NOT NULL,
+ `enable_rdp` integer DEFAULT false NOT NULL,
+ `enable_vnc` integer DEFAULT false NOT NULL,
+ `enable_telnet` integer DEFAULT false NOT NULL,
+ `ssh_port` integer DEFAULT 22,
+ `rdp_port` integer DEFAULT 3389,
+ `vnc_port` integer DEFAULT 5900,
+ `telnet_port` integer DEFAULT 23,
+ `rdp_credential_id` integer,
+ `rdp_user` text,
+ `rdp_password` text,
+ `rdp_domain` text,
+ `rdp_security` text,
+ `rdp_ignore_cert` integer DEFAULT false,
+ `vnc_credential_id` integer,
+ `vnc_password` text,
+ `vnc_user` text,
+ `telnet_user` text,
+ `telnet_password` text,
+ `telnet_credential_id` integer,
+ `rdp_auth_type` text,
+ `vnc_auth_type` text,
+ `telnet_auth_type` text,
+ `domain` text,
+ `security` text,
+ `ignore_cert` integer DEFAULT false,
+ `guacamole_config` text,
+ `use_socks5` integer,
+ `socks5_host` text,
+ `socks5_port` integer,
+ `socks5_username` text,
+ `socks5_password` text,
+ `socks5_proxy_chain` text,
+ `connection_origin` text,
+ `mac_address` text,
+ `wol_broadcast_address` text,
+ `port_knock_sequence` text,
+ `host_key_fingerprint` text,
+ `host_key_type` text,
+ `host_key_algorithm` text DEFAULT 'sha256',
+ `host_key_first_seen` text,
+ `host_key_last_verified` text,
+ `host_key_changed_count` integer DEFAULT 0,
+ `sync_id` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`credential_id`) REFERENCES `ssh_credentials`(`id`) ON UPDATE no action ON DELETE set null,
+ FOREIGN KEY (`vault_profile_id`) REFERENCES `vault_profiles`(`id`) ON UPDATE no action ON DELETE set null,
+ FOREIGN KEY (`rdp_credential_id`) REFERENCES `ssh_credentials`(`id`) ON UPDATE no action ON DELETE set null,
+ FOREIGN KEY (`vnc_credential_id`) REFERENCES `ssh_credentials`(`id`) ON UPDATE no action ON DELETE set null,
+ FOREIGN KEY (`telnet_credential_id`) REFERENCES `ssh_credentials`(`id`) ON UPDATE no action ON DELETE set null
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `ssh_data_sync_id_unique` ON `ssh_data` (`sync_id`);--> statement-breakpoint
+CREATE TABLE `network_topology` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `topology` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `notification_channels` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `name` text NOT NULL,
+ `type` text NOT NULL,
+ `config` text NOT NULL,
+ `enabled` integer DEFAULT true NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `opkssh_tokens` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `host_id` integer NOT NULL,
+ `ssh_cert` text(8192) NOT NULL,
+ `private_key` text(8192) NOT NULL,
+ `email` text,
+ `sub` text,
+ `issuer` text,
+ `audience` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `expires_at` text NOT NULL,
+ `last_used` text,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `idx_opkssh_tokens_user_host` ON `opkssh_tokens` (`user_id`,`host_id`);--> statement-breakpoint
+CREATE TABLE `recent_activity` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `type` text NOT NULL,
+ `host_id` integer NOT NULL,
+ `host_name` text,
+ `timestamp` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `roles` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `name` text NOT NULL,
+ `display_name` text NOT NULL,
+ `description` text,
+ `is_system` integer DEFAULT false NOT NULL,
+ `permissions` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `roles_name_unique` ON `roles` (`name`);--> statement-breakpoint
+CREATE TABLE `session_recordings` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `host_id` integer NOT NULL,
+ `user_id` text,
+ `username` text,
+ `access_id` integer,
+ `started_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `ended_at` text,
+ `duration` integer,
+ `commands` text,
+ `dangerous_actions` text,
+ `recording_path` text,
+ `protocol` text DEFAULT 'ssh' NOT NULL,
+ `format` text DEFAULT 'text' NOT NULL,
+ `terminated_by_owner` integer DEFAULT false,
+ `termination_reason` text,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE set null,
+ FOREIGN KEY (`access_id`) REFERENCES `host_access`(`id`) ON UPDATE no action ON DELETE set null
+);
+--> statement-breakpoint
+CREATE TABLE `session_share_participants` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `share_id` text NOT NULL,
+ `user_id` text,
+ `guest_label` text,
+ `joined_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `left_at` text,
+ FOREIGN KEY (`share_id`) REFERENCES `session_shares`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `session_shares` (
+ `id` text PRIMARY KEY NOT NULL,
+ `host_id` integer NOT NULL,
+ `owner_user_id` text NOT NULL,
+ `protocol` text NOT NULL,
+ `session_id` text NOT NULL,
+ `tab_instance_id` text,
+ `share_type` text NOT NULL,
+ `target_user_id` text,
+ `link_token` text,
+ `permission_level` text DEFAULT 'read-only' NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `expires_at` text NOT NULL,
+ `revoked_at` text,
+ `last_joined_at` text,
+ `join_count` integer DEFAULT 0 NOT NULL,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`owner_user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`target_user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `session_shares_link_token_unique` ON `session_shares` (`link_token`);--> statement-breakpoint
+CREATE TABLE `sessions` (
+ `id` text PRIMARY KEY NOT NULL,
+ `user_id` text NOT NULL,
+ `jwt_token` text NOT NULL,
+ `device_type` text NOT NULL,
+ `device_info` text NOT NULL,
+ `oidc_sub` text,
+ `oidc_sid` text,
+ `sso_provider_id` integer,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `expires_at` text NOT NULL,
+ `last_active_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `settings` (
+ `key` text PRIMARY KEY NOT NULL,
+ `value` text NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE `shared_host_auth_overrides` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `host_id` integer NOT NULL,
+ `user_id` text NOT NULL,
+ `protocol` text DEFAULT 'ssh' NOT NULL,
+ `credential_id` integer NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`credential_id`) REFERENCES `ssh_credentials`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `shared_host_auth_overrides_host_user_protocol_unique` ON `shared_host_auth_overrides` (`host_id`,`user_id`,`protocol`);--> statement-breakpoint
+CREATE TABLE `shared_host_secrets` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `host_access_id` integer NOT NULL,
+ `target_user_id` text NOT NULL,
+ `protocol` text DEFAULT 'ssh' NOT NULL,
+ `source_type` text DEFAULT 'credential' NOT NULL,
+ `original_credential_id` integer,
+ `encrypted_username` text,
+ `encrypted_auth_type` text,
+ `encrypted_password` text,
+ `encrypted_key` text(16384),
+ `encrypted_key_password` text,
+ `encrypted_key_type` text,
+ `encrypted_domain` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`host_access_id`) REFERENCES `host_access`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`target_user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`original_credential_id`) REFERENCES `ssh_credentials`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `idx_shared_host_secrets_scope` ON `shared_host_secrets` (`host_access_id`,`target_user_id`,`protocol`);--> statement-breakpoint
+CREATE TABLE `snippet_access` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `snippet_id` integer NOT NULL,
+ `user_id` text,
+ `role_id` integer,
+ `granted_by` text NOT NULL,
+ `permission_level` text DEFAULT 'view' NOT NULL,
+ `expires_at` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`snippet_id`) REFERENCES `snippets`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`role_id`) REFERENCES `roles`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`granted_by`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `snippet_folders` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `name` text NOT NULL,
+ `color` text,
+ `icon` text,
+ `sync_id` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `snippet_folders_sync_id_unique` ON `snippet_folders` (`sync_id`);--> statement-breakpoint
+CREATE TABLE `snippets` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `name` text NOT NULL,
+ `content` text NOT NULL,
+ `description` text,
+ `folder` text,
+ `order` integer DEFAULT 0 NOT NULL,
+ `sync_id` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `host_filter` text,
+ `is_note` integer DEFAULT false NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `snippets_sync_id_unique` ON `snippets` (`sync_id`);--> statement-breakpoint
+CREATE TABLE `ssh_credential_usage` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `credential_id` integer NOT NULL,
+ `host_id` integer NOT NULL,
+ `user_id` text NOT NULL,
+ `used_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`credential_id`) REFERENCES `ssh_credentials`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `ssh_credentials` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `name` text NOT NULL,
+ `description` text,
+ `folder` text,
+ `tags` text,
+ `pin` integer DEFAULT false NOT NULL,
+ `sort_order` integer,
+ `auth_type` text NOT NULL,
+ `username` text,
+ `password` text,
+ `key` text(16384),
+ `private_key` text(16384),
+ `public_key` text(4096),
+ `key_password` text,
+ `key_type` text,
+ `detected_key_type` text,
+ `cert_public_key` text(8192),
+ `usage_count` integer DEFAULT 0 NOT NULL,
+ `last_used` text,
+ `sync_id` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `ssh_credentials_sync_id_unique` ON `ssh_credentials` (`sync_id`);--> statement-breakpoint
+CREATE TABLE `ssh_folders` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `name` text NOT NULL,
+ `color` text,
+ `icon` text,
+ `credential_id` integer,
+ `sort_order` integer,
+ `sync_id` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`credential_id`) REFERENCES `ssh_credentials`(`id`) ON UPDATE no action ON DELETE set null
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `ssh_folders_sync_id_unique` ON `ssh_folders` (`sync_id`);--> statement-breakpoint
+CREATE TABLE `sso_providers` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `name` text NOT NULL,
+ `type` text NOT NULL,
+ `enabled` integer DEFAULT true NOT NULL,
+ `display_order` integer DEFAULT 0 NOT NULL,
+ `config` text NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE `sync_tombstones` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `entity_type` text NOT NULL,
+ `sync_id` text NOT NULL,
+ `deleted_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `termix_identities` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `handle` text NOT NULL,
+ `description` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `termix_identities_user_id_unique` ON `termix_identities` (`user_id`);--> statement-breakpoint
+CREATE UNIQUE INDEX `termix_identities_handle_unique` ON `termix_identities` (`handle`);--> statement-breakpoint
+CREATE TABLE `termix_identity_ca` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `identity_id` integer NOT NULL,
+ `user_id` text NOT NULL,
+ `public_key` text(4096) NOT NULL,
+ `private_key` text(8192) NOT NULL,
+ `validity_days` integer DEFAULT 90 NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`identity_id`) REFERENCES `termix_identities`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `termix_identity_ca_identity_id_unique` ON `termix_identity_ca` (`identity_id`);--> statement-breakpoint
+CREATE TABLE `termix_identity_keys` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `identity_id` integer NOT NULL,
+ `user_id` text NOT NULL,
+ `public_key` text(8192) NOT NULL,
+ `key_type` text NOT NULL,
+ `algorithm` text NOT NULL,
+ `label` text,
+ `comment` text,
+ `source` text DEFAULT 'manual' NOT NULL,
+ `credential_id` integer,
+ `enabled` integer DEFAULT true NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`identity_id`) REFERENCES `termix_identities`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`credential_id`) REFERENCES `ssh_credentials`(`id`) ON UPDATE no action ON DELETE set null
+);
+--> statement-breakpoint
+CREATE TABLE `tmux_session_tags` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `host_id` integer NOT NULL,
+ `session_name` text NOT NULL,
+ `tag` text NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `transfer_recent` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `source_host_id` integer NOT NULL,
+ `dest_host_id` integer NOT NULL,
+ `dest_path` text NOT NULL,
+ `dest_path_label` text NOT NULL,
+ `last_used` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`source_host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`dest_host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `trusted_devices` (
+ `id` text PRIMARY KEY NOT NULL,
+ `user_id` text NOT NULL,
+ `device_fingerprint` text NOT NULL,
+ `device_type` text NOT NULL,
+ `device_info` text NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `expires_at` text NOT NULL,
+ `last_used_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `user_open_tabs` (
+ `id` text PRIMARY KEY NOT NULL,
+ `user_id` text NOT NULL,
+ `tab_type` text NOT NULL,
+ `host_id` integer,
+ `label` text NOT NULL,
+ `tab_order` integer DEFAULT 0 NOT NULL,
+ `backend_session_id` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `user_preferences` (
+ `user_id` text PRIMARY KEY NOT NULL,
+ `reopen_tabs_on_login` integer DEFAULT false NOT NULL,
+ `theme` text,
+ `font_size` text,
+ `accent_color` text,
+ `language` text,
+ `storage_mode` text,
+ `command_autocomplete` integer,
+ `command_palette_enabled` integer,
+ `show_host_tags` integer,
+ `host_tray_on_click` integer,
+ `pin_app_rail` integer,
+ `expand_app_rail_on_hover` integer,
+ `folders_collapsed` integer,
+ `confirm_snippet_execution` integer,
+ `disable_update_check` integer,
+ `confirm_tab_close` integer,
+ `hidden_rail_tabs` text,
+ `compact_host_view` integer,
+ `status_color_scheme` text,
+ `custom_themes` text,
+ `custom_keybindings` text,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `user_roles` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `role_id` integer NOT NULL,
+ `granted_by` text,
+ `granted_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`role_id`) REFERENCES `roles`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`granted_by`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE set null
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `idx_user_roles_user_role` ON `user_roles` (`user_id`,`role_id`);--> statement-breakpoint
+CREATE TABLE `users` (
+ `id` text PRIMARY KEY NOT NULL,
+ `username` text NOT NULL,
+ `password_hash` text NOT NULL,
+ `is_admin` integer DEFAULT false NOT NULL,
+ `is_oidc` integer DEFAULT false NOT NULL,
+ `oidc_identifier` text,
+ `sso_provider_id` integer,
+ `client_id` text,
+ `client_secret` text,
+ `issuer_url` text,
+ `authorization_url` text,
+ `token_url` text,
+ `identifier_path` text,
+ `name_path` text,
+ `scopes` text DEFAULT 'openid email profile',
+ `totp_secret` text,
+ `totp_enabled` integer DEFAULT false NOT NULL,
+ `totp_backup_codes` text,
+ `registered_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `donation_modal_dismissed` integer DEFAULT false NOT NULL
+);
+--> statement-breakpoint
+CREATE TABLE `vault_profiles` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `name` text NOT NULL,
+ `description` text,
+ `folder` text,
+ `tags` text,
+ `vault_addr` text NOT NULL,
+ `vault_namespace` text,
+ `oidc_mount` text,
+ `oidc_role` text,
+ `ssh_mount` text,
+ `ssh_role` text NOT NULL,
+ `valid_principals` text,
+ `key_type` text,
+ `shared` integer DEFAULT false NOT NULL,
+ `sync_id` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `vault_profiles_sync_id_unique` ON `vault_profiles` (`sync_id`);--> statement-breakpoint
+CREATE TABLE `vault_tokens` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `profile_id` integer NOT NULL,
+ `ssh_cert` text(8192) NOT NULL,
+ `private_key` text(8192) NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `expires_at` text NOT NULL,
+ `last_used` text,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`profile_id`) REFERENCES `vault_profiles`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `idx_vault_tokens_user_profile` ON `vault_tokens` (`user_id`,`profile_id`);--> statement-breakpoint
+CREATE TABLE `webauthn_credentials` (
+ `id` text PRIMARY KEY NOT NULL,
+ `user_id` text NOT NULL,
+ `name` text NOT NULL,
+ `credential_id` text NOT NULL,
+ `public_key` text NOT NULL,
+ `counter` integer DEFAULT 0 NOT NULL,
+ `device_type` text,
+ `backed_up` integer DEFAULT false NOT NULL,
+ `transports` text,
+ `user_verification` text DEFAULT 'preferred' NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `last_used_at` text,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
diff --git a/drizzle/sqlite/0001_colorful_the_call.sql b/drizzle/sqlite/0001_colorful_the_call.sql
new file mode 100644
index 0000000..e065384
--- /dev/null
+++ b/drizzle/sqlite/0001_colorful_the_call.sql
@@ -0,0 +1,26 @@
+CREATE TABLE `proxmox_node_history` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `host_id` integer NOT NULL,
+ `ts` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `cpu_percent` real,
+ `mem_percent` real,
+ `disk_percent` real,
+ `net_rx_bytes` integer,
+ `net_tx_bytes` integer,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE TABLE `proxmox_stats_preferences` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `host_id` integer NOT NULL,
+ `layout` text NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `idx_proxmox_stats_prefs_user_host` ON `proxmox_stats_preferences` (`user_id`,`host_id`);--> statement-breakpoint
+ALTER TABLE `ssh_data` ADD `enable_proxmox_stats` integer DEFAULT false NOT NULL;--> statement-breakpoint
+ALTER TABLE `ssh_data` ADD `proxmox_stats_config` text;
\ No newline at end of file
diff --git a/drizzle/sqlite/0002_woozy_turbo.sql b/drizzle/sqlite/0002_woozy_turbo.sql
new file mode 100644
index 0000000..561880e
--- /dev/null
+++ b/drizzle/sqlite/0002_woozy_turbo.sql
@@ -0,0 +1 @@
+ALTER TABLE `ssh_data` ADD `enable_terminal_toolbar` integer DEFAULT true NOT NULL;
\ No newline at end of file
diff --git a/drizzle/sqlite/0003_premium_ultimates.sql b/drizzle/sqlite/0003_premium_ultimates.sql
new file mode 100644
index 0000000..d25865b
--- /dev/null
+++ b/drizzle/sqlite/0003_premium_ultimates.sql
@@ -0,0 +1,42 @@
+CREATE TABLE `fleet_inventory` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `host_id` integer NOT NULL,
+ `user_id` text NOT NULL,
+ `os_pretty_name` text,
+ `kernel` text,
+ `architecture` text,
+ `hostname` text,
+ `uptime_seconds` integer,
+ `ip` text,
+ `package_manager` text,
+ `collected_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `idx_fleet_inventory_host` ON `fleet_inventory` (`host_id`,`user_id`);--> statement-breakpoint
+CREATE TABLE `fleet_members` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `fleet_id` integer NOT NULL,
+ `host_id` integer NOT NULL,
+ `added_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`fleet_id`) REFERENCES `fleets`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`host_id`) REFERENCES `ssh_data`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `idx_fleet_members_fleet_host` ON `fleet_members` (`fleet_id`,`host_id`);--> statement-breakpoint
+CREATE TABLE `fleets` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `name` text NOT NULL,
+ `description` text,
+ `color` text,
+ `icon` text,
+ `tag_rules` text,
+ `sync_id` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `fleets_sync_id_unique` ON `fleets` (`sync_id`);
\ No newline at end of file
diff --git a/drizzle/sqlite/0004_cool_zuras.sql b/drizzle/sqlite/0004_cool_zuras.sql
new file mode 100644
index 0000000..4332860
--- /dev/null
+++ b/drizzle/sqlite/0004_cool_zuras.sql
@@ -0,0 +1 @@
+ALTER TABLE `ssh_data` ADD `parent_host_id` integer REFERENCES ssh_data(id) ON DELETE SET NULL;
\ No newline at end of file
diff --git a/drizzle/sqlite/0005_thin_sentry.sql b/drizzle/sqlite/0005_thin_sentry.sql
new file mode 100644
index 0000000..ef960ee
--- /dev/null
+++ b/drizzle/sqlite/0005_thin_sentry.sql
@@ -0,0 +1,17 @@
+CREATE TABLE `user_workspaces` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `name` text NOT NULL,
+ `color` text,
+ `icon` text,
+ `kind` text DEFAULT 'manual' NOT NULL,
+ `is_default` integer DEFAULT false NOT NULL,
+ `payload` text DEFAULT '{}' NOT NULL,
+ `sync_id` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `last_used_at` text,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `user_workspaces_sync_id_unique` ON `user_workspaces` (`sync_id`);
\ No newline at end of file
diff --git a/drizzle/sqlite/0006_nebulous_demogoblin.sql b/drizzle/sqlite/0006_nebulous_demogoblin.sql
new file mode 100644
index 0000000..9f8c641
--- /dev/null
+++ b/drizzle/sqlite/0006_nebulous_demogoblin.sql
@@ -0,0 +1,6 @@
+CREATE TABLE `ui_preferences` (
+ `user_id` text PRIMARY KEY NOT NULL,
+ `data` text NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
diff --git a/drizzle/sqlite/0007_complex_nebula.sql b/drizzle/sqlite/0007_complex_nebula.sql
new file mode 100644
index 0000000..a312d6b
--- /dev/null
+++ b/drizzle/sqlite/0007_complex_nebula.sql
@@ -0,0 +1,42 @@
+CREATE INDEX `idx_alert_firings_rule` ON `alert_firings` (`rule_id`,`fired_at`);--> statement-breakpoint
+CREATE INDEX `idx_alert_firings_host` ON `alert_firings` (`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_api_keys_user_id` ON `api_keys` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_audit_logs_timestamp` ON `audit_logs` (`timestamp`);--> statement-breakpoint
+CREATE INDEX `idx_audit_logs_user_ts` ON `audit_logs` (`user_id`,`timestamp`);--> statement-breakpoint
+CREATE INDEX `idx_audit_logs_action_ts` ON `audit_logs` (`action`,`timestamp`);--> statement-breakpoint
+CREATE INDEX `idx_audit_logs_resource_ts` ON `audit_logs` (`resource_type`,`timestamp`);--> statement-breakpoint
+CREATE INDEX `idx_command_history_user_host` ON `command_history` (`user_id`,`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_dismissed_alerts_user_id` ON `dismissed_alerts` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_file_manager_pinned_user` ON `file_manager_pinned` (`user_id`,`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_file_manager_recent_user` ON `file_manager_recent` (`user_id`,`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_file_manager_shortcuts_user` ON `file_manager_shortcuts` (`user_id`,`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_fleet_inventory_user` ON `fleet_inventory` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_fleet_members_host` ON `fleet_members` (`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_homepage_items_user_id` ON `homepage_items` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_host_access_user_id` ON `host_access` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_host_access_role_id` ON `host_access` (`role_id`);--> statement-breakpoint
+CREATE INDEX `idx_host_access_host_id` ON `host_access` (`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_host_access_expires_at` ON `host_access` (`expires_at`);--> statement-breakpoint
+CREATE INDEX `idx_ssh_data_user_id` ON `ssh_data` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_ssh_data_parent_host` ON `ssh_data` (`parent_host_id`);--> statement-breakpoint
+CREATE INDEX `idx_ssh_data_credential` ON `ssh_data` (`credential_id`);--> statement-breakpoint
+CREATE INDEX `idx_recent_activity_user_ts` ON `recent_activity` (`user_id`,`timestamp`);--> statement-breakpoint
+CREATE INDEX `idx_session_recordings_user_started` ON `session_recordings` (`user_id`,`started_at`);--> statement-breakpoint
+CREATE INDEX `idx_session_recordings_host` ON `session_recordings` (`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_session_shares_session_id` ON `session_shares` (`session_id`);--> statement-breakpoint
+CREATE INDEX `idx_session_shares_host_id` ON `session_shares` (`host_id`);--> statement-breakpoint
+CREATE INDEX `idx_sessions_user_id` ON `sessions` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_sessions_expires_at` ON `sessions` (`expires_at`);--> statement-breakpoint
+CREATE INDEX `idx_snippet_access_user_id` ON `snippet_access` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_snippet_access_snippet_id` ON `snippet_access` (`snippet_id`);--> statement-breakpoint
+CREATE INDEX `idx_snippet_access_role_id` ON `snippet_access` (`role_id`);--> statement-breakpoint
+CREATE INDEX `idx_snippets_user_id` ON `snippets` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_ssh_credential_usage_credential` ON `ssh_credential_usage` (`credential_id`);--> statement-breakpoint
+CREATE INDEX `idx_ssh_credential_usage_user` ON `ssh_credential_usage` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_ssh_credentials_user_id` ON `ssh_credentials` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_ssh_folders_user_id` ON `ssh_folders` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_transfer_recent_user` ON `transfer_recent` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_trusted_devices_user_id` ON `trusted_devices` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_user_open_tabs_user_id` ON `user_open_tabs` (`user_id`);--> statement-breakpoint
+CREATE INDEX `idx_user_roles_role_id` ON `user_roles` (`role_id`);--> statement-breakpoint
+CREATE INDEX `idx_user_workspaces_user_id` ON `user_workspaces` (`user_id`);
\ No newline at end of file
diff --git a/drizzle/sqlite/0008_fast_imperial_guard.sql b/drizzle/sqlite/0008_fast_imperial_guard.sql
new file mode 100644
index 0000000..883b749
--- /dev/null
+++ b/drizzle/sqlite/0008_fast_imperial_guard.sql
@@ -0,0 +1,147 @@
+CREATE TABLE `ai_conversations` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `title` text,
+ `provider_id` integer,
+ `model` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE INDEX `idx_ai_conversations_user` ON `ai_conversations` (`user_id`,`updated_at`);--> statement-breakpoint
+CREATE TABLE `ai_messages` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `conversation_id` integer NOT NULL,
+ `role` text NOT NULL,
+ `content` text DEFAULT '' NOT NULL,
+ `tool_calls` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`conversation_id`) REFERENCES `ai_conversations`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE INDEX `idx_ai_messages_conversation` ON `ai_messages` (`conversation_id`,`created_at`);--> statement-breakpoint
+CREATE TABLE `ai_proposals` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `conversation_id` integer NOT NULL,
+ `user_id` text NOT NULL,
+ `kind` text NOT NULL,
+ `summary` text,
+ `payload` text DEFAULT '{}' NOT NULL,
+ `status` text DEFAULT 'pending' NOT NULL,
+ `applied_at` text,
+ `result_summary` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`conversation_id`) REFERENCES `ai_conversations`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE INDEX `idx_ai_proposals_user` ON `ai_proposals` (`user_id`,`status`);--> statement-breakpoint
+CREATE INDEX `idx_ai_proposals_conversation` ON `ai_proposals` (`conversation_id`);--> statement-breakpoint
+CREATE TABLE `ai_providers` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `provider_type` text NOT NULL,
+ `label` text NOT NULL,
+ `base_url` text,
+ `api_key` text(8192),
+ `api_key_prefix` text,
+ `default_model` text,
+ `enabled` integer DEFAULT true NOT NULL,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `idx_ai_providers_user_label` ON `ai_providers` (`user_id`,`label`);--> statement-breakpoint
+CREATE TABLE `automation_channels` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `automation_id` integer NOT NULL,
+ `channel_id` integer NOT NULL,
+ FOREIGN KEY (`automation_id`) REFERENCES `automations`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`channel_id`) REFERENCES `notification_channels`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `idx_automation_channels_pair` ON `automation_channels` (`automation_id`,`channel_id`);--> statement-breakpoint
+CREATE TABLE `automation_run_steps` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `run_id` integer NOT NULL,
+ `step_index` integer NOT NULL,
+ `step_id` text NOT NULL,
+ `step_type` text NOT NULL,
+ `status` text NOT NULL,
+ `started_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `finished_at` text,
+ `output` text,
+ `error` text,
+ `truncated` integer DEFAULT false NOT NULL,
+ FOREIGN KEY (`run_id`) REFERENCES `automation_runs`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE INDEX `idx_automation_run_steps_run` ON `automation_run_steps` (`run_id`,`step_index`);--> statement-breakpoint
+CREATE TABLE `automation_runs` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `automation_id` integer NOT NULL,
+ `user_id` text NOT NULL,
+ `trigger_type` text NOT NULL,
+ `trigger_context` text,
+ `status` text NOT NULL,
+ `started_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `finished_at` text,
+ `duration_ms` integer,
+ `error` text,
+ `dry_run` integer DEFAULT false NOT NULL,
+ `parent_run_id` integer,
+ FOREIGN KEY (`automation_id`) REFERENCES `automations`(`id`) ON UPDATE no action ON DELETE cascade,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE INDEX `idx_automation_runs_automation` ON `automation_runs` (`automation_id`,`started_at`);--> statement-breakpoint
+CREATE INDEX `idx_automation_runs_user` ON `automation_runs` (`user_id`,`started_at`);--> statement-breakpoint
+CREATE TABLE `automation_schedules` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `automation_id` integer NOT NULL,
+ `cron` text,
+ `interval_seconds` integer,
+ `timezone` text,
+ `next_due_at` text,
+ `last_tick_at` text,
+ FOREIGN KEY (`automation_id`) REFERENCES `automations`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `idx_automation_schedules_automation` ON `automation_schedules` (`automation_id`);--> statement-breakpoint
+CREATE INDEX `idx_automation_schedules_due` ON `automation_schedules` (`next_due_at`);--> statement-breakpoint
+CREATE TABLE `automation_trigger_state` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `automation_id` integer NOT NULL,
+ `state_key` text NOT NULL,
+ `breach_started_at` text,
+ `last_fired_at` text,
+ `last_value` real,
+ `last_observed_state` text,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`automation_id`) REFERENCES `automations`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE UNIQUE INDEX `idx_automation_trigger_state_key` ON `automation_trigger_state` (`automation_id`,`state_key`);--> statement-breakpoint
+CREATE TABLE `automations` (
+ `id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
+ `user_id` text NOT NULL,
+ `name` text NOT NULL,
+ `description` text,
+ `enabled` integer DEFAULT true NOT NULL,
+ `definition` text NOT NULL,
+ `definition_version` integer DEFAULT 1 NOT NULL,
+ `concurrency_policy` text DEFAULT 'skip' NOT NULL,
+ `max_run_seconds` integer DEFAULT 300 NOT NULL,
+ `dry_run` integer DEFAULT false NOT NULL,
+ `last_run_at` text,
+ `last_run_status` text,
+ `created_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ `updated_at` text DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON UPDATE no action ON DELETE cascade
+);
+--> statement-breakpoint
+CREATE INDEX `idx_automations_user` ON `automations` (`user_id`,`enabled`);--> statement-breakpoint
+ALTER TABLE `user_preferences` ADD `ai_assistant_enabled` integer;--> statement-breakpoint
+ALTER TABLE `user_preferences` ADD `ai_read_only_commands` integer;
\ No newline at end of file
diff --git a/drizzle/sqlite/0009_pink_susan_delgado.sql b/drizzle/sqlite/0009_pink_susan_delgado.sql
new file mode 100644
index 0000000..0ebb111
--- /dev/null
+++ b/drizzle/sqlite/0009_pink_susan_delgado.sql
@@ -0,0 +1,2 @@
+ALTER TABLE `user_preferences` ADD `terminal_defaults` text;--> statement-breakpoint
+ALTER TABLE `user_preferences` ADD `rdp_defaults` text;
\ No newline at end of file
diff --git a/drizzle/sqlite/0010_mean_queen_noir.sql b/drizzle/sqlite/0010_mean_queen_noir.sql
new file mode 100644
index 0000000..df84506
--- /dev/null
+++ b/drizzle/sqlite/0010_mean_queen_noir.sql
@@ -0,0 +1 @@
+ALTER TABLE `user_preferences` ADD `terminal_macros` text;
\ No newline at end of file
diff --git a/drizzle/sqlite/meta/0000_snapshot.json b/drizzle/sqlite/meta/0000_snapshot.json
new file mode 100644
index 0000000..ff66a79
--- /dev/null
+++ b/drizzle/sqlite/meta/0000_snapshot.json
@@ -0,0 +1,6209 @@
+{
+ "version": "6",
+ "dialect": "sqlite",
+ "id": "818cd7d9-d223-494f-ac73-f98708c72dc2",
+ "prevId": "00000000-0000-0000-0000-000000000000",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ }
+ },
+ "views": {},
+ "enums": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "indexes": {}
+ }
+}
diff --git a/drizzle/sqlite/meta/0001_snapshot.json b/drizzle/sqlite/meta/0001_snapshot.json
new file mode 100644
index 0000000..6f9b2c1
--- /dev/null
+++ b/drizzle/sqlite/meta/0001_snapshot.json
@@ -0,0 +1,6395 @@
+{
+ "version": "6",
+ "dialect": "sqlite",
+ "id": "773098a5-7c1c-4cc7-aaa7-33494b6578df",
+ "prevId": "818cd7d9-d223-494f-ac73-f98708c72dc2",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ }
+ },
+ "views": {},
+ "enums": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/sqlite/meta/0002_snapshot.json b/drizzle/sqlite/meta/0002_snapshot.json
new file mode 100644
index 0000000..1998f5e
--- /dev/null
+++ b/drizzle/sqlite/meta/0002_snapshot.json
@@ -0,0 +1,6403 @@
+{
+ "version": "6",
+ "dialect": "sqlite",
+ "id": "741b6f3f-37a3-42a5-ba62-6e3d2127e031",
+ "prevId": "773098a5-7c1c-4cc7-aaa7-33494b6578df",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ }
+ },
+ "views": {},
+ "enums": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/sqlite/meta/0003_snapshot.json b/drizzle/sqlite/meta/0003_snapshot.json
new file mode 100644
index 0000000..fa57c50
--- /dev/null
+++ b/drizzle/sqlite/meta/0003_snapshot.json
@@ -0,0 +1,6706 @@
+{
+ "version": "6",
+ "dialect": "sqlite",
+ "id": "7024c984-caee-4ce9-a6f3-27907eb0143d",
+ "prevId": "741b6f3f-37a3-42a5-ba62-6e3d2127e031",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ }
+ },
+ "views": {},
+ "enums": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/sqlite/meta/0004_snapshot.json b/drizzle/sqlite/meta/0004_snapshot.json
new file mode 100644
index 0000000..3d62f18
--- /dev/null
+++ b/drizzle/sqlite/meta/0004_snapshot.json
@@ -0,0 +1,6726 @@
+{
+ "version": "6",
+ "dialect": "sqlite",
+ "id": "333b4446-ead3-418f-9abe-6958b5164cbc",
+ "prevId": "7024c984-caee-4ce9-a6f3-27907eb0143d",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ }
+ },
+ "views": {},
+ "enums": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/sqlite/meta/0005_snapshot.json b/drizzle/sqlite/meta/0005_snapshot.json
new file mode 100644
index 0000000..dfb8619
--- /dev/null
+++ b/drizzle/sqlite/meta/0005_snapshot.json
@@ -0,0 +1,6847 @@
+{
+ "version": "6",
+ "dialect": "sqlite",
+ "id": "94b5c3da-f963-4c0f-8446-c0e69438c696",
+ "prevId": "333b4446-ead3-418f-9abe-6958b5164cbc",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_workspaces": {
+ "name": "user_workspaces",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ }
+ },
+ "views": {},
+ "enums": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/sqlite/meta/0006_snapshot.json b/drizzle/sqlite/meta/0006_snapshot.json
new file mode 100644
index 0000000..c9aaa5f
--- /dev/null
+++ b/drizzle/sqlite/meta/0006_snapshot.json
@@ -0,0 +1,6893 @@
+{
+ "version": "6",
+ "dialect": "sqlite",
+ "id": "2ecae16a-8588-4a55-8d8b-015ef61eeebe",
+ "prevId": "94b5c3da-f963-4c0f-8446-c0e69438c696",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ui_preferences": {
+ "name": "ui_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ui_preferences_user_id_users_id_fk": {
+ "name": "ui_preferences_user_id_users_id_fk",
+ "tableFrom": "ui_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_workspaces": {
+ "name": "user_workspaces",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ }
+ },
+ "views": {},
+ "enums": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "indexes": {}
+ }
+}
diff --git a/drizzle/sqlite/meta/0007_snapshot.json b/drizzle/sqlite/meta/0007_snapshot.json
new file mode 100644
index 0000000..9055472
--- /dev/null
+++ b/drizzle/sqlite/meta/0007_snapshot.json
@@ -0,0 +1,7214 @@
+{
+ "version": "6",
+ "dialect": "sqlite",
+ "id": "00ef816a-f782-4f84-9939-0920df15cbc8",
+ "prevId": "2ecae16a-8588-4a55-8d8b-015ef61eeebe",
+ "tables": {
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_alert_firings_rule": {
+ "name": "idx_alert_firings_rule",
+ "columns": [
+ "rule_id",
+ "fired_at"
+ ],
+ "isUnique": false
+ },
+ "idx_alert_firings_host": {
+ "name": "idx_alert_firings_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {
+ "idx_api_keys_user_id": {
+ "name": "idx_api_keys_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_audit_logs_timestamp": {
+ "name": "idx_audit_logs_timestamp",
+ "columns": [
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_user_ts": {
+ "name": "idx_audit_logs_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_action_ts": {
+ "name": "idx_audit_logs_action_ts",
+ "columns": [
+ "action",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_resource_ts": {
+ "name": "idx_audit_logs_resource_ts",
+ "columns": [
+ "resource_type",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_command_history_user_host": {
+ "name": "idx_command_history_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_dismissed_alerts_user_id": {
+ "name": "idx_dismissed_alerts_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_pinned_user": {
+ "name": "idx_file_manager_pinned_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_recent_user": {
+ "name": "idx_file_manager_recent_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_shortcuts_user": {
+ "name": "idx_file_manager_shortcuts_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "idx_fleet_inventory_user": {
+ "name": "idx_fleet_inventory_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ },
+ "idx_fleet_members_host": {
+ "name": "idx_fleet_members_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_homepage_items_user_id": {
+ "name": "idx_homepage_items_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_host_access_user_id": {
+ "name": "idx_host_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_role_id": {
+ "name": "idx_host_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_host_id": {
+ "name": "idx_host_access_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_expires_at": {
+ "name": "idx_host_access_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_ssh_data_user_id": {
+ "name": "idx_ssh_data_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_parent_host": {
+ "name": "idx_ssh_data_parent_host",
+ "columns": [
+ "parent_host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_credential": {
+ "name": "idx_ssh_data_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_recent_activity_user_ts": {
+ "name": "idx_recent_activity_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_session_recordings_user_started": {
+ "name": "idx_session_recordings_user_started",
+ "columns": [
+ "user_id",
+ "started_at"
+ ],
+ "isUnique": false
+ },
+ "idx_session_recordings_host": {
+ "name": "idx_session_recordings_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ],
+ "isUnique": true
+ },
+ "idx_session_shares_session_id": {
+ "name": "idx_session_shares_session_id",
+ "columns": [
+ "session_id"
+ ],
+ "isUnique": false
+ },
+ "idx_session_shares_host_id": {
+ "name": "idx_session_shares_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_sessions_user_id": {
+ "name": "idx_sessions_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_sessions_expires_at": {
+ "name": "idx_sessions_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_snippet_access_user_id": {
+ "name": "idx_snippet_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_snippet_access_snippet_id": {
+ "name": "idx_snippet_access_snippet_id",
+ "columns": [
+ "snippet_id"
+ ],
+ "isUnique": false
+ },
+ "idx_snippet_access_role_id": {
+ "name": "idx_snippet_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_snippets_user_id": {
+ "name": "idx_snippets_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credential_usage_credential": {
+ "name": "idx_ssh_credential_usage_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_credential_usage_user": {
+ "name": "idx_ssh_credential_usage_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_ssh_credentials_user_id": {
+ "name": "idx_ssh_credentials_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_ssh_folders_user_id": {
+ "name": "idx_ssh_folders_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_transfer_recent_user": {
+ "name": "idx_transfer_recent_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_trusted_devices_user_id": {
+ "name": "idx_trusted_devices_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ui_preferences": {
+ "name": "ui_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ui_preferences_user_id_users_id_fk": {
+ "name": "ui_preferences_user_id_users_id_fk",
+ "tableFrom": "ui_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_open_tabs_user_id": {
+ "name": "idx_user_open_tabs_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ },
+ "idx_user_roles_role_id": {
+ "name": "idx_user_roles_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_workspaces": {
+ "name": "user_workspaces",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_user_workspaces_user_id": {
+ "name": "idx_user_workspaces_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ }
+ },
+ "views": {},
+ "enums": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/sqlite/meta/0008_snapshot.json b/drizzle/sqlite/meta/0008_snapshot.json
new file mode 100644
index 0000000..a826353
--- /dev/null
+++ b/drizzle/sqlite/meta/0008_snapshot.json
@@ -0,0 +1,8263 @@
+{
+ "version": "6",
+ "dialect": "sqlite",
+ "id": "5d2a8047-80bc-422e-8ae0-0076848e4c1e",
+ "prevId": "00ef816a-f782-4f84-9939-0920df15cbc8",
+ "tables": {
+ "ai_conversations": {
+ "name": "ai_conversations",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_conversations_user": {
+ "name": "idx_ai_conversations_user",
+ "columns": [
+ "user_id",
+ "updated_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_conversations_user_id_users_id_fk": {
+ "name": "ai_conversations_user_id_users_id_fk",
+ "tableFrom": "ai_conversations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ai_messages": {
+ "name": "ai_messages",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "''"
+ },
+ "tool_calls": {
+ "name": "tool_calls",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_messages_conversation": {
+ "name": "idx_ai_messages_conversation",
+ "columns": [
+ "conversation_id",
+ "created_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_messages_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_messages_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_messages",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ai_proposals": {
+ "name": "ai_proposals",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'pending'"
+ },
+ "applied_at": {
+ "name": "applied_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "result_summary": {
+ "name": "result_summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_proposals_user": {
+ "name": "idx_ai_proposals_user",
+ "columns": [
+ "user_id",
+ "status"
+ ],
+ "isUnique": false
+ },
+ "idx_ai_proposals_conversation": {
+ "name": "idx_ai_proposals_conversation",
+ "columns": [
+ "conversation_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_proposals_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_proposals_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ai_proposals_user_id_users_id_fk": {
+ "name": "ai_proposals_user_id_users_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ai_providers": {
+ "name": "ai_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "provider_type": {
+ "name": "provider_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "base_url": {
+ "name": "base_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "api_key": {
+ "name": "api_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "api_key_prefix": {
+ "name": "api_key_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "default_model": {
+ "name": "default_model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_providers_user_label": {
+ "name": "idx_ai_providers_user_label",
+ "columns": [
+ "user_id",
+ "label"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ai_providers_user_id_users_id_fk": {
+ "name": "ai_providers_user_id_users_id_fk",
+ "tableFrom": "ai_providers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_alert_firings_rule": {
+ "name": "idx_alert_firings_rule",
+ "columns": [
+ "rule_id",
+ "fired_at"
+ ],
+ "isUnique": false
+ },
+ "idx_alert_firings_host": {
+ "name": "idx_alert_firings_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {
+ "idx_api_keys_user_id": {
+ "name": "idx_api_keys_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_audit_logs_timestamp": {
+ "name": "idx_audit_logs_timestamp",
+ "columns": [
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_user_ts": {
+ "name": "idx_audit_logs_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_action_ts": {
+ "name": "idx_audit_logs_action_ts",
+ "columns": [
+ "action",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_resource_ts": {
+ "name": "idx_audit_logs_resource_ts",
+ "columns": [
+ "resource_type",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automation_channels": {
+ "name": "automation_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_channels_pair": {
+ "name": "idx_automation_channels_pair",
+ "columns": [
+ "automation_id",
+ "channel_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "automation_channels_automation_id_automations_id_fk": {
+ "name": "automation_channels_automation_id_automations_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_channels_channel_id_notification_channels_id_fk": {
+ "name": "automation_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automation_run_steps": {
+ "name": "automation_run_steps",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "run_id": {
+ "name": "run_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_index": {
+ "name": "step_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_id": {
+ "name": "step_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_type": {
+ "name": "step_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "output": {
+ "name": "output",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "truncated": {
+ "name": "truncated",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_automation_run_steps_run": {
+ "name": "idx_automation_run_steps_run",
+ "columns": [
+ "run_id",
+ "step_index"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_run_steps_run_id_automation_runs_id_fk": {
+ "name": "automation_run_steps_run_id_automation_runs_id_fk",
+ "tableFrom": "automation_run_steps",
+ "tableTo": "automation_runs",
+ "columnsFrom": [
+ "run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automation_runs": {
+ "name": "automation_runs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "trigger_context": {
+ "name": "trigger_context",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration_ms": {
+ "name": "duration_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "parent_run_id": {
+ "name": "parent_run_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_runs_automation": {
+ "name": "idx_automation_runs_automation",
+ "columns": [
+ "automation_id",
+ "started_at"
+ ],
+ "isUnique": false
+ },
+ "idx_automation_runs_user": {
+ "name": "idx_automation_runs_user",
+ "columns": [
+ "user_id",
+ "started_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_runs_automation_id_automations_id_fk": {
+ "name": "automation_runs_automation_id_automations_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_runs_user_id_users_id_fk": {
+ "name": "automation_runs_user_id_users_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automation_schedules": {
+ "name": "automation_schedules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "cron": {
+ "name": "cron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "next_due_at": {
+ "name": "next_due_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_tick_at": {
+ "name": "last_tick_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_schedules_automation": {
+ "name": "idx_automation_schedules_automation",
+ "columns": [
+ "automation_id"
+ ],
+ "isUnique": true
+ },
+ "idx_automation_schedules_due": {
+ "name": "idx_automation_schedules_due",
+ "columns": [
+ "next_due_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_schedules_automation_id_automations_id_fk": {
+ "name": "automation_schedules_automation_id_automations_id_fk",
+ "tableFrom": "automation_schedules",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automation_trigger_state": {
+ "name": "automation_trigger_state",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "state_key": {
+ "name": "state_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "breach_started_at": {
+ "name": "breach_started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_fired_at": {
+ "name": "last_fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_value": {
+ "name": "last_value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_observed_state": {
+ "name": "last_observed_state",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_automation_trigger_state_key": {
+ "name": "idx_automation_trigger_state_key",
+ "columns": [
+ "automation_id",
+ "state_key"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "automation_trigger_state_automation_id_automations_id_fk": {
+ "name": "automation_trigger_state_automation_id_automations_id_fk",
+ "tableFrom": "automation_trigger_state",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automations": {
+ "name": "automations",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "definition": {
+ "name": "definition",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "definition_version": {
+ "name": "definition_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "concurrency_policy": {
+ "name": "concurrency_policy",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'skip'"
+ },
+ "max_run_seconds": {
+ "name": "max_run_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "last_run_at": {
+ "name": "last_run_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_run_status": {
+ "name": "last_run_status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_automations_user": {
+ "name": "idx_automations_user",
+ "columns": [
+ "user_id",
+ "enabled"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automations_user_id_users_id_fk": {
+ "name": "automations_user_id_users_id_fk",
+ "tableFrom": "automations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_command_history_user_host": {
+ "name": "idx_command_history_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_dismissed_alerts_user_id": {
+ "name": "idx_dismissed_alerts_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_pinned_user": {
+ "name": "idx_file_manager_pinned_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_recent_user": {
+ "name": "idx_file_manager_recent_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_shortcuts_user": {
+ "name": "idx_file_manager_shortcuts_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "idx_fleet_inventory_user": {
+ "name": "idx_fleet_inventory_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ },
+ "idx_fleet_members_host": {
+ "name": "idx_fleet_members_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_homepage_items_user_id": {
+ "name": "idx_homepage_items_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_host_access_user_id": {
+ "name": "idx_host_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_role_id": {
+ "name": "idx_host_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_host_id": {
+ "name": "idx_host_access_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_expires_at": {
+ "name": "idx_host_access_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_ssh_data_user_id": {
+ "name": "idx_ssh_data_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_parent_host": {
+ "name": "idx_ssh_data_parent_host",
+ "columns": [
+ "parent_host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_credential": {
+ "name": "idx_ssh_data_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_recent_activity_user_ts": {
+ "name": "idx_recent_activity_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_session_recordings_user_started": {
+ "name": "idx_session_recordings_user_started",
+ "columns": [
+ "user_id",
+ "started_at"
+ ],
+ "isUnique": false
+ },
+ "idx_session_recordings_host": {
+ "name": "idx_session_recordings_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ],
+ "isUnique": true
+ },
+ "idx_session_shares_session_id": {
+ "name": "idx_session_shares_session_id",
+ "columns": [
+ "session_id"
+ ],
+ "isUnique": false
+ },
+ "idx_session_shares_host_id": {
+ "name": "idx_session_shares_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_sessions_user_id": {
+ "name": "idx_sessions_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_sessions_expires_at": {
+ "name": "idx_sessions_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_snippet_access_user_id": {
+ "name": "idx_snippet_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_snippet_access_snippet_id": {
+ "name": "idx_snippet_access_snippet_id",
+ "columns": [
+ "snippet_id"
+ ],
+ "isUnique": false
+ },
+ "idx_snippet_access_role_id": {
+ "name": "idx_snippet_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_snippets_user_id": {
+ "name": "idx_snippets_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credential_usage_credential": {
+ "name": "idx_ssh_credential_usage_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_credential_usage_user": {
+ "name": "idx_ssh_credential_usage_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_ssh_credentials_user_id": {
+ "name": "idx_ssh_credentials_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_ssh_folders_user_id": {
+ "name": "idx_ssh_folders_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_transfer_recent_user": {
+ "name": "idx_transfer_recent_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_trusted_devices_user_id": {
+ "name": "idx_trusted_devices_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ui_preferences": {
+ "name": "ui_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ui_preferences_user_id_users_id_fk": {
+ "name": "ui_preferences_user_id_users_id_fk",
+ "tableFrom": "ui_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_open_tabs_user_id": {
+ "name": "idx_user_open_tabs_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ai_assistant_enabled": {
+ "name": "ai_assistant_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ai_read_only_commands": {
+ "name": "ai_read_only_commands",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ },
+ "idx_user_roles_role_id": {
+ "name": "idx_user_roles_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_workspaces": {
+ "name": "user_workspaces",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_user_workspaces_user_id": {
+ "name": "idx_user_workspaces_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ }
+ },
+ "views": {},
+ "enums": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/sqlite/meta/0009_snapshot.json b/drizzle/sqlite/meta/0009_snapshot.json
new file mode 100644
index 0000000..d2ebf55
--- /dev/null
+++ b/drizzle/sqlite/meta/0009_snapshot.json
@@ -0,0 +1,8277 @@
+{
+ "version": "6",
+ "dialect": "sqlite",
+ "id": "54b875dd-78fc-4ae4-a00a-a6594bb31714",
+ "prevId": "5d2a8047-80bc-422e-8ae0-0076848e4c1e",
+ "tables": {
+ "ai_conversations": {
+ "name": "ai_conversations",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_conversations_user": {
+ "name": "idx_ai_conversations_user",
+ "columns": [
+ "user_id",
+ "updated_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_conversations_user_id_users_id_fk": {
+ "name": "ai_conversations_user_id_users_id_fk",
+ "tableFrom": "ai_conversations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ai_messages": {
+ "name": "ai_messages",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "''"
+ },
+ "tool_calls": {
+ "name": "tool_calls",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_messages_conversation": {
+ "name": "idx_ai_messages_conversation",
+ "columns": [
+ "conversation_id",
+ "created_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_messages_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_messages_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_messages",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ai_proposals": {
+ "name": "ai_proposals",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'pending'"
+ },
+ "applied_at": {
+ "name": "applied_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "result_summary": {
+ "name": "result_summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_proposals_user": {
+ "name": "idx_ai_proposals_user",
+ "columns": [
+ "user_id",
+ "status"
+ ],
+ "isUnique": false
+ },
+ "idx_ai_proposals_conversation": {
+ "name": "idx_ai_proposals_conversation",
+ "columns": [
+ "conversation_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_proposals_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_proposals_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ai_proposals_user_id_users_id_fk": {
+ "name": "ai_proposals_user_id_users_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ai_providers": {
+ "name": "ai_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "provider_type": {
+ "name": "provider_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "base_url": {
+ "name": "base_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "api_key": {
+ "name": "api_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "api_key_prefix": {
+ "name": "api_key_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "default_model": {
+ "name": "default_model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_providers_user_label": {
+ "name": "idx_ai_providers_user_label",
+ "columns": [
+ "user_id",
+ "label"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ai_providers_user_id_users_id_fk": {
+ "name": "ai_providers_user_id_users_id_fk",
+ "tableFrom": "ai_providers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_alert_firings_rule": {
+ "name": "idx_alert_firings_rule",
+ "columns": [
+ "rule_id",
+ "fired_at"
+ ],
+ "isUnique": false
+ },
+ "idx_alert_firings_host": {
+ "name": "idx_alert_firings_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {
+ "idx_api_keys_user_id": {
+ "name": "idx_api_keys_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_audit_logs_timestamp": {
+ "name": "idx_audit_logs_timestamp",
+ "columns": [
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_user_ts": {
+ "name": "idx_audit_logs_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_action_ts": {
+ "name": "idx_audit_logs_action_ts",
+ "columns": [
+ "action",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_resource_ts": {
+ "name": "idx_audit_logs_resource_ts",
+ "columns": [
+ "resource_type",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automation_channels": {
+ "name": "automation_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_channels_pair": {
+ "name": "idx_automation_channels_pair",
+ "columns": [
+ "automation_id",
+ "channel_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "automation_channels_automation_id_automations_id_fk": {
+ "name": "automation_channels_automation_id_automations_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_channels_channel_id_notification_channels_id_fk": {
+ "name": "automation_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automation_run_steps": {
+ "name": "automation_run_steps",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "run_id": {
+ "name": "run_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_index": {
+ "name": "step_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_id": {
+ "name": "step_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_type": {
+ "name": "step_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "output": {
+ "name": "output",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "truncated": {
+ "name": "truncated",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_automation_run_steps_run": {
+ "name": "idx_automation_run_steps_run",
+ "columns": [
+ "run_id",
+ "step_index"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_run_steps_run_id_automation_runs_id_fk": {
+ "name": "automation_run_steps_run_id_automation_runs_id_fk",
+ "tableFrom": "automation_run_steps",
+ "tableTo": "automation_runs",
+ "columnsFrom": [
+ "run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automation_runs": {
+ "name": "automation_runs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "trigger_context": {
+ "name": "trigger_context",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration_ms": {
+ "name": "duration_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "parent_run_id": {
+ "name": "parent_run_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_runs_automation": {
+ "name": "idx_automation_runs_automation",
+ "columns": [
+ "automation_id",
+ "started_at"
+ ],
+ "isUnique": false
+ },
+ "idx_automation_runs_user": {
+ "name": "idx_automation_runs_user",
+ "columns": [
+ "user_id",
+ "started_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_runs_automation_id_automations_id_fk": {
+ "name": "automation_runs_automation_id_automations_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_runs_user_id_users_id_fk": {
+ "name": "automation_runs_user_id_users_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automation_schedules": {
+ "name": "automation_schedules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "cron": {
+ "name": "cron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "next_due_at": {
+ "name": "next_due_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_tick_at": {
+ "name": "last_tick_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_schedules_automation": {
+ "name": "idx_automation_schedules_automation",
+ "columns": [
+ "automation_id"
+ ],
+ "isUnique": true
+ },
+ "idx_automation_schedules_due": {
+ "name": "idx_automation_schedules_due",
+ "columns": [
+ "next_due_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_schedules_automation_id_automations_id_fk": {
+ "name": "automation_schedules_automation_id_automations_id_fk",
+ "tableFrom": "automation_schedules",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automation_trigger_state": {
+ "name": "automation_trigger_state",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "state_key": {
+ "name": "state_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "breach_started_at": {
+ "name": "breach_started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_fired_at": {
+ "name": "last_fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_value": {
+ "name": "last_value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_observed_state": {
+ "name": "last_observed_state",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_automation_trigger_state_key": {
+ "name": "idx_automation_trigger_state_key",
+ "columns": [
+ "automation_id",
+ "state_key"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "automation_trigger_state_automation_id_automations_id_fk": {
+ "name": "automation_trigger_state_automation_id_automations_id_fk",
+ "tableFrom": "automation_trigger_state",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automations": {
+ "name": "automations",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "definition": {
+ "name": "definition",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "definition_version": {
+ "name": "definition_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "concurrency_policy": {
+ "name": "concurrency_policy",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'skip'"
+ },
+ "max_run_seconds": {
+ "name": "max_run_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "last_run_at": {
+ "name": "last_run_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_run_status": {
+ "name": "last_run_status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_automations_user": {
+ "name": "idx_automations_user",
+ "columns": [
+ "user_id",
+ "enabled"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automations_user_id_users_id_fk": {
+ "name": "automations_user_id_users_id_fk",
+ "tableFrom": "automations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_command_history_user_host": {
+ "name": "idx_command_history_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_dismissed_alerts_user_id": {
+ "name": "idx_dismissed_alerts_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_pinned_user": {
+ "name": "idx_file_manager_pinned_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_recent_user": {
+ "name": "idx_file_manager_recent_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_shortcuts_user": {
+ "name": "idx_file_manager_shortcuts_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "idx_fleet_inventory_user": {
+ "name": "idx_fleet_inventory_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ },
+ "idx_fleet_members_host": {
+ "name": "idx_fleet_members_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_homepage_items_user_id": {
+ "name": "idx_homepage_items_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_host_access_user_id": {
+ "name": "idx_host_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_role_id": {
+ "name": "idx_host_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_host_id": {
+ "name": "idx_host_access_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_expires_at": {
+ "name": "idx_host_access_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_ssh_data_user_id": {
+ "name": "idx_ssh_data_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_parent_host": {
+ "name": "idx_ssh_data_parent_host",
+ "columns": [
+ "parent_host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_credential": {
+ "name": "idx_ssh_data_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_recent_activity_user_ts": {
+ "name": "idx_recent_activity_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_session_recordings_user_started": {
+ "name": "idx_session_recordings_user_started",
+ "columns": [
+ "user_id",
+ "started_at"
+ ],
+ "isUnique": false
+ },
+ "idx_session_recordings_host": {
+ "name": "idx_session_recordings_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ],
+ "isUnique": true
+ },
+ "idx_session_shares_session_id": {
+ "name": "idx_session_shares_session_id",
+ "columns": [
+ "session_id"
+ ],
+ "isUnique": false
+ },
+ "idx_session_shares_host_id": {
+ "name": "idx_session_shares_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_sessions_user_id": {
+ "name": "idx_sessions_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_sessions_expires_at": {
+ "name": "idx_sessions_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_snippet_access_user_id": {
+ "name": "idx_snippet_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_snippet_access_snippet_id": {
+ "name": "idx_snippet_access_snippet_id",
+ "columns": [
+ "snippet_id"
+ ],
+ "isUnique": false
+ },
+ "idx_snippet_access_role_id": {
+ "name": "idx_snippet_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_snippets_user_id": {
+ "name": "idx_snippets_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credential_usage_credential": {
+ "name": "idx_ssh_credential_usage_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_credential_usage_user": {
+ "name": "idx_ssh_credential_usage_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_ssh_credentials_user_id": {
+ "name": "idx_ssh_credentials_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_ssh_folders_user_id": {
+ "name": "idx_ssh_folders_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_transfer_recent_user": {
+ "name": "idx_transfer_recent_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_trusted_devices_user_id": {
+ "name": "idx_trusted_devices_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ui_preferences": {
+ "name": "ui_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ui_preferences_user_id_users_id_fk": {
+ "name": "ui_preferences_user_id_users_id_fk",
+ "tableFrom": "ui_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_open_tabs_user_id": {
+ "name": "idx_user_open_tabs_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ai_assistant_enabled": {
+ "name": "ai_assistant_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ai_read_only_commands": {
+ "name": "ai_read_only_commands",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_defaults": {
+ "name": "terminal_defaults",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_defaults": {
+ "name": "rdp_defaults",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ },
+ "idx_user_roles_role_id": {
+ "name": "idx_user_roles_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_workspaces": {
+ "name": "user_workspaces",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_user_workspaces_user_id": {
+ "name": "idx_user_workspaces_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ }
+ },
+ "views": {},
+ "enums": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/sqlite/meta/0010_snapshot.json b/drizzle/sqlite/meta/0010_snapshot.json
new file mode 100644
index 0000000..a39444e
--- /dev/null
+++ b/drizzle/sqlite/meta/0010_snapshot.json
@@ -0,0 +1,8284 @@
+{
+ "version": "6",
+ "dialect": "sqlite",
+ "id": "251d9ba4-91ba-4d6f-aede-22f81c62de80",
+ "prevId": "54b875dd-78fc-4ae4-a00a-a6594bb31714",
+ "tables": {
+ "ai_conversations": {
+ "name": "ai_conversations",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "provider_id": {
+ "name": "provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "model": {
+ "name": "model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_conversations_user": {
+ "name": "idx_ai_conversations_user",
+ "columns": [
+ "user_id",
+ "updated_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_conversations_user_id_users_id_fk": {
+ "name": "ai_conversations_user_id_users_id_fk",
+ "tableFrom": "ai_conversations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ai_messages": {
+ "name": "ai_messages",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role": {
+ "name": "role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "''"
+ },
+ "tool_calls": {
+ "name": "tool_calls",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_messages_conversation": {
+ "name": "idx_ai_messages_conversation",
+ "columns": [
+ "conversation_id",
+ "created_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_messages_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_messages_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_messages",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ai_proposals": {
+ "name": "ai_proposals",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "conversation_id": {
+ "name": "conversation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "summary": {
+ "name": "summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'pending'"
+ },
+ "applied_at": {
+ "name": "applied_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "result_summary": {
+ "name": "result_summary",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_proposals_user": {
+ "name": "idx_ai_proposals_user",
+ "columns": [
+ "user_id",
+ "status"
+ ],
+ "isUnique": false
+ },
+ "idx_ai_proposals_conversation": {
+ "name": "idx_ai_proposals_conversation",
+ "columns": [
+ "conversation_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ai_proposals_conversation_id_ai_conversations_id_fk": {
+ "name": "ai_proposals_conversation_id_ai_conversations_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "ai_conversations",
+ "columnsFrom": [
+ "conversation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ai_proposals_user_id_users_id_fk": {
+ "name": "ai_proposals_user_id_users_id_fk",
+ "tableFrom": "ai_proposals",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ai_providers": {
+ "name": "ai_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "provider_type": {
+ "name": "provider_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "base_url": {
+ "name": "base_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "api_key": {
+ "name": "api_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "api_key_prefix": {
+ "name": "api_key_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "default_model": {
+ "name": "default_model",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ai_providers_user_label": {
+ "name": "idx_ai_providers_user_label",
+ "columns": [
+ "user_id",
+ "label"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "ai_providers_user_id_users_id_fk": {
+ "name": "ai_providers_user_id_users_id_fk",
+ "tableFrom": "ai_providers",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_firings": {
+ "name": "alert_firings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "fired_at": {
+ "name": "fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "resolved_at": {
+ "name": "resolved_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "message": {
+ "name": "message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "severity": {
+ "name": "severity",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'warning'"
+ },
+ "acknowledged": {
+ "name": "acknowledged",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_alert_firings_rule": {
+ "name": "idx_alert_firings_rule",
+ "columns": [
+ "rule_id",
+ "fired_at"
+ ],
+ "isUnique": false
+ },
+ "idx_alert_firings_host": {
+ "name": "idx_alert_firings_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "alert_firings_user_id_users_id_fk": {
+ "name": "alert_firings_user_id_users_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_firings_rule_id_alert_rules_id_fk": {
+ "name": "alert_firings_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_firings",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rule_channels": {
+ "name": "alert_rule_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "rule_id": {
+ "name": "rule_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rule_channels_rule_id_alert_rules_id_fk": {
+ "name": "alert_rule_channels_rule_id_alert_rules_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "alert_rules",
+ "columnsFrom": [
+ "rule_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rule_channels_channel_id_notification_channels_id_fk": {
+ "name": "alert_rule_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "alert_rule_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "alert_rules": {
+ "name": "alert_rules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "threshold_value": {
+ "name": "threshold_value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "threshold_duration_seconds": {
+ "name": "threshold_duration_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cooldown_minutes": {
+ "name": "cooldown_minutes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 15
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "alert_rules_user_id_users_id_fk": {
+ "name": "alert_rules_user_id_users_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "alert_rules_host_id_ssh_data_id_fk": {
+ "name": "alert_rules_host_id_ssh_data_id_fk",
+ "tableFrom": "alert_rules",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "api_keys": {
+ "name": "api_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_hash": {
+ "name": "token_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "token_prefix": {
+ "name": "token_prefix",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_active": {
+ "name": "is_active",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ }
+ },
+ "indexes": {
+ "idx_api_keys_user_id": {
+ "name": "idx_api_keys_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "api_keys_user_id_users_id_fk": {
+ "name": "api_keys_user_id_users_id_fk",
+ "tableFrom": "api_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "audit_logs": {
+ "name": "audit_logs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "action": {
+ "name": "action",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_type": {
+ "name": "resource_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "resource_id": {
+ "name": "resource_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "resource_name": {
+ "name": "resource_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "details": {
+ "name": "details",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip_address": {
+ "name": "ip_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_agent": {
+ "name": "user_agent",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "success": {
+ "name": "success",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "error_message": {
+ "name": "error_message",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_audit_logs_timestamp": {
+ "name": "idx_audit_logs_timestamp",
+ "columns": [
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_user_ts": {
+ "name": "idx_audit_logs_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_action_ts": {
+ "name": "idx_audit_logs_action_ts",
+ "columns": [
+ "action",
+ "timestamp"
+ ],
+ "isUnique": false
+ },
+ "idx_audit_logs_resource_ts": {
+ "name": "idx_audit_logs_resource_ts",
+ "columns": [
+ "resource_type",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "audit_logs_user_id_users_id_fk": {
+ "name": "audit_logs_user_id_users_id_fk",
+ "tableFrom": "audit_logs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automation_channels": {
+ "name": "automation_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "channel_id": {
+ "name": "channel_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_channels_pair": {
+ "name": "idx_automation_channels_pair",
+ "columns": [
+ "automation_id",
+ "channel_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "automation_channels_automation_id_automations_id_fk": {
+ "name": "automation_channels_automation_id_automations_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_channels_channel_id_notification_channels_id_fk": {
+ "name": "automation_channels_channel_id_notification_channels_id_fk",
+ "tableFrom": "automation_channels",
+ "tableTo": "notification_channels",
+ "columnsFrom": [
+ "channel_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automation_run_steps": {
+ "name": "automation_run_steps",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "run_id": {
+ "name": "run_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_index": {
+ "name": "step_index",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_id": {
+ "name": "step_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "step_type": {
+ "name": "step_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "output": {
+ "name": "output",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "truncated": {
+ "name": "truncated",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "idx_automation_run_steps_run": {
+ "name": "idx_automation_run_steps_run",
+ "columns": [
+ "run_id",
+ "step_index"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_run_steps_run_id_automation_runs_id_fk": {
+ "name": "automation_run_steps_run_id_automation_runs_id_fk",
+ "tableFrom": "automation_run_steps",
+ "tableTo": "automation_runs",
+ "columnsFrom": [
+ "run_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automation_runs": {
+ "name": "automation_runs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "trigger_type": {
+ "name": "trigger_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "trigger_context": {
+ "name": "trigger_context",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status": {
+ "name": "status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "finished_at": {
+ "name": "finished_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration_ms": {
+ "name": "duration_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "error": {
+ "name": "error",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "parent_run_id": {
+ "name": "parent_run_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_runs_automation": {
+ "name": "idx_automation_runs_automation",
+ "columns": [
+ "automation_id",
+ "started_at"
+ ],
+ "isUnique": false
+ },
+ "idx_automation_runs_user": {
+ "name": "idx_automation_runs_user",
+ "columns": [
+ "user_id",
+ "started_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_runs_automation_id_automations_id_fk": {
+ "name": "automation_runs_automation_id_automations_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "automation_runs_user_id_users_id_fk": {
+ "name": "automation_runs_user_id_users_id_fk",
+ "tableFrom": "automation_runs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automation_schedules": {
+ "name": "automation_schedules",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "cron": {
+ "name": "cron",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timezone": {
+ "name": "timezone",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "next_due_at": {
+ "name": "next_due_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_tick_at": {
+ "name": "last_tick_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_automation_schedules_automation": {
+ "name": "idx_automation_schedules_automation",
+ "columns": [
+ "automation_id"
+ ],
+ "isUnique": true
+ },
+ "idx_automation_schedules_due": {
+ "name": "idx_automation_schedules_due",
+ "columns": [
+ "next_due_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automation_schedules_automation_id_automations_id_fk": {
+ "name": "automation_schedules_automation_id_automations_id_fk",
+ "tableFrom": "automation_schedules",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automation_trigger_state": {
+ "name": "automation_trigger_state",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "automation_id": {
+ "name": "automation_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "state_key": {
+ "name": "state_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "breach_started_at": {
+ "name": "breach_started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_fired_at": {
+ "name": "last_fired_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_value": {
+ "name": "last_value",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_observed_state": {
+ "name": "last_observed_state",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_automation_trigger_state_key": {
+ "name": "idx_automation_trigger_state_key",
+ "columns": [
+ "automation_id",
+ "state_key"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "automation_trigger_state_automation_id_automations_id_fk": {
+ "name": "automation_trigger_state_automation_id_automations_id_fk",
+ "tableFrom": "automation_trigger_state",
+ "tableTo": "automations",
+ "columnsFrom": [
+ "automation_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "automations": {
+ "name": "automations",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "definition": {
+ "name": "definition",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "definition_version": {
+ "name": "definition_version",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 1
+ },
+ "concurrency_policy": {
+ "name": "concurrency_policy",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'skip'"
+ },
+ "max_run_seconds": {
+ "name": "max_run_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "dry_run": {
+ "name": "dry_run",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "last_run_at": {
+ "name": "last_run_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_run_status": {
+ "name": "last_run_status",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_automations_user": {
+ "name": "idx_automations_user",
+ "columns": [
+ "user_id",
+ "enabled"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "automations_user_id_users_id_fk": {
+ "name": "automations_user_id_users_id_fk",
+ "tableFrom": "automations",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "c2s_tunnel_presets": {
+ "name": "c2s_tunnel_presets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "platform": {
+ "name": "platform",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "computer_name": {
+ "name": "computer_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "c2s_tunnel_presets_user_id_users_id_fk": {
+ "name": "c2s_tunnel_presets_user_id_users_id_fk",
+ "tableFrom": "c2s_tunnel_presets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "command_history": {
+ "name": "command_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "command": {
+ "name": "command",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "executed_at": {
+ "name": "executed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_command_history_user_host": {
+ "name": "idx_command_history_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "command_history_user_id_users_id_fk": {
+ "name": "command_history_user_id_users_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "command_history_host_id_ssh_data_id_fk": {
+ "name": "command_history_host_id_ssh_data_id_fk",
+ "tableFrom": "command_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "credential_sidebar_preferences": {
+ "name": "credential_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "credential_sidebar_preferences_user_id_users_id_fk": {
+ "name": "credential_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "credential_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dashboard_service_links": {
+ "name": "dashboard_service_links",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "url": {
+ "name": "url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "dashboard_service_links_sync_id_unique": {
+ "name": "dashboard_service_links_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "dashboard_service_links_user_id_users_id_fk": {
+ "name": "dashboard_service_links_user_id_users_id_fk",
+ "tableFrom": "dashboard_service_links",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "dismissed_alerts": {
+ "name": "dismissed_alerts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "alert_id": {
+ "name": "alert_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dismissed_at": {
+ "name": "dismissed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_dismissed_alerts_user_id": {
+ "name": "idx_dismissed_alerts_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "dismissed_alerts_user_id_users_id_fk": {
+ "name": "dismissed_alerts_user_id_users_id_fk",
+ "tableFrom": "dismissed_alerts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_pinned": {
+ "name": "file_manager_pinned",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "pinned_at": {
+ "name": "pinned_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_pinned_user": {
+ "name": "idx_file_manager_pinned_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_pinned_user_id_users_id_fk": {
+ "name": "file_manager_pinned_user_id_users_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_pinned_host_id_ssh_data_id_fk": {
+ "name": "file_manager_pinned_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_pinned",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_recent": {
+ "name": "file_manager_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_opened": {
+ "name": "last_opened",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_recent_user": {
+ "name": "idx_file_manager_recent_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_recent_user_id_users_id_fk": {
+ "name": "file_manager_recent_user_id_users_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_recent_host_id_ssh_data_id_fk": {
+ "name": "file_manager_recent_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "file_manager_shortcuts": {
+ "name": "file_manager_shortcuts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "path": {
+ "name": "path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_file_manager_shortcuts_user": {
+ "name": "idx_file_manager_shortcuts_user",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "file_manager_shortcuts_user_id_users_id_fk": {
+ "name": "file_manager_shortcuts_user_id_users_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "file_manager_shortcuts_host_id_ssh_data_id_fk": {
+ "name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
+ "tableFrom": "file_manager_shortcuts",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleet_inventory": {
+ "name": "fleet_inventory",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "os_pretty_name": {
+ "name": "os_pretty_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kernel": {
+ "name": "kernel",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "architecture": {
+ "name": "architecture",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hostname": {
+ "name": "hostname",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "uptime_seconds": {
+ "name": "uptime_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "package_manager": {
+ "name": "package_manager",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "collected_at": {
+ "name": "collected_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_inventory_host": {
+ "name": "idx_fleet_inventory_host",
+ "columns": [
+ "host_id",
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "idx_fleet_inventory_user": {
+ "name": "idx_fleet_inventory_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "fleet_inventory_host_id_ssh_data_id_fk": {
+ "name": "fleet_inventory_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_inventory_user_id_users_id_fk": {
+ "name": "fleet_inventory_user_id_users_id_fk",
+ "tableFrom": "fleet_inventory",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleet_members": {
+ "name": "fleet_members",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "fleet_id": {
+ "name": "fleet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "added_at": {
+ "name": "added_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_fleet_members_fleet_host": {
+ "name": "idx_fleet_members_fleet_host",
+ "columns": [
+ "fleet_id",
+ "host_id"
+ ],
+ "isUnique": true
+ },
+ "idx_fleet_members_host": {
+ "name": "idx_fleet_members_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "fleet_members_fleet_id_fleets_id_fk": {
+ "name": "fleet_members_fleet_id_fleets_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "fleets",
+ "columnsFrom": [
+ "fleet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "fleet_members_host_id_ssh_data_id_fk": {
+ "name": "fleet_members_host_id_ssh_data_id_fk",
+ "tableFrom": "fleet_members",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "fleets": {
+ "name": "fleets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tag_rules": {
+ "name": "tag_rules",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "fleets_sync_id_unique": {
+ "name": "fleets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "fleets_user_id_users_id_fk": {
+ "name": "fleets_user_id_users_id_fk",
+ "tableFrom": "fleets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_items": {
+ "name": "homepage_items",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type_id": {
+ "name": "type_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "title": {
+ "name": "title",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "folder_id": {
+ "name": "folder_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_items_sync_id_unique": {
+ "name": "homepage_items_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_homepage_items_user_id": {
+ "name": "idx_homepage_items_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "homepage_items_user_id_users_id_fk": {
+ "name": "homepage_items_user_id_users_id_fk",
+ "tableFrom": "homepage_items",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "homepage_layouts": {
+ "name": "homepage_layouts",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "homepage_layouts_user_id_unique": {
+ "name": "homepage_layouts_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "homepage_layouts_user_id_users_id_fk": {
+ "name": "homepage_layouts_user_id_users_id_fk",
+ "tableFrom": "homepage_layouts",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_access": {
+ "name": "host_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'connect'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_accessed_at": {
+ "name": "last_accessed_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_count": {
+ "name": "access_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "idx_host_access_user_id": {
+ "name": "idx_host_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_role_id": {
+ "name": "idx_host_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_host_id": {
+ "name": "idx_host_access_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_host_access_expires_at": {
+ "name": "idx_host_access_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "host_access_host_id_ssh_data_id_fk": {
+ "name": "host_access_host_id_ssh_data_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_user_id_users_id_fk": {
+ "name": "host_access_user_id_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_role_id_roles_id_fk": {
+ "name": "host_access_role_id_roles_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_access_granted_by_users_id_fk": {
+ "name": "host_access_granted_by_users_id_fk",
+ "tableFrom": "host_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_checks": {
+ "name": "host_health_checks",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "checks": {
+ "name": "checks",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "interval_seconds": {
+ "name": "interval_seconds",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 300
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_health_checks_user_host": {
+ "name": "idx_host_health_checks_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_health_checks_user_id_users_id_fk": {
+ "name": "host_health_checks_user_id_users_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_checks_host_id_ssh_data_id_fk": {
+ "name": "host_health_checks_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_checks",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_health_history": {
+ "name": "host_health_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "check_id": {
+ "name": "check_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ok": {
+ "name": "ok",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "latency_ms": {
+ "name": "latency_ms",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detail": {
+ "name": "detail",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_health_history_user_id_users_id_fk": {
+ "name": "host_health_history_user_id_users_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_health_history_host_id_ssh_data_id_fk": {
+ "name": "host_health_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_health_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_history": {
+ "name": "host_metrics_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_metrics_history_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_history_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_metrics_preferences": {
+ "name": "host_metrics_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_host_metrics_prefs_user_host": {
+ "name": "idx_host_metrics_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "host_metrics_preferences_user_id_users_id_fk": {
+ "name": "host_metrics_preferences_user_id_users_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "host_metrics_preferences_host_id_ssh_data_id_fk": {
+ "name": "host_metrics_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "host_metrics_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "host_sidebar_preferences": {
+ "name": "host_sidebar_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "host_sidebar_preferences_user_id_users_id_fk": {
+ "name": "host_sidebar_preferences_user_id_users_id_fk",
+ "tableFrom": "host_sidebar_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_data": {
+ "name": "ssh_data",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "connection_type": {
+ "name": "connection_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ip": {
+ "name": "ip",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "port": {
+ "name": "port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "parent_host_id": {
+ "name": "parent_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "use_warpgate": {
+ "name": "use_warpgate",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "share_ssh_auth": {
+ "name": "share_ssh_auth",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "force_keyboard_interactive": {
+ "name": "force_keyboard_interactive",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sudo_password": {
+ "name": "sudo_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_password": {
+ "name": "autostart_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key": {
+ "name": "autostart_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "autostart_key_password": {
+ "name": "autostart_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "override_credential_username": {
+ "name": "override_credential_username",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_profile_id": {
+ "name": "vault_profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_terminal": {
+ "name": "enable_terminal",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_session_logging": {
+ "name": "enable_session_logging",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "allow_session_sharing": {
+ "name": "allow_session_sharing",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_command_history": {
+ "name": "enable_command_history",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_tunnel": {
+ "name": "enable_tunnel",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "tunnel_connections": {
+ "name": "tunnel_connections",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "jump_hosts": {
+ "name": "jump_hosts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_file_manager": {
+ "name": "enable_file_manager",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "scp_legacy": {
+ "name": "scp_legacy",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_docker": {
+ "name": "enable_docker",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_tmux_monitor": {
+ "name": "enable_tmux_monitor",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_terminal_toolbar": {
+ "name": "enable_terminal_toolbar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_terminal_in_sidebar": {
+ "name": "show_terminal_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "show_file_manager_in_sidebar": {
+ "name": "show_file_manager_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_tunnel_in_sidebar": {
+ "name": "show_tunnel_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_docker_in_sidebar": {
+ "name": "show_docker_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "show_server_stats_in_sidebar": {
+ "name": "show_server_stats_in_sidebar",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "default_path": {
+ "name": "default_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "stats_config": {
+ "name": "stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "docker_config": {
+ "name": "docker_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox": {
+ "name": "enable_proxmox",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_config": {
+ "name": "proxmox_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_proxmox_stats": {
+ "name": "enable_proxmox_stats",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "proxmox_stats_config": {
+ "name": "proxmox_stats_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_config": {
+ "name": "terminal_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "quick_actions": {
+ "name": "quick_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "notes": {
+ "name": "notes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enable_ssh": {
+ "name": "enable_ssh",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "enable_rdp": {
+ "name": "enable_rdp",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_vnc": {
+ "name": "enable_vnc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "enable_telnet": {
+ "name": "enable_telnet",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "ssh_port": {
+ "name": "ssh_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 22
+ },
+ "rdp_port": {
+ "name": "rdp_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 3389
+ },
+ "vnc_port": {
+ "name": "vnc_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 5900
+ },
+ "telnet_port": {
+ "name": "telnet_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 23
+ },
+ "rdp_credential_id": {
+ "name": "rdp_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_user": {
+ "name": "rdp_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_password": {
+ "name": "rdp_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_domain": {
+ "name": "rdp_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_security": {
+ "name": "rdp_security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_ignore_cert": {
+ "name": "rdp_ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "vnc_credential_id": {
+ "name": "vnc_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_password": {
+ "name": "vnc_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_user": {
+ "name": "vnc_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_user": {
+ "name": "telnet_user",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_password": {
+ "name": "telnet_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_credential_id": {
+ "name": "telnet_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_auth_type": {
+ "name": "rdp_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vnc_auth_type": {
+ "name": "vnc_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "telnet_auth_type": {
+ "name": "telnet_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "domain": {
+ "name": "domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "security": {
+ "name": "security",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ignore_cert": {
+ "name": "ignore_cert",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "guacamole_config": {
+ "name": "guacamole_config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "use_socks5": {
+ "name": "use_socks5",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_host": {
+ "name": "socks5_host",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_port": {
+ "name": "socks5_port",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_username": {
+ "name": "socks5_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_password": {
+ "name": "socks5_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "socks5_proxy_chain": {
+ "name": "socks5_proxy_chain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "connection_origin": {
+ "name": "connection_origin",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mac_address": {
+ "name": "mac_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "wol_broadcast_address": {
+ "name": "wol_broadcast_address",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "port_knock_sequence": {
+ "name": "port_knock_sequence",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_fingerprint": {
+ "name": "host_key_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_type": {
+ "name": "host_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_algorithm": {
+ "name": "host_key_algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'sha256'"
+ },
+ "host_key_first_seen": {
+ "name": "host_key_first_seen",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_last_verified": {
+ "name": "host_key_last_verified",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_key_changed_count": {
+ "name": "host_key_changed_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_data_sync_id_unique": {
+ "name": "ssh_data_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_ssh_data_user_id": {
+ "name": "idx_ssh_data_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_parent_host": {
+ "name": "idx_ssh_data_parent_host",
+ "columns": [
+ "parent_host_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_data_credential": {
+ "name": "idx_ssh_data_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_data_user_id_users_id_fk": {
+ "name": "ssh_data_user_id_users_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_data_parent_host_id_ssh_data_id_fk": {
+ "name": "ssh_data_parent_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "parent_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vault_profile_id_vault_profiles_id_fk": {
+ "name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "vault_profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "rdp_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "vnc_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_data",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "telnet_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "network_topology": {
+ "name": "network_topology",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "topology": {
+ "name": "topology",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "network_topology_user_id_users_id_fk": {
+ "name": "network_topology_user_id_users_id_fk",
+ "tableFrom": "network_topology",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "notification_channels": {
+ "name": "notification_channels",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "notification_channels_user_id_users_id_fk": {
+ "name": "notification_channels_user_id_users_id_fk",
+ "tableFrom": "notification_channels",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "opkssh_tokens": {
+ "name": "opkssh_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "email": {
+ "name": "email",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sub": {
+ "name": "sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer": {
+ "name": "issuer",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "audience": {
+ "name": "audience",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_opkssh_tokens_user_host": {
+ "name": "idx_opkssh_tokens_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "opkssh_tokens_user_id_users_id_fk": {
+ "name": "opkssh_tokens_user_id_users_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "opkssh_tokens_host_id_ssh_data_id_fk": {
+ "name": "opkssh_tokens_host_id_ssh_data_id_fk",
+ "tableFrom": "opkssh_tokens",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_node_history": {
+ "name": "proxmox_node_history",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ts": {
+ "name": "ts",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "cpu_percent": {
+ "name": "cpu_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "mem_percent": {
+ "name": "mem_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disk_percent": {
+ "name": "disk_percent",
+ "type": "real",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_rx_bytes": {
+ "name": "net_rx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "net_tx_bytes": {
+ "name": "net_tx_bytes",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "proxmox_node_history_host_id_ssh_data_id_fk": {
+ "name": "proxmox_node_history_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_node_history",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "proxmox_stats_preferences": {
+ "name": "proxmox_stats_preferences",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "layout": {
+ "name": "layout",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_proxmox_stats_prefs_user_host": {
+ "name": "idx_proxmox_stats_prefs_user_host",
+ "columns": [
+ "user_id",
+ "host_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "proxmox_stats_preferences_user_id_users_id_fk": {
+ "name": "proxmox_stats_preferences_user_id_users_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "proxmox_stats_preferences_host_id_ssh_data_id_fk": {
+ "name": "proxmox_stats_preferences_host_id_ssh_data_id_fk",
+ "tableFrom": "proxmox_stats_preferences",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "recent_activity": {
+ "name": "recent_activity",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_name": {
+ "name": "host_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "timestamp": {
+ "name": "timestamp",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_recent_activity_user_ts": {
+ "name": "idx_recent_activity_user_ts",
+ "columns": [
+ "user_id",
+ "timestamp"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "recent_activity_user_id_users_id_fk": {
+ "name": "recent_activity_user_id_users_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "recent_activity_host_id_ssh_data_id_fk": {
+ "name": "recent_activity_host_id_ssh_data_id_fk",
+ "tableFrom": "recent_activity",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "roles": {
+ "name": "roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "display_name": {
+ "name": "display_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_system": {
+ "name": "is_system",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "permissions": {
+ "name": "permissions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "roles_name_unique": {
+ "name": "roles_name_unique",
+ "columns": [
+ "name"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_recordings": {
+ "name": "session_recordings",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "access_id": {
+ "name": "access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "started_at": {
+ "name": "started_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "ended_at": {
+ "name": "ended_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "duration": {
+ "name": "duration",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "commands": {
+ "name": "commands",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "dangerous_actions": {
+ "name": "dangerous_actions",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "recording_path": {
+ "name": "recording_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "format": {
+ "name": "format",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'text'"
+ },
+ "terminated_by_owner": {
+ "name": "terminated_by_owner",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": false
+ },
+ "termination_reason": {
+ "name": "termination_reason",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_session_recordings_user_started": {
+ "name": "idx_session_recordings_user_started",
+ "columns": [
+ "user_id",
+ "started_at"
+ ],
+ "isUnique": false
+ },
+ "idx_session_recordings_host": {
+ "name": "idx_session_recordings_host",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "session_recordings_host_id_ssh_data_id_fk": {
+ "name": "session_recordings_host_id_ssh_data_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_recordings_user_id_users_id_fk": {
+ "name": "session_recordings_user_id_users_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ },
+ "session_recordings_access_id_host_access_id_fk": {
+ "name": "session_recordings_access_id_host_access_id_fk",
+ "tableFrom": "session_recordings",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_share_participants": {
+ "name": "session_share_participants",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "share_id": {
+ "name": "share_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "guest_label": {
+ "name": "guest_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "joined_at": {
+ "name": "joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "left_at": {
+ "name": "left_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "session_share_participants_share_id_session_shares_id_fk": {
+ "name": "session_share_participants_share_id_session_shares_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "session_shares",
+ "columnsFrom": [
+ "share_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_share_participants_user_id_users_id_fk": {
+ "name": "session_share_participants_user_id_users_id_fk",
+ "tableFrom": "session_share_participants",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "session_shares": {
+ "name": "session_shares",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "owner_user_id": {
+ "name": "owner_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_id": {
+ "name": "session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_instance_id": {
+ "name": "tab_instance_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "share_type": {
+ "name": "share_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "link_token": {
+ "name": "link_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'read-only'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "revoked_at": {
+ "name": "revoked_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "last_joined_at": {
+ "name": "last_joined_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "join_count": {
+ "name": "join_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ }
+ },
+ "indexes": {
+ "session_shares_link_token_unique": {
+ "name": "session_shares_link_token_unique",
+ "columns": [
+ "link_token"
+ ],
+ "isUnique": true
+ },
+ "idx_session_shares_session_id": {
+ "name": "idx_session_shares_session_id",
+ "columns": [
+ "session_id"
+ ],
+ "isUnique": false
+ },
+ "idx_session_shares_host_id": {
+ "name": "idx_session_shares_host_id",
+ "columns": [
+ "host_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "session_shares_host_id_ssh_data_id_fk": {
+ "name": "session_shares_host_id_ssh_data_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_owner_user_id_users_id_fk": {
+ "name": "session_shares_owner_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "owner_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "session_shares_target_user_id_users_id_fk": {
+ "name": "session_shares_target_user_id_users_id_fk",
+ "tableFrom": "session_shares",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sessions": {
+ "name": "sessions",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "jwt_token": {
+ "name": "jwt_token",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "oidc_sub": {
+ "name": "oidc_sub",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_sid": {
+ "name": "oidc_sid",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_active_at": {
+ "name": "last_active_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_sessions_user_id": {
+ "name": "idx_sessions_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_sessions_expires_at": {
+ "name": "idx_sessions_expires_at",
+ "columns": [
+ "expires_at"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "sessions_user_id_users_id_fk": {
+ "name": "sessions_user_id_users_id_fk",
+ "tableFrom": "sessions",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "settings": {
+ "name": "settings",
+ "columns": {
+ "key": {
+ "name": "key",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "value": {
+ "name": "value",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_auth_overrides": {
+ "name": "shared_host_auth_overrides",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "shared_host_auth_overrides_host_user_protocol_unique": {
+ "name": "shared_host_auth_overrides_host_user_protocol_unique",
+ "columns": [
+ "host_id",
+ "user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_auth_overrides_host_id_ssh_data_id_fk": {
+ "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_user_id_users_id_fk": {
+ "name": "shared_host_auth_overrides_user_id_users_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_auth_overrides",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "shared_host_secrets": {
+ "name": "shared_host_secrets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "host_access_id": {
+ "name": "host_access_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "target_user_id": {
+ "name": "target_user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "protocol": {
+ "name": "protocol",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'ssh'"
+ },
+ "source_type": {
+ "name": "source_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'credential'"
+ },
+ "original_credential_id": {
+ "name": "original_credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_username": {
+ "name": "encrypted_username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_auth_type": {
+ "name": "encrypted_auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_password": {
+ "name": "encrypted_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key": {
+ "name": "encrypted_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_password": {
+ "name": "encrypted_key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_key_type": {
+ "name": "encrypted_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "encrypted_domain": {
+ "name": "encrypted_domain",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_shared_host_secrets_scope": {
+ "name": "idx_shared_host_secrets_scope",
+ "columns": [
+ "host_access_id",
+ "target_user_id",
+ "protocol"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "shared_host_secrets_host_access_id_host_access_id_fk": {
+ "name": "shared_host_secrets_host_access_id_host_access_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "host_access",
+ "columnsFrom": [
+ "host_access_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_target_user_id_users_id_fk": {
+ "name": "shared_host_secrets_target_user_id_users_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "target_user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
+ "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "shared_host_secrets",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "original_credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_access": {
+ "name": "snippet_access",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "snippet_id": {
+ "name": "snippet_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "permission_level": {
+ "name": "permission_level",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'view'"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_snippet_access_user_id": {
+ "name": "idx_snippet_access_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ },
+ "idx_snippet_access_snippet_id": {
+ "name": "idx_snippet_access_snippet_id",
+ "columns": [
+ "snippet_id"
+ ],
+ "isUnique": false
+ },
+ "idx_snippet_access_role_id": {
+ "name": "idx_snippet_access_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "snippet_access_snippet_id_snippets_id_fk": {
+ "name": "snippet_access_snippet_id_snippets_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "snippets",
+ "columnsFrom": [
+ "snippet_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_user_id_users_id_fk": {
+ "name": "snippet_access_user_id_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_role_id_roles_id_fk": {
+ "name": "snippet_access_role_id_roles_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "snippet_access_granted_by_users_id_fk": {
+ "name": "snippet_access_granted_by_users_id_fk",
+ "tableFrom": "snippet_access",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippet_folders": {
+ "name": "snippet_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "snippet_folders_sync_id_unique": {
+ "name": "snippet_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "snippet_folders_user_id_users_id_fk": {
+ "name": "snippet_folders_user_id_users_id_fk",
+ "tableFrom": "snippet_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "snippets": {
+ "name": "snippets",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "content": {
+ "name": "content",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "order": {
+ "name": "order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "host_filter": {
+ "name": "host_filter",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "is_note": {
+ "name": "is_note",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {
+ "snippets_sync_id_unique": {
+ "name": "snippets_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_snippets_user_id": {
+ "name": "idx_snippets_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "snippets_user_id_users_id_fk": {
+ "name": "snippets_user_id_users_id_fk",
+ "tableFrom": "snippets",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credential_usage": {
+ "name": "ssh_credential_usage",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "used_at": {
+ "name": "used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_ssh_credential_usage_credential": {
+ "name": "idx_ssh_credential_usage_credential",
+ "columns": [
+ "credential_id"
+ ],
+ "isUnique": false
+ },
+ "idx_ssh_credential_usage_user": {
+ "name": "idx_ssh_credential_usage_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_host_id_ssh_data_id_fk": {
+ "name": "ssh_credential_usage_host_id_ssh_data_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_credential_usage_user_id_users_id_fk": {
+ "name": "ssh_credential_usage_user_id_users_id_fk",
+ "tableFrom": "ssh_credential_usage",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_credentials": {
+ "name": "ssh_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin": {
+ "name": "pin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "auth_type": {
+ "name": "auth_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "password": {
+ "name": "password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key": {
+ "name": "key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(16384)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_password": {
+ "name": "key_password",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "detected_key_type": {
+ "name": "detected_key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "cert_public_key": {
+ "name": "cert_public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "usage_count": {
+ "name": "usage_count",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_credentials_sync_id_unique": {
+ "name": "ssh_credentials_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_ssh_credentials_user_id": {
+ "name": "idx_ssh_credentials_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_credentials_user_id_users_id_fk": {
+ "name": "ssh_credentials_user_id_users_id_fk",
+ "tableFrom": "ssh_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ssh_folders": {
+ "name": "ssh_folders",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sort_order": {
+ "name": "sort_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "ssh_folders_sync_id_unique": {
+ "name": "ssh_folders_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_ssh_folders_user_id": {
+ "name": "idx_ssh_folders_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "ssh_folders_user_id_users_id_fk": {
+ "name": "ssh_folders_user_id_users_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "ssh_folders_credential_id_ssh_credentials_id_fk": {
+ "name": "ssh_folders_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "ssh_folders",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sso_providers": {
+ "name": "sso_providers",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "type": {
+ "name": "type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "display_order": {
+ "name": "display_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "config": {
+ "name": "config",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "sync_tombstones": {
+ "name": "sync_tombstones",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "entity_type": {
+ "name": "entity_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "deleted_at": {
+ "name": "deleted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "sync_tombstones_user_id_users_id_fk": {
+ "name": "sync_tombstones_user_id_users_id_fk",
+ "tableFrom": "sync_tombstones",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identities": {
+ "name": "termix_identities",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "handle": {
+ "name": "handle",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identities_user_id_unique": {
+ "name": "termix_identities_user_id_unique",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": true
+ },
+ "termix_identities_handle_unique": {
+ "name": "termix_identities_handle_unique",
+ "columns": [
+ "handle"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identities_user_id_users_id_fk": {
+ "name": "termix_identities_user_id_users_id_fk",
+ "tableFrom": "termix_identities",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_ca": {
+ "name": "termix_identity_ca",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(4096)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "validity_days": {
+ "name": "validity_days",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 90
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "termix_identity_ca_identity_id_unique": {
+ "name": "termix_identity_ca_identity_id_unique",
+ "columns": [
+ "identity_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "termix_identity_ca_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_ca_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_ca_user_id_users_id_fk": {
+ "name": "termix_identity_ca_user_id_users_id_fk",
+ "tableFrom": "termix_identity_ca",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "termix_identity_keys": {
+ "name": "termix_identity_keys",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "identity_id": {
+ "name": "identity_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "algorithm": {
+ "name": "algorithm",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "comment": {
+ "name": "comment",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "source": {
+ "name": "source",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "enabled": {
+ "name": "enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": true
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "termix_identity_keys_identity_id_termix_identities_id_fk": {
+ "name": "termix_identity_keys_identity_id_termix_identities_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "termix_identities",
+ "columnsFrom": [
+ "identity_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_user_id_users_id_fk": {
+ "name": "termix_identity_keys_user_id_users_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "termix_identity_keys_credential_id_ssh_credentials_id_fk": {
+ "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
+ "tableFrom": "termix_identity_keys",
+ "tableTo": "ssh_credentials",
+ "columnsFrom": [
+ "credential_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "tmux_session_tags": {
+ "name": "tmux_session_tags",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "session_name": {
+ "name": "session_name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tag": {
+ "name": "tag",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "tmux_session_tags_user_id_users_id_fk": {
+ "name": "tmux_session_tags_user_id_users_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "tmux_session_tags_host_id_ssh_data_id_fk": {
+ "name": "tmux_session_tags_host_id_ssh_data_id_fk",
+ "tableFrom": "tmux_session_tags",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "transfer_recent": {
+ "name": "transfer_recent",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "source_host_id": {
+ "name": "source_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_host_id": {
+ "name": "dest_host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path": {
+ "name": "dest_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "dest_path_label": {
+ "name": "dest_path_label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_transfer_recent_user": {
+ "name": "idx_transfer_recent_user",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "transfer_recent_user_id_users_id_fk": {
+ "name": "transfer_recent_user_id_users_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_source_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_source_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "source_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "transfer_recent_dest_host_id_ssh_data_id_fk": {
+ "name": "transfer_recent_dest_host_id_ssh_data_id_fk",
+ "tableFrom": "transfer_recent",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "dest_host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "trusted_devices": {
+ "name": "trusted_devices",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_fingerprint": {
+ "name": "device_fingerprint",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "device_info": {
+ "name": "device_info",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_trusted_devices_user_id": {
+ "name": "idx_trusted_devices_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "trusted_devices_user_id_users_id_fk": {
+ "name": "trusted_devices_user_id_users_id_fk",
+ "tableFrom": "trusted_devices",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "ui_preferences": {
+ "name": "ui_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "data": {
+ "name": "data",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "ui_preferences_user_id_users_id_fk": {
+ "name": "ui_preferences_user_id_users_id_fk",
+ "tableFrom": "ui_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_open_tabs": {
+ "name": "user_open_tabs",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_type": {
+ "name": "tab_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "host_id": {
+ "name": "host_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "label": {
+ "name": "label",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "tab_order": {
+ "name": "tab_order",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "backend_session_id": {
+ "name": "backend_session_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_open_tabs_user_id": {
+ "name": "idx_user_open_tabs_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_open_tabs_user_id_users_id_fk": {
+ "name": "user_open_tabs_user_id_users_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_open_tabs_host_id_ssh_data_id_fk": {
+ "name": "user_open_tabs_host_id_ssh_data_id_fk",
+ "tableFrom": "user_open_tabs",
+ "tableTo": "ssh_data",
+ "columnsFrom": [
+ "host_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_preferences": {
+ "name": "user_preferences",
+ "columns": {
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "reopen_tabs_on_login": {
+ "name": "reopen_tabs_on_login",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "theme": {
+ "name": "theme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "font_size": {
+ "name": "font_size",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "accent_color": {
+ "name": "accent_color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "language": {
+ "name": "language",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "storage_mode": {
+ "name": "storage_mode",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_autocomplete": {
+ "name": "command_autocomplete",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "command_palette_enabled": {
+ "name": "command_palette_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "show_host_tags": {
+ "name": "show_host_tags",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "host_tray_on_click": {
+ "name": "host_tray_on_click",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "pin_app_rail": {
+ "name": "pin_app_rail",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "expand_app_rail_on_hover": {
+ "name": "expand_app_rail_on_hover",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folders_collapsed": {
+ "name": "folders_collapsed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_snippet_execution": {
+ "name": "confirm_snippet_execution",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "disable_update_check": {
+ "name": "disable_update_check",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "confirm_tab_close": {
+ "name": "confirm_tab_close",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "hidden_rail_tabs": {
+ "name": "hidden_rail_tabs",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ai_assistant_enabled": {
+ "name": "ai_assistant_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ai_read_only_commands": {
+ "name": "ai_read_only_commands",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "compact_host_view": {
+ "name": "compact_host_view",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "status_color_scheme": {
+ "name": "status_color_scheme",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_themes": {
+ "name": "custom_themes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "custom_keybindings": {
+ "name": "custom_keybindings",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_defaults": {
+ "name": "terminal_defaults",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "rdp_defaults": {
+ "name": "rdp_defaults",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "terminal_macros": {
+ "name": "terminal_macros",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "user_preferences_user_id_users_id_fk": {
+ "name": "user_preferences_user_id_users_id_fk",
+ "tableFrom": "user_preferences",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_roles": {
+ "name": "user_roles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "role_id": {
+ "name": "role_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "granted_by": {
+ "name": "granted_by",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "granted_at": {
+ "name": "granted_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "idx_user_roles_user_role": {
+ "name": "idx_user_roles_user_role",
+ "columns": [
+ "user_id",
+ "role_id"
+ ],
+ "isUnique": true
+ },
+ "idx_user_roles_role_id": {
+ "name": "idx_user_roles_role_id",
+ "columns": [
+ "role_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_roles_user_id_users_id_fk": {
+ "name": "user_roles_user_id_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_role_id_roles_id_fk": {
+ "name": "user_roles_role_id_roles_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "roles",
+ "columnsFrom": [
+ "role_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "user_roles_granted_by_users_id_fk": {
+ "name": "user_roles_granted_by_users_id_fk",
+ "tableFrom": "user_roles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "granted_by"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "set null",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "user_workspaces": {
+ "name": "user_workspaces",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "color": {
+ "name": "color",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "icon": {
+ "name": "icon",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "kind": {
+ "name": "kind",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'manual'"
+ },
+ "is_default": {
+ "name": "is_default",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "payload": {
+ "name": "payload",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'{}'"
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "user_workspaces_sync_id_unique": {
+ "name": "user_workspaces_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ },
+ "idx_user_workspaces_user_id": {
+ "name": "idx_user_workspaces_user_id",
+ "columns": [
+ "user_id"
+ ],
+ "isUnique": false
+ }
+ },
+ "foreignKeys": {
+ "user_workspaces_user_id_users_id_fk": {
+ "name": "user_workspaces_user_id_users_id_fk",
+ "tableFrom": "user_workspaces",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "users": {
+ "name": "users",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "username": {
+ "name": "username",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "password_hash": {
+ "name": "password_hash",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "is_admin": {
+ "name": "is_admin",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "is_oidc": {
+ "name": "is_oidc",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "oidc_identifier": {
+ "name": "oidc_identifier",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "sso_provider_id": {
+ "name": "sso_provider_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_id": {
+ "name": "client_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "client_secret": {
+ "name": "client_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "issuer_url": {
+ "name": "issuer_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "authorization_url": {
+ "name": "authorization_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "token_url": {
+ "name": "token_url",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "identifier_path": {
+ "name": "identifier_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "name_path": {
+ "name": "name_path",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "scopes": {
+ "name": "scopes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false,
+ "default": "'openid email profile'"
+ },
+ "totp_secret": {
+ "name": "totp_secret",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "totp_enabled": {
+ "name": "totp_enabled",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "totp_backup_codes": {
+ "name": "totp_backup_codes",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "registered_at": {
+ "name": "registered_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "donation_modal_dismissed": {
+ "name": "donation_modal_dismissed",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {},
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_profiles": {
+ "name": "vault_profiles",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "description": {
+ "name": "description",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "folder": {
+ "name": "folder",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "tags": {
+ "name": "tags",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "vault_addr": {
+ "name": "vault_addr",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "vault_namespace": {
+ "name": "vault_namespace",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_mount": {
+ "name": "oidc_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "oidc_role": {
+ "name": "oidc_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_mount": {
+ "name": "ssh_mount",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "ssh_role": {
+ "name": "ssh_role",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "valid_principals": {
+ "name": "valid_principals",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "key_type": {
+ "name": "key_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "shared": {
+ "name": "shared",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "sync_id": {
+ "name": "sync_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "updated_at": {
+ "name": "updated_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ }
+ },
+ "indexes": {
+ "vault_profiles_sync_id_unique": {
+ "name": "vault_profiles_sync_id_unique",
+ "columns": [
+ "sync_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_profiles_user_id_users_id_fk": {
+ "name": "vault_profiles_user_id_users_id_fk",
+ "tableFrom": "vault_profiles",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "vault_tokens": {
+ "name": "vault_tokens",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "integer",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": true
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "profile_id": {
+ "name": "profile_id",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "ssh_cert": {
+ "name": "ssh_cert",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "private_key": {
+ "name": "private_key",
+ "type": "text(8192)",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "expires_at": {
+ "name": "expires_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "last_used": {
+ "name": "last_used",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {
+ "idx_vault_tokens_user_profile": {
+ "name": "idx_vault_tokens_user_profile",
+ "columns": [
+ "user_id",
+ "profile_id"
+ ],
+ "isUnique": true
+ }
+ },
+ "foreignKeys": {
+ "vault_tokens_user_id_users_id_fk": {
+ "name": "vault_tokens_user_id_users_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ },
+ "vault_tokens_profile_id_vault_profiles_id_fk": {
+ "name": "vault_tokens_profile_id_vault_profiles_id_fk",
+ "tableFrom": "vault_tokens",
+ "tableTo": "vault_profiles",
+ "columnsFrom": [
+ "profile_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ },
+ "webauthn_credentials": {
+ "name": "webauthn_credentials",
+ "columns": {
+ "id": {
+ "name": "id",
+ "type": "text",
+ "primaryKey": true,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "user_id": {
+ "name": "user_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "name": {
+ "name": "name",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "credential_id": {
+ "name": "credential_id",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "public_key": {
+ "name": "public_key",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false
+ },
+ "counter": {
+ "name": "counter",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": 0
+ },
+ "device_type": {
+ "name": "device_type",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "backed_up": {
+ "name": "backed_up",
+ "type": "integer",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": false
+ },
+ "transports": {
+ "name": "transports",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ },
+ "user_verification": {
+ "name": "user_verification",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "'preferred'"
+ },
+ "created_at": {
+ "name": "created_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": true,
+ "autoincrement": false,
+ "default": "CURRENT_TIMESTAMP"
+ },
+ "last_used_at": {
+ "name": "last_used_at",
+ "type": "text",
+ "primaryKey": false,
+ "notNull": false,
+ "autoincrement": false
+ }
+ },
+ "indexes": {},
+ "foreignKeys": {
+ "webauthn_credentials_user_id_users_id_fk": {
+ "name": "webauthn_credentials_user_id_users_id_fk",
+ "tableFrom": "webauthn_credentials",
+ "tableTo": "users",
+ "columnsFrom": [
+ "user_id"
+ ],
+ "columnsTo": [
+ "id"
+ ],
+ "onDelete": "cascade",
+ "onUpdate": "no action"
+ }
+ },
+ "compositePrimaryKeys": {},
+ "uniqueConstraints": {},
+ "checkConstraints": {}
+ }
+ },
+ "views": {},
+ "enums": {},
+ "_meta": {
+ "schemas": {},
+ "tables": {},
+ "columns": {}
+ },
+ "internal": {
+ "indexes": {}
+ }
+}
\ No newline at end of file
diff --git a/drizzle/sqlite/meta/_journal.json b/drizzle/sqlite/meta/_journal.json
new file mode 100644
index 0000000..5839e4e
--- /dev/null
+++ b/drizzle/sqlite/meta/_journal.json
@@ -0,0 +1,83 @@
+{
+ "version": "7",
+ "dialect": "sqlite",
+ "entries": [
+ {
+ "idx": 0,
+ "version": "6",
+ "when": 1786147354086,
+ "tag": "0000_stormy_veda",
+ "breakpoints": true
+ },
+ {
+ "idx": 1,
+ "version": "6",
+ "when": 1786423594573,
+ "tag": "0001_colorful_the_call",
+ "breakpoints": true
+ },
+ {
+ "idx": 2,
+ "version": "6",
+ "when": 1786428073489,
+ "tag": "0002_woozy_turbo",
+ "breakpoints": true
+ },
+ {
+ "idx": 3,
+ "version": "6",
+ "when": 1786482020500,
+ "tag": "0003_premium_ultimates",
+ "breakpoints": true
+ },
+ {
+ "idx": 4,
+ "version": "6",
+ "when": 1786493047099,
+ "tag": "0004_cool_zuras",
+ "breakpoints": true
+ },
+ {
+ "idx": 5,
+ "version": "6",
+ "when": 1786498679199,
+ "tag": "0005_thin_sentry",
+ "breakpoints": true
+ },
+ {
+ "idx": 6,
+ "version": "6",
+ "when": 1786515116491,
+ "tag": "0006_nebulous_demogoblin",
+ "breakpoints": true
+ },
+ {
+ "idx": 7,
+ "version": "6",
+ "when": 1786519423219,
+ "tag": "0007_complex_nebula",
+ "breakpoints": true
+ },
+ {
+ "idx": 8,
+ "version": "6",
+ "when": 1786598521514,
+ "tag": "0008_fast_imperial_guard",
+ "breakpoints": true
+ },
+ {
+ "idx": 9,
+ "version": "6",
+ "when": 1786737720988,
+ "tag": "0009_pink_susan_delgado",
+ "breakpoints": true
+ },
+ {
+ "idx": 10,
+ "version": "6",
+ "when": 1786757019248,
+ "tag": "0010_mean_queen_noir",
+ "breakpoints": true
+ }
+ ]
+}
\ No newline at end of file
diff --git a/electron-builder.json b/electron-builder.json
index 1386153..9ee5beb 100644
--- a/electron-builder.json
+++ b/electron-builder.json
@@ -122,8 +122,8 @@
"type": "distribution",
"minimumSystemVersion": "10.15",
"mergeASARs": false,
- "singleArchFiles": "**/*.{node,bare}",
- "x64ArchFiles": "**/*.{node,bare}"
+ "singleArchFiles": "**/*.{node,bare,dylib}",
+ "x64ArchFiles": "**/{*.{node,bare,dylib},node-pty/prebuilds/*/spawn-helper}"
},
"dmg": {
"artifactName": "termix_macos_${arch}_dmg.${ext}",
diff --git a/electron/app-quit.cjs b/electron/app-quit.cjs
new file mode 100644
index 0000000..18933b1
--- /dev/null
+++ b/electron/app-quit.cjs
@@ -0,0 +1,6 @@
+function quitApp(app, window) {
+ window?.destroy();
+ app.quit();
+}
+
+module.exports = { quitApp };
diff --git a/electron/backend-paths.cjs b/electron/backend-paths.cjs
new file mode 100644
index 0000000..b99791a
--- /dev/null
+++ b/electron/backend-paths.cjs
@@ -0,0 +1,8 @@
+function getUnpackedAppRoot(appRoot) {
+ return appRoot.replace(
+ /app(-[a-z0-9]+)?\.asar(?!\.unpacked)/,
+ "app$1.asar.unpacked",
+ );
+}
+
+module.exports = { getUnpackedAppRoot };
diff --git a/electron/keyboard-shortcuts.cjs b/electron/keyboard-shortcuts.cjs
new file mode 100644
index 0000000..5c3a516
--- /dev/null
+++ b/electron/keyboard-shortcuts.cjs
@@ -0,0 +1,12 @@
+function isCloseActiveTabInput(input) {
+ return (
+ input.type === "keyDown" &&
+ input.control === true &&
+ input.alt !== true &&
+ input.shift !== true &&
+ input.meta !== true &&
+ input.key.toLowerCase() === "w"
+ );
+}
+
+module.exports = { isCloseActiveTabInput };
diff --git a/electron/linux-password-store.cjs b/electron/linux-password-store.cjs
new file mode 100644
index 0000000..eb8cfbf
--- /dev/null
+++ b/electron/linux-password-store.cjs
@@ -0,0 +1,42 @@
+// Chromium derives safeStorage's backend from the running desktop and falls back
+// to the "basic_text" store for anything it has no mapping for, which is every
+// wlroots-style compositor (Hyprland, sway, niri, river, ...).
+// safeStorage.isEncryptionAvailable() reports false for that store, so every
+// credential the desktop app persists through it -- the remote sync JWT, the
+// Electron auth cookie -- is refused at the point of writing. The refusal is
+// invisible from the outside: the user signs in, nothing is stored, and the next
+// sync tick reports the session as expired rather than as never saved.
+//
+// Those desktops still run an ordinary Secret Service (gnome-keyring, KWallet's
+// compatibility service, KeePassXC, ...), so naming the libsecret backend is
+// enough to make encryption available again. Desktops whose auto-detection
+// already resolves to KWallet keep it, and an explicit --password-store from the
+// user always wins.
+//
+// Moving a machine off "basic_text" cannot orphan stored secrets: nothing was
+// ever written there, because isEncryptionAvailable() gated every write.
+const KWALLET_DESKTOPS = /\b(kde|plasma|lxqt)\b/i;
+const LIBSECRET_STORE = "gnome-libsecret";
+
+/**
+ * Picks safeStorage's backend on Linux, and returns the store it selected (or
+ * null when auto-detection was left to decide).
+ *
+ * Must run before the app is ready: Chromium reads the switch when the store is
+ * first opened, and appending it afterwards has no effect.
+ */
+function selectLinuxPasswordStore(commandLine, env) {
+ if (commandLine.hasSwitch("password-store")) {
+ return null;
+ }
+
+ const desktop = `${env.XDG_CURRENT_DESKTOP || ""}:${env.DESKTOP_SESSION || ""}`;
+ if (KWALLET_DESKTOPS.test(desktop)) {
+ return null;
+ }
+
+ commandLine.appendSwitch("password-store", LIBSECRET_STORE);
+ return LIBSECRET_STORE;
+}
+
+module.exports = { selectLinuxPasswordStore };
diff --git a/electron/main.cjs b/electron/main.cjs
index 1396320..651723b 100644
--- a/electron/main.cjs
+++ b/electron/main.cjs
@@ -12,14 +12,78 @@ const {
nativeImage,
} = require("electron");
const path = require("path");
+const { getUnpackedAppRoot } = require("./backend-paths.cjs");
const fs = require("fs");
const os = require("os");
const https = require("https");
const http = require("http");
const net = require("net");
+const tls = require("tls");
+const zlib = require("zlib");
+const crypto = require("crypto");
const { URL } = require("url");
const { fork, spawn } = require("child_process");
+const pty = require("node-pty");
const WebSocket = require("ws");
+const remoteSync = require("./remote-sync.cjs");
+const { launchNativeRdp } = require("./native-rdp.cjs");
+const { isCloseActiveTabInput } = require("./keyboard-shortcuts.cjs");
+const { quitApp } = require("./app-quit.cjs");
+const { selectLinuxPasswordStore } = require("./linux-password-store.cjs");
+
+const localTerminalSessions = new Map();
+
+function localShell() {
+ if (process.platform === "win32") {
+ return {
+ file: process.env.TERMIX_LOCAL_SHELL || "powershell.exe",
+ args: ["-NoLogo"],
+ };
+ }
+ return {
+ file:
+ process.env.TERMIX_LOCAL_SHELL ||
+ process.env.SHELL ||
+ (process.platform === "darwin" ? "/bin/zsh" : "/bin/bash"),
+ args: ["-l"],
+ };
+}
+
+function ownedLocalTerminal(event, sessionId) {
+ if (typeof sessionId !== "string" || !/^[a-f0-9-]{36}$/.test(sessionId)) {
+ return null;
+ }
+ const session = localTerminalSessions.get(sessionId);
+ return session?.ownerId === event.sender.id ? session : null;
+}
+
+function closeLocalTerminalsFor(ownerId) {
+ for (const [sessionId, session] of localTerminalSessions) {
+ if (session.ownerId !== ownerId) continue;
+ session.process.kill();
+ localTerminalSessions.delete(sessionId);
+ }
+}
+
+// The main process's Node.js networking (the `https`/`http` modules used by
+// httpFetch below, and the global `fetch` used by remote-sync.cjs) only
+// trusts Node's bundled Mozilla CA list by default, not the OS/system trust
+// store. Chromium (the renderer, i.e. the web app and the login iframe) uses
+// the OS trust store instead, so a certificate that's valid in-browser --
+// e.g. one issued by a reverse proxy's internal/corporate CA, or a system
+// CA installed via Keychain/certmgr -- can still fail main-process requests
+// with UNABLE_TO_VERIFY_LEAF_SIGNATURE. Merge the system store in so remote
+// sync and the connection health check see the same trust as the browser.
+try {
+ if (typeof tls.setDefaultCACertificates === "function") {
+ tls.setDefaultCACertificates([
+ ...tls.getCACertificates("default"),
+ ...tls.getCACertificates("system"),
+ ]);
+ }
+} catch (error) {
+ console.error("Failed to merge system CA certificates:", error);
+}
// Portable mode: if a `.portable` marker exists next to the executable,
// store all data in a `data` folder beside the exe instead of %APPDATA%.
@@ -441,7 +505,10 @@ function isInvalidCertificateAllowedForUrl(url) {
// fall through
}
- const config = getServerConfigSync();
+ // The only remaining "connected remote server" a self-signed/invalid
+ // certificate could legitimately apply to is the Remote Sync server
+ // (also used for C2S tunnel relaying, see getC2SRelayUrl).
+ const config = remoteSync.getRemoteSyncConfig();
if (!config?.allowInvalidCertificate || !config?.serverUrl) return false;
return getOrigin(url) === getOrigin(config.serverUrl);
@@ -474,9 +541,31 @@ function httpFetch(url, options = {}) {
};
const req = client.request(url, requestOptions, (res) => {
- let data = "";
- res.on("data", (chunk) => (data += chunk));
- res.on("end", () => {
+ const chunks = [];
+ // Reverse proxies (nginx and friends) commonly gzip/deflate/br-compress
+ // responses regardless of client Accept-Encoding. Unlike browser fetch,
+ // Node's http/https modules never auto-decompress, so an unhandled
+ // content-encoding here silently turns the body into garbage bytes.
+ let stream = res;
+ const encoding = (res.headers["content-encoding"] || "")
+ .toLowerCase()
+ .trim();
+ try {
+ if (encoding === "gzip" || encoding === "x-gzip") {
+ stream = res.pipe(zlib.createGunzip());
+ } else if (encoding === "br") {
+ stream = res.pipe(zlib.createBrotliDecompress());
+ } else if (encoding === "deflate") {
+ stream = res.pipe(zlib.createInflate());
+ }
+ } catch (decompressError) {
+ reject(decompressError);
+ return;
+ }
+
+ stream.on("data", (chunk) => chunks.push(chunk));
+ stream.on("end", () => {
+ const data = Buffer.concat(chunks).toString("utf8");
resolve({
ok: res.statusCode >= 200 && res.statusCode < 300,
status: res.statusCode,
@@ -484,6 +573,7 @@ function httpFetch(url, options = {}) {
json: () => Promise.resolve(JSON.parse(data)),
});
});
+ stream.on("error", reject);
});
req.on("error", reject);
@@ -508,6 +598,13 @@ if (process.platform === "linux") {
// Chromium's hit-testing uses unscaled coords while the compositor scales visually,
// so forcing scale factor 1 keeps them in sync. See: https://github.com/brave/brave-browser/issues/50028
app.commandLine.appendSwitch("--force-device-scale-factor", "1");
+
+ const passwordStore = selectLinuxPasswordStore(app.commandLine, process.env);
+ if (passwordStore) {
+ logToFile(
+ `[safeStorage] Selected the ${passwordStore} password store for this desktop.`,
+ );
+ }
}
if (process.platform === "win32") {
@@ -796,10 +893,7 @@ function getBackendPaths() {
// fork() does not go through Electron's asar redirector โ use the unpacked path.
// On macOS multi-arch builds (mergeASARs: false), electron-builder names the ASAR
// app-arm64.asar / app-x64.asar instead of app.asar, so match all variants.
- const unpackedRoot = appRoot.replace(
- /app(-[a-z0-9]+)?\.asar(?!\.unpacked)/,
- "app.asar.unpacked",
- );
+ const unpackedRoot = getUnpackedAppRoot(appRoot);
const backendDir = path.join(unpackedRoot, "dist", "backend", "backend");
return {
entryPath: path.join(backendDir, "starter.js"),
@@ -816,7 +910,62 @@ function getBackendDataDir() {
return dataDir;
}
+function getBackendPidFilePath() {
+ return path.join(app.getPath("userData"), "backend.pid");
+}
+
+// If the app was previously killed abnormally (crash, force-quit, Task
+// Manager) rather than through the normal quit flow, will-quit never fires
+// and stopBackendServer() never runs -- the forked backend child is a
+// genuinely separate OS process on Windows/mac/Linux, so it keeps running
+// and holding every port the backend binds (30001, 30003-30008, 30010,
+// 30012...). Every subsequent launch's own backend then fails outright
+// with EADDRINUSE and the app is stuck until something manually kills the
+// orphan. Reap any such leftover process, identified by PID file, before
+// spawning a new one.
+function reapOrphanedBackendProcess() {
+ const pidFilePath = getBackendPidFilePath();
+ let recordedPid;
+ try {
+ recordedPid = parseInt(fs.readFileSync(pidFilePath, "utf8").trim(), 10);
+ } catch {
+ return;
+ }
+ if (!Number.isInteger(recordedPid) || recordedPid <= 0) return;
+
+ try {
+ // Signal 0 does not kill the process -- it only checks whether a
+ // process with this PID exists and is signalable, throwing ESRCH if
+ // not. This avoids killing an unrelated process that happens to have
+ // reused the same PID since the last run.
+ process.kill(recordedPid, 0);
+ } catch {
+ // No live process at that PID; nothing to reap.
+ try {
+ fs.unlinkSync(pidFilePath);
+ } catch {
+ // already absent
+ }
+ return;
+ }
+
+ logToFile(
+ `Found orphaned backend process from a previous session (pid ${recordedPid}), terminating it before starting a new one`,
+ );
+ try {
+ process.kill(recordedPid, "SIGKILL");
+ } catch {
+ // already gone
+ }
+ try {
+ fs.unlinkSync(pidFilePath);
+ } catch {
+ // already absent
+ }
+}
+
function startBackendServer() {
+ reapOrphanedBackendProcess();
return new Promise((resolve) => {
const { entryPath, backendCwd } = getBackendPaths();
@@ -852,11 +1001,17 @@ function startBackendServer() {
NODE_ENV: "production",
ELECTRON_EMBEDDED: "true",
PORT: "30001",
+ VERSION: app.getVersion(),
},
stdio: ["pipe", "pipe", "pipe", "ipc"],
});
logToFile("Backend process spawned, pid:", backendProcess.pid);
+ try {
+ fs.writeFileSync(getBackendPidFilePath(), String(backendProcess.pid));
+ } catch {
+ // Non-fatal: only means a future crash won't self-heal via reap.
+ }
let resolved = false;
const readyTimeout = setTimeout(() => {
@@ -888,6 +1043,7 @@ function startBackendServer() {
backendStartFailed = true;
}
backendProcess = null;
+ clearBackendPidFile();
if (!resolved) {
resolved = true;
clearTimeout(readyTimeout);
@@ -907,6 +1063,14 @@ function startBackendServer() {
});
}
+function clearBackendPidFile() {
+ try {
+ fs.unlinkSync(getBackendPidFilePath());
+ } catch {
+ // already absent
+ }
+}
+
function stopBackendServer() {
if (!backendProcess) return;
@@ -929,6 +1093,7 @@ function stopBackendServer() {
backendProcess.on("exit", () => {
clearTimeout(forceKillTimeout);
backendProcess = null;
+ clearBackendPidFile();
});
}
@@ -991,7 +1156,7 @@ function createTray() {
label: "Quit",
click: () => {
isQuitting = true;
- app.quit();
+ quitApp(app, mainWindow);
},
},
]);
@@ -1070,6 +1235,13 @@ function createWindow() {
const customUserAgent = `Termix-Desktop/${appVersion} (${platform}; Electron/${electronVersion})`;
mainWindow.webContents.setUserAgent(customUserAgent);
+ mainWindow.webContents.on("before-input-event", (event, input) => {
+ if (process.platform !== "win32" || !isCloseActiveTabInput(input)) return;
+
+ event.preventDefault();
+ mainWindow.webContents.send("close-active-tab");
+ });
+
mainWindow.webContents.session.webRequest.onBeforeSendHeaders(
(details, callback) => {
details.requestHeaders["X-Electron-App"] = "true";
@@ -1331,11 +1503,14 @@ ipcMain.handle("get-platform", () => {
return process.platform;
});
+ipcMain.handle("open-native-rdp", (_event, options) =>
+ launchNativeRdp(options),
+);
+
ipcMain.handle("get-embedded-server-status", () => {
return {
running:
backendProcess !== null && !backendProcess.killed && !backendStartFailed,
- embedded: !isDev,
dataDir: isDev ? null : getBackendDataDir(),
};
});
@@ -1442,6 +1617,84 @@ ipcMain.handle("save-server-config", (event, config) => {
}
});
+// --- Remote sync (optional desktop <-> self-hosted server sync) ---
+
+// Surfaces the pre-standalone-rework server-config.json (if a serverUrl was
+// ever set in it) so the renderer can prompt upgraded installs to set up
+// Remote Sync -- their hosts live on that old server and won't appear
+// locally until sync is enabled. A fresh install never had this file, so
+// this is naturally false for anyone who never used the old architecture.
+ipcMain.handle("get-legacy-server-config", () => {
+ const config = getServerConfigSync();
+ return { serverUrl: config?.serverUrl || null };
+});
+
+ipcMain.handle("get-desktop-settings", () => {
+ return remoteSync.getDesktopSettings();
+});
+
+ipcMain.handle("save-desktop-settings", (_event, settings) => {
+ return remoteSync.saveDesktopSettings(settings);
+});
+
+ipcMain.handle("get-remote-sync-config", () => {
+ return remoteSync.getRemoteSyncConfig();
+});
+
+ipcMain.handle("save-remote-sync-config", (_event, config) => {
+ return remoteSync.saveRemoteSyncConfig(config);
+});
+
+ipcMain.handle("clear-remote-sync-config", async () => {
+ const result = remoteSync.clearRemoteSyncConfig();
+ remoteSync.clearRemoteSyncJwt();
+ remoteSync.getRemoteSyncEngine()?.updateStatus({
+ connected: false,
+ syncing: false,
+ needsReauth: false,
+ lastError: null,
+ });
+ return result;
+});
+
+ipcMain.handle("save-remote-sync-jwt", (_event, token) => {
+ const result = remoteSync.saveRemoteSyncJwt(token);
+ if (result.success) {
+ remoteSync.getRemoteSyncEngine()?.updateStatus({
+ connected: true,
+ needsReauth: false,
+ lastError: null,
+ });
+ remoteSync.getRemoteSyncEngine()?.syncNow();
+ }
+ return result;
+});
+
+ipcMain.handle("get-remote-sync-jwt", () => {
+ return remoteSync.getRemoteSyncJwt();
+});
+
+ipcMain.handle("clear-remote-sync-jwt", () => {
+ return remoteSync.clearRemoteSyncJwt();
+});
+
+ipcMain.handle("get-remote-sync-status", () => {
+ return remoteSync.getRemoteSyncEngine()?.status || null;
+});
+
+ipcMain.handle("get-remote-sync-user-info", () => {
+ return remoteSync.getRemoteSyncUserInfo();
+});
+
+ipcMain.handle("remote-sync-now", async () => {
+ return (await remoteSync.getRemoteSyncEngine()?.syncNow()) || null;
+});
+
+ipcMain.handle("notify-local-login", (_event, token) => {
+ remoteSync.getRemoteSyncEngine()?.setLocalJwt(token);
+ return { success: true };
+});
+
function getC2STunnelConfigPath() {
return path.join(app.getPath("userData"), "c2s-tunnels.json");
}
@@ -1577,36 +1830,33 @@ const C2S_WS_HIGH_WATERMARK = 1024 * 1024;
const C2S_WS_LOW_WATERMARK = 256 * 1024;
const C2S_STREAM_WRITE_LIMIT = 8 * 1024 * 1024;
+// C2S (client-to-server) tunnels relay through a connected, self-hosted
+// Termix server -- the same "remote server" concept Remote Sync connects
+// to, not the always-local embedded backend. There's no separate C2S
+// server-URL setting in the UI; it has always shared whatever remote
+// server the rest of the app was pointed at. Before the standalone-first
+// rework that was server-config.json; now it's remote-sync-config.json,
+// since that's the only remaining notion of "a connected remote server."
function getC2SRelayUrl() {
- const config = getServerConfigSync();
- const serverUrl =
- config?.serverUrl || (!isDev ? "http://127.0.0.1:30003" : null);
+ const config = remoteSync.getRemoteSyncConfig();
+ const serverUrl = config?.serverUrl;
if (!serverUrl) {
- throw new Error("No Termix server configured");
+ throw new Error(
+ "No remote Termix server connected -- enable Remote Sync first",
+ );
}
const base = serverUrl.replace(/\/$/, "");
- const relayHttpUrl = base.endsWith(":30003")
- ? `${base}/ssh/tunnel/c2s/stream`
- : `${base}/ssh/tunnel/c2s/stream`;
+ const relayHttpUrl = `${base}/ssh/tunnel/c2s/stream`;
return relayHttpUrl.replace(/^http:/, "ws:").replace(/^https:/, "wss:");
}
-async function getC2SRelayHeaders(relayUrl) {
- if (!mainWindow?.webContents?.session) return {};
-
- const cookieUrl = relayUrl
- .replace(/^ws:/, "http:")
- .replace(/^wss:/, "https:");
- const cookies = await mainWindow.webContents.session.cookies.get({
- url: cookieUrl,
- name: "jwt",
- });
- const jwt = cookies[0]?.value;
+async function getC2SRelayHeaders() {
+ const jwt = remoteSync.getRemoteSyncJwt();
if (!jwt) return {};
return {
- Cookie: `jwt=${encodeURIComponent(jwt)}`,
+ Authorization: `Bearer ${jwt}`,
};
}
@@ -1706,7 +1956,7 @@ async function openC2SRelay(
) {
const tunnelName = tunnel.name || getC2STunnelName(tunnel);
const relayUrl = getC2SRelayUrl();
- const headers = await getC2SRelayHeaders(relayUrl);
+ const headers = await getC2SRelayHeaders();
logToFile(`[c2s] opening relay for ${tunnelName}`, {
relayUrl,
targetHost,
@@ -1811,7 +2061,7 @@ async function openC2SRelay(
async function testC2SRelay(tunnel, targetHost, targetPort) {
const relayUrl = getC2SRelayUrl();
- const headers = await getC2SRelayHeaders(relayUrl);
+ const headers = await getC2SRelayHeaders();
const ws = new WebSocket(
relayUrl,
getWebSocketOptions(relayUrl, { headers }),
@@ -2090,7 +2340,7 @@ async function startC2SRemoteTunnel(tunnel, index = 0) {
}
const relayUrl = getC2SRelayUrl();
- const headers = await getC2SRelayHeaders(relayUrl);
+ const headers = await getC2SRelayHeaders();
const ws = new WebSocket(
relayUrl,
getWebSocketOptions(relayUrl, { headers }),
@@ -2346,9 +2596,39 @@ async function startC2STunnel(tunnel, index = 0) {
`[c2s] listening for ${tunnelName} on ${bindHost}:${sourcePort}`,
);
setC2STunnelStatus(tunnelName, {
- connected: true,
- status: "CONNECTED",
+ connected: false,
+ status: "CONNECTING",
+ reason: "Verifying endpoint SSH connection",
});
+
+ const verifyTunnel =
+ mode === "dynamic"
+ ? testC2SRelay(
+ { ...tunnel, name: `${tunnelName}::verify`, mode },
+ undefined,
+ undefined,
+ )
+ : testC2SRelay(
+ { ...tunnel, name: `${tunnelName}::verify`, mode },
+ tunnel.targetHost || "127.0.0.1",
+ Number(tunnel.endpointPort),
+ );
+
+ verifyTunnel.then((result) => {
+ if (!c2sTunnelRuntimes.has(tunnelName)) return;
+ if (result.success) {
+ setC2STunnelStatus(tunnelName, {
+ connected: true,
+ status: "CONNECTED",
+ });
+ } else {
+ setC2STunnelError(
+ tunnelName,
+ result.error || "Endpoint SSH connection failed",
+ );
+ }
+ });
+
resolve({ success: true, tunnelName });
});
});
@@ -2644,6 +2924,91 @@ ipcMain.handle("clipboard-write-text", (_event, text) => {
ipcMain.handle("clipboard-read-text", () => clipboard.readText());
+ipcMain.handle("local-terminal-start", (event, dimensions = {}) => {
+ const cols = Math.min(500, Math.max(2, Number(dimensions.cols) || 80));
+ const rows = Math.min(300, Math.max(1, Number(dimensions.rows) || 24));
+ const sessionId = crypto.randomUUID();
+ const shellConfig = localShell();
+ const child = pty.spawn(shellConfig.file, shellConfig.args, {
+ name: "xterm-256color",
+ cols,
+ rows,
+ cwd: os.homedir(),
+ env: {
+ ...process.env,
+ TERM: "xterm-256color",
+ COLORTERM: "truecolor",
+ },
+ });
+ const ownerId = event.sender.id;
+ const session = { ownerId, process: child, ready: false, buffered: "" };
+ localTerminalSessions.set(sessionId, session);
+ child.onData((data) => {
+ if (!session.ready) {
+ session.buffered = (session.buffered + data).slice(-1024 * 1024);
+ return;
+ }
+ if (!event.sender.isDestroyed()) {
+ event.sender.send(`local-terminal:data:${sessionId}`, data);
+ }
+ });
+ child.onExit(({ exitCode }) => {
+ localTerminalSessions.delete(sessionId);
+ if (!event.sender.isDestroyed()) {
+ event.sender.send(`local-terminal:exit:${sessionId}`, exitCode);
+ }
+ });
+ event.sender.once("destroyed", () => closeLocalTerminalsFor(ownerId));
+ return { sessionId, shell: shellConfig.file };
+});
+
+ipcMain.handle("local-terminal-ready", (event, sessionId) => {
+ const session = ownedLocalTerminal(event, sessionId);
+ if (!session) return false;
+ session.ready = true;
+ if (session.buffered && !event.sender.isDestroyed()) {
+ event.sender.send(`local-terminal:data:${sessionId}`, session.buffered);
+ session.buffered = "";
+ }
+ return true;
+});
+
+ipcMain.handle("local-terminal-write", (event, sessionId, data) => {
+ const session = ownedLocalTerminal(event, sessionId);
+ if (!session || typeof data !== "string" || data.length > 64 * 1024) {
+ return false;
+ }
+ session.process.write(data);
+ return true;
+});
+
+ipcMain.handle("local-terminal-resize", (event, sessionId, cols, rows) => {
+ const session = ownedLocalTerminal(event, sessionId);
+ const width = Number(cols);
+ const height = Number(rows);
+ if (
+ !session ||
+ !Number.isInteger(width) ||
+ !Number.isInteger(height) ||
+ width < 2 ||
+ width > 500 ||
+ height < 1 ||
+ height > 300
+ ) {
+ return false;
+ }
+ session.process.resize(width, height);
+ return true;
+});
+
+ipcMain.handle("local-terminal-close", (event, sessionId) => {
+ const session = ownedLocalTerminal(event, sessionId);
+ if (!session) return false;
+ localTerminalSessions.delete(sessionId);
+ session.process.kill();
+ return true;
+});
+
ipcMain.handle("show-save-dialog", async (_event, options) => {
return dialog.showSaveDialog(mainWindow, options || {});
});
@@ -2772,31 +3137,33 @@ ipcMain.handle("close-external-editor", (_event, editId) => {
ipcMain.handle("test-server-connection", async (event, serverUrl) => {
try {
const normalizedServerUrl = serverUrl.replace(/\/$/, "");
-
const healthUrl = `${normalizedServerUrl}/health`;
+ // This is a best-effort reachability probe, not a hard gate: a reverse
+ // proxy doing SSO in front of the real server (Pangolin, Authelia,
+ // Cloudflare Access, etc.) intercepts this unauthenticated request
+ // before it ever reaches Termix's own /health route, and returns its
+ // own login page (HTML, or a redirect) instead of {"status":"ok"}.
+ // That's a legitimate, working setup -- the login iframe shown right
+ // after this check is what actually proves the server is real, by
+ // completing an authenticated round-trip. So any response at all here
+ // (any status code, any body) means "something is there, let the user
+ // proceed"; only a network-level failure (nothing answered at all)
+ // blocks continuing.
try {
const response = await httpFetch(healthUrl, {
method: "GET",
timeout: 10000,
});
- if (response.ok) {
- const data = await response.text();
-
- if (
- data.includes("") ||
- data.includes("")
- ) {
- return {
- success: false,
- error:
- "Server returned HTML instead of JSON. This does not appear to be a Termix server.",
- };
- }
+ const data = await response.text();
+ const looksLikeHtml =
+ data.includes("") ||
+ data.includes("");
+ if (response.ok && !looksLikeHtml) {
try {
const healthData = JSON.parse(data);
if (
@@ -2816,64 +3183,27 @@ ipcMain.handle("test-server-connection", async (event, serverUrl) => {
console.log("Health endpoint did not return valid JSON");
}
}
+
+ // Reachable, but not a recognized Termix health response -- likely a
+ // proxy/SSO login page in front of the real server. Let the user
+ // proceed; the login step next will fail clearly if this really
+ // isn't a Termix server.
+ return {
+ success: true,
+ status: response.status,
+ testedUrl: healthUrl,
+ warning: looksLikeHtml
+ ? "Could not confirm this is a Termix server (the response looked like an HTML page, which can happen behind a login-protected reverse proxy). You can continue, and the next step will fail clearly if this isn't actually a Termix server."
+ : "Server responded, but not with the expected health check format. Continuing anyway.",
+ };
} catch (urlError) {
console.error("Health check failed:", urlError);
+ return {
+ success: false,
+ error:
+ "Server is not responding. Please ensure the server is running and accessible.",
+ };
}
-
- try {
- const versionUrl = `${normalizedServerUrl}/version`;
- const response = await httpFetch(versionUrl, {
- method: "GET",
- timeout: 10000,
- });
-
- if (response.ok) {
- const data = await response.text();
-
- if (
- data.includes("") ||
- data.includes("")
- ) {
- return {
- success: false,
- error:
- "Server returned HTML instead of JSON. This does not appear to be a Termix server.",
- };
- }
-
- try {
- const versionData = JSON.parse(data);
- if (
- versionData &&
- (versionData.status === "up_to_date" ||
- versionData.status === "requires_update" ||
- (versionData.localVersion &&
- versionData.version &&
- versionData.latest_release))
- ) {
- return {
- success: true,
- status: response.status,
- testedUrl: versionUrl,
- warning:
- "Health endpoint not available, but server appears to be running",
- };
- }
- } catch (parseError) {
- console.log("Version endpoint did not return valid JSON");
- }
- }
- } catch (versionError) {
- console.error("Version check failed:", versionError);
- }
-
- return {
- success: false,
- error:
- "Server is not responding or does not appear to be a valid Termix server. Please ensure the server is running and accessible.",
- };
} catch (error) {
return { success: false, error: error.message };
}
@@ -2967,6 +3297,7 @@ app.whenReady().then(async () => {
createTray();
createWindow();
+ remoteSync.initRemoteSync(() => mainWindow);
logToFile("=== Startup complete ===");
});
diff --git a/electron/native-rdp.cjs b/electron/native-rdp.cjs
new file mode 100644
index 0000000..49dd688
--- /dev/null
+++ b/electron/native-rdp.cjs
@@ -0,0 +1,85 @@
+const fs = require("fs");
+const os = require("os");
+const path = require("path");
+const { spawn } = require("child_process");
+
+function singleLine(value, maxLength = 255) {
+ return String(value ?? "")
+ .replace(/[\r\n\0]/g, "")
+ .trim()
+ .slice(0, maxLength);
+}
+
+function validateNativeRdpOptions(options) {
+ const host = singleLine(options?.host);
+ const port = Number(options?.port ?? 3389);
+ if (!host || host.length > 253 || /[\\/]/.test(host)) {
+ throw new Error("Invalid RDP host");
+ }
+ if (!Number.isInteger(port) || port < 1 || port > 65535) {
+ throw new Error("Invalid RDP port");
+ }
+ return {
+ host,
+ port,
+ username: singleLine(options?.username),
+ domain: singleLine(options?.domain),
+ };
+}
+
+function buildRdpFile(options) {
+ const { host, port, username, domain } = validateNativeRdpOptions(options);
+ const address = host.includes(":") ? `[${host}]:${port}` : `${host}:${port}`;
+ const qualifiedUsername = username
+ ? domain
+ ? `${domain}\\${username}`
+ : username
+ : "";
+ return [
+ `full address:s:${address}`,
+ "prompt for credentials:i:1",
+ "administrative session:i:0",
+ ...(qualifiedUsername ? [`username:s:${qualifiedUsername}`] : []),
+ "",
+ ].join("\r\n");
+}
+
+async function launchNativeRdp(options, platform = process.platform) {
+ if (platform !== "win32") {
+ return {
+ success: false,
+ error: "Windows Remote Desktop is only available on Windows",
+ };
+ }
+
+ const rdpContent = buildRdpFile(options);
+ const tempDir = await fs.promises.mkdtemp(
+ path.join(os.tmpdir(), "termix-rdp-"),
+ );
+ const rdpPath = path.join(tempDir, "connection.rdp");
+ await fs.promises.writeFile(rdpPath, rdpContent, {
+ encoding: "utf8",
+ mode: 0o600,
+ });
+
+ return new Promise((resolve) => {
+ const child = spawn("mstsc.exe", [rdpPath], {
+ detached: true,
+ windowsHide: true,
+ stdio: "ignore",
+ });
+ const cleanup = () =>
+ fs.promises.rm(tempDir, { recursive: true, force: true }).catch(() => {});
+ child.once("error", (error) => {
+ cleanup();
+ resolve({ success: false, error: error.message });
+ });
+ child.once("spawn", () => {
+ child.unref();
+ setTimeout(cleanup, 30_000).unref();
+ resolve({ success: true });
+ });
+ });
+}
+
+module.exports = { buildRdpFile, launchNativeRdp, validateNativeRdpOptions };
diff --git a/electron/preload.js b/electron/preload.js
index 6b9cf1c..b045cf6 100644
--- a/electron/preload.js
+++ b/electron/preload.js
@@ -2,6 +2,8 @@ const { contextBridge, ipcRenderer } = require("electron");
contextBridge.exposeInMainWorld("electronAPI", {
getAppVersion: () => ipcRenderer.invoke("get-app-version"),
+ getPlatform: () => ipcRenderer.invoke("get-platform"),
+ openNativeRdp: (options) => ipcRenderer.invoke("open-native-rdp", options),
removeAllListeners: (channel) => ipcRenderer.removeAllListeners(channel),
isElectron: true,
@@ -31,6 +33,18 @@ contextBridge.exposeInMainWorld("electronAPI", {
startC2SAutoStartTunnels: () =>
ipcRenderer.invoke("start-c2s-autostart-tunnels"),
+ onRemoteSyncStatusChanged: (callback) => {
+ const listener = (_event, status) => callback(status);
+ ipcRenderer.on("remote-sync-status-changed", listener);
+ return () =>
+ ipcRenderer.removeListener("remote-sync-status-changed", listener);
+ },
+ onCloseActiveTab: (callback) => {
+ const listener = () => callback();
+ ipcRenderer.on("close-active-tab", listener);
+ return () => ipcRenderer.removeListener("close-active-tab", listener);
+ },
+
clearSessionCookies: () => ipcRenderer.invoke("clear-session-cookies"),
getSessionCookie: (name, targetUrl) =>
ipcRenderer.invoke("get-session-cookie", name, targetUrl),
@@ -66,6 +80,29 @@ contextBridge.exposeInMainWorld("electronAPI", {
ipcRenderer.invoke("start-drag-to-desktop", dragData),
cleanupTempFile: (tempId) => ipcRenderer.invoke("cleanup-temp-file", tempId),
+ startLocalTerminal: (dimensions) =>
+ ipcRenderer.invoke("local-terminal-start", dimensions),
+ writeLocalTerminal: (sessionId, data) =>
+ ipcRenderer.invoke("local-terminal-write", sessionId, data),
+ readyLocalTerminal: (sessionId) =>
+ ipcRenderer.invoke("local-terminal-ready", sessionId),
+ resizeLocalTerminal: (sessionId, cols, rows) =>
+ ipcRenderer.invoke("local-terminal-resize", sessionId, cols, rows),
+ closeLocalTerminal: (sessionId) =>
+ ipcRenderer.invoke("local-terminal-close", sessionId),
+ onLocalTerminalData: (sessionId, callback) => {
+ const channel = `local-terminal:data:${sessionId}`;
+ const listener = (_event, data) => callback(data);
+ ipcRenderer.on(channel, listener);
+ return () => ipcRenderer.removeListener(channel, listener);
+ },
+ onLocalTerminalExit: (sessionId, callback) => {
+ const channel = `local-terminal:exit:${sessionId}`;
+ const listener = (_event, exitCode) => callback(exitCode);
+ ipcRenderer.on(channel, listener);
+ return () => ipcRenderer.removeListener(channel, listener);
+ },
+
invoke: (channel, ...args) => ipcRenderer.invoke(channel, ...args),
});
diff --git a/electron/remote-sync-entities.cjs b/electron/remote-sync-entities.cjs
new file mode 100644
index 0000000..a60ce8c
--- /dev/null
+++ b/electron/remote-sync-entities.cjs
@@ -0,0 +1,15 @@
+const SYNCED_ENTITY_TYPES = Object.freeze([
+ // Ordered by reference dependency: hosts and snippets resolve credential,
+ // vault and folder syncIds, so those have to exist on the other side first.
+ "sshCredentials",
+ "vaultProfiles",
+ "sshFolders",
+ "snippetFolders",
+ "hosts",
+ "snippets",
+ "dashboardServiceLinks",
+ "homepageItems",
+ "userPreferences",
+]);
+
+module.exports = { SYNCED_ENTITY_TYPES };
diff --git a/electron/remote-sync.cjs b/electron/remote-sync.cjs
new file mode 100644
index 0000000..507c512
--- /dev/null
+++ b/electron/remote-sync.cjs
@@ -0,0 +1,581 @@
+// Remote sync engine for the desktop app's optional connection to a
+// self-hosted Termix server. Runs entirely in the Electron main process:
+// - Holds the remote JWT (safeStorage-encrypted on disk, never exposed to
+// the renderer's localStorage) and the local embedded backend's JWT
+// (cached in memory only, handed over by the renderer at local-login
+// time via notify-local-login).
+// - On a timer, pulls + pushes each synced entity type between the
+// embedded backend (always localhost:30001) and the configured remote
+// server, reconciling by syncId with last-write-wins on updatedAt, and
+// propagating tombstones (deletions) in both directions.
+// - Pushes connection/sync status to the renderer via IPC so the Settings
+// UI and a global banner can reflect it without polling.
+
+const { app, safeStorage } = require("electron");
+const fs = require("fs");
+const path = require("path");
+const { SYNCED_ENTITY_TYPES } = require("./remote-sync-entities.cjs");
+
+const SYNC_INTERVAL_MS = 90 * 1000;
+const EMBEDDED_BASE_URL = "http://127.0.0.1:30001";
+
+function dataPath(filename) {
+ return path.join(app.getPath("userData"), filename);
+}
+
+function readJson(filePath, fallback) {
+ try {
+ if (!fs.existsSync(filePath)) return fallback;
+ return JSON.parse(fs.readFileSync(filePath, "utf8"));
+ } catch {
+ return fallback;
+ }
+}
+
+function writeJson(filePath, value) {
+ const userDataPath = app.getPath("userData");
+ if (!fs.existsSync(userDataPath)) {
+ fs.mkdirSync(userDataPath, { recursive: true });
+ }
+ fs.writeFileSync(filePath, JSON.stringify(value, null, 2));
+}
+
+function getDesktopSettingsPath() {
+ return dataPath("desktop-settings.json");
+}
+
+function getRemoteSyncConfigPath() {
+ return dataPath("remote-sync-config.json");
+}
+
+function getRemoteSyncCredentialPath() {
+ return dataPath("remote-sync-credential.json");
+}
+
+function getRemoteSyncStatePath() {
+ return dataPath("remote-sync-state.json");
+}
+
+function getDesktopSettings() {
+ return readJson(getDesktopSettingsPath(), {
+ defaultConnectionOrigin: "local",
+ migrationNoticeAcknowledged: false,
+ });
+}
+
+function saveDesktopSettings(settings) {
+ writeJson(getDesktopSettingsPath(), settings);
+ return { success: true };
+}
+
+function getRemoteSyncConfig() {
+ return readJson(getRemoteSyncConfigPath(), null);
+}
+
+function saveRemoteSyncConfig(config) {
+ writeJson(getRemoteSyncConfigPath(), config);
+ return { success: true };
+}
+
+function clearRemoteSyncConfig() {
+ try {
+ fs.unlinkSync(getRemoteSyncConfigPath());
+ } catch {
+ // already absent
+ }
+ return { success: true };
+}
+
+function getSafeStorageAvailable() {
+ try {
+ return safeStorage.isEncryptionAvailable();
+ } catch {
+ return false;
+ }
+}
+
+function saveRemoteSyncJwt(token) {
+ if (!getSafeStorageAvailable()) {
+ // Carries a stable reason alongside the message: the renderer has a
+ // translated explanation for this one, because "no OS keyring" is a
+ // machine-level problem the user has to go and fix, not something signing
+ // in again can resolve.
+ return {
+ success: false,
+ reason: "encryption_unavailable",
+ error: "Encryption unavailable on this system",
+ };
+ }
+ writeJson(getRemoteSyncCredentialPath(), {
+ encrypted: true,
+ value: safeStorage.encryptString(token).toString("base64"),
+ obtainedAt: new Date().toISOString(),
+ });
+ return { success: true };
+}
+
+function getRemoteSyncJwt() {
+ const record = readJson(getRemoteSyncCredentialPath(), null);
+ if (!record?.encrypted || !getSafeStorageAvailable()) return null;
+ try {
+ return safeStorage.decryptString(Buffer.from(record.value, "base64"));
+ } catch {
+ return null;
+ }
+}
+
+function clearRemoteSyncJwt() {
+ try {
+ fs.unlinkSync(getRemoteSyncCredentialPath());
+ } catch {
+ // already absent
+ }
+ return { success: true };
+}
+
+async function getRemoteSyncUserInfo() {
+ const config = getRemoteSyncConfig();
+ const token = getRemoteSyncJwt();
+ if (!config?.serverUrl || !token || isJwtExpiredOrExpiringSoon(token)) {
+ return null;
+ }
+
+ const baseUrl = config.serverUrl.replace(/\/$/, "");
+ const userResponse = await fetch(`${baseUrl}/users/me`, {
+ headers: { Authorization: `Bearer ${token}`, "X-Electron-App": "true" },
+ });
+ if (!userResponse.ok) return null;
+
+ const user = await userResponse.json();
+ const rolesResponse = await fetch(
+ `${baseUrl}/rbac/users/${encodeURIComponent(user.userId)}/roles`,
+ {
+ headers: { Authorization: `Bearer ${token}`, "X-Electron-App": "true" },
+ },
+ );
+ const roles = rolesResponse.ok
+ ? (await rolesResponse.json()).roles || []
+ : [];
+
+ return {
+ userId: user.userId,
+ username: user.username,
+ is_admin: !!user.is_admin,
+ is_oidc: !!user.is_oidc,
+ is_dual_auth: !!user.is_dual_auth,
+ totp_enabled: !!user.totp_enabled,
+ roles,
+ };
+}
+
+function decodeJwtExpiry(token) {
+ try {
+ const payloadB64 = token.split(".")[1];
+ const payload = JSON.parse(
+ Buffer.from(payloadB64, "base64").toString("utf8"),
+ );
+ return typeof payload.exp === "number" ? payload.exp * 1000 : null;
+ } catch {
+ return null;
+ }
+}
+
+function isJwtExpiredOrExpiringSoon(token, marginMs = 60 * 1000) {
+ const expiresAt = decodeJwtExpiry(token);
+ if (expiresAt === null) return false;
+ return Date.now() + marginMs >= expiresAt;
+}
+
+class RemoteSyncEngine {
+ constructor(getMainWindow) {
+ this.getMainWindow = getMainWindow;
+ this.localJwt = null;
+ this.timer = null;
+ this.syncing = false;
+ this.status = {
+ connected: false,
+ syncing: false,
+ lastSyncedAt: null,
+ lastError: null,
+ needsReauth: false,
+ };
+ }
+
+ setLocalJwt(token) {
+ this.localJwt = token || null;
+ }
+
+ emitStatus() {
+ const win = this.getMainWindow?.();
+ if (!win || win.isDestroyed()) return;
+ win.webContents.send("remote-sync-status-changed", this.status);
+ }
+
+ updateStatus(patch) {
+ this.status = { ...this.status, ...patch };
+ this.emitStatus();
+ }
+
+ start() {
+ const config = getRemoteSyncConfig();
+ this.status.connected = !!config?.serverUrl;
+ if (this.timer) clearInterval(this.timer);
+ this.timer = setInterval(() => this.syncNow(), SYNC_INTERVAL_MS);
+ if (config?.serverUrl) {
+ // Fire an initial sync shortly after startup rather than waiting a
+ // full interval, but don't block app boot on it.
+ setTimeout(() => this.syncNow(), 5000);
+ }
+ }
+
+ stop() {
+ if (this.timer) {
+ clearInterval(this.timer);
+ this.timer = null;
+ }
+ }
+
+ async syncNow() {
+ if (this.syncing) return this.status;
+ const config = getRemoteSyncConfig();
+ if (!config?.serverUrl) {
+ this.updateStatus({ connected: false, syncing: false });
+ return this.status;
+ }
+
+ const remoteJwt = getRemoteSyncJwt();
+ if (!remoteJwt) {
+ this.updateStatus({
+ connected: true,
+ syncing: false,
+ needsReauth: true,
+ lastError: "Not signed in to remote server",
+ });
+ return this.status;
+ }
+ if (isJwtExpiredOrExpiringSoon(remoteJwt)) {
+ this.updateStatus({
+ connected: true,
+ syncing: false,
+ needsReauth: true,
+ lastError: "Remote session expired",
+ });
+ return this.status;
+ }
+ if (!this.localJwt) {
+ // Local login hasn't handed us a token yet -- this is expected for the
+ // first tick or two right after a cold boot (renderer hasn't finished
+ // its own session check yet), but if it never arrives (e.g. a gap in
+ // whichever code path establishes the local session), sync would
+ // otherwise silently no-op forever with no visible error. Surface it
+ // as a normal, non-alarming "not synced yet" status rather than
+ // leaving lastSyncedAt/lastError untouched.
+ this.updateStatus({
+ connected: true,
+ syncing: false,
+ lastError: "Waiting for local session",
+ });
+ return this.status;
+ }
+
+ this.syncing = true;
+ this.updateStatus({ connected: true, syncing: true, lastError: null });
+
+ try {
+ const state = readJson(getRemoteSyncStatePath(), { entities: {} });
+ let sawAuthFailure = false;
+
+ for (const entityType of SYNCED_ENTITY_TYPES) {
+ const entityState = state.entities[entityType] || {
+ lastPulledAt: null,
+ lastPushedAt: null,
+ };
+
+ const result = await this.syncEntity({
+ entityType,
+ remoteBaseUrl: config.serverUrl.replace(/\/$/, ""),
+ remoteJwt,
+ since: entityState.lastPulledAt,
+ });
+
+ if (result.authFailure) {
+ sawAuthFailure = true;
+ break;
+ }
+
+ state.entities[entityType] = {
+ lastPulledAt: result.syncedAt,
+ lastPushedAt: result.syncedAt,
+ };
+ }
+
+ if (sawAuthFailure) {
+ this.updateStatus({
+ syncing: false,
+ needsReauth: true,
+ lastError: "Remote server rejected the session",
+ });
+ return this.status;
+ }
+
+ writeJson(getRemoteSyncStatePath(), state);
+ writeJson(getRemoteSyncConfigPath(), {
+ ...config,
+ lastSyncedAt: new Date().toISOString(),
+ lastSyncStatus: "ok",
+ lastSyncError: null,
+ });
+
+ this.updateStatus({
+ connected: true,
+ syncing: false,
+ needsReauth: false,
+ lastSyncedAt: new Date().toISOString(),
+ lastError: null,
+ });
+ } catch (error) {
+ const message = error instanceof Error ? error.message : String(error);
+ writeJson(getRemoteSyncConfigPath(), {
+ ...config,
+ lastSyncStatus: "error",
+ lastSyncError: message,
+ });
+ this.updateStatus({ syncing: false, lastError: message });
+ } finally {
+ this.syncing = false;
+ }
+
+ return this.status;
+ }
+
+ async fetchJson(url, token, options = {}) {
+ const res = await fetch(url, {
+ ...options,
+ headers: {
+ "Content-Type": "application/json",
+ Authorization: `Bearer ${token}`,
+ ...(options.headers || {}),
+ },
+ });
+ if (res.status === 401 || res.status === 403) {
+ const err = new Error(`Auth failed (${res.status})`);
+ err.authFailure = true;
+ throw err;
+ }
+ if (!res.ok) {
+ throw new Error(`Request failed (${res.status}): ${url}`);
+ }
+
+ const text = await res.text();
+ // A reverse-proxy SSO in front of the remote server (Pangolin, Authelia,
+ // etc.) can intercept even an authenticated, Bearer-token'd request and
+ // serve its own login page instead of forwarding to Termix -- that comes
+ // back as a normal 200 OK, so the status checks above don't catch it.
+ // This is NOT the same as needsReauth/a bad Termix JWT: sync runs as a
+ // plain server-to-server fetch() in this main process, with no browser
+ // cookie jar at all, so re-authenticating through the login iframe (which
+ // only affects the renderer's browser session) can never fix this --
+ // reconnecting would tell the user to do something that doesn't help.
+ // The proxy has to allow this traffic through some other way (an API
+ // bypass rule, a separate hostname/port that isn't proxy-gated, etc.),
+ // so this gets its own distinct, honest error rather than piggybacking
+ // on needsReauth or a raw JSON.parse crash.
+ const looksLikeHtml =
+ text.includes("") ||
+ text.includes("");
+ if (looksLikeHtml) {
+ const err = new Error(
+ "The reverse proxy in front of this server is blocking sync traffic with its own login page. Reconnecting won't fix this. The proxy needs to let Termix's API requests through (e.g. an SSO bypass rule for the sync API, or a non-proxied hostname/port for it).",
+ );
+ err.proxyBlocked = true;
+ throw err;
+ }
+
+ try {
+ return JSON.parse(text);
+ } catch {
+ throw new Error(`Server returned invalid JSON: ${url}`);
+ }
+ }
+
+ async pullSide(baseUrl, token, entityType, since) {
+ const url = `${baseUrl}/sync/${entityType}${since ? `?since=${encodeURIComponent(since)}` : ""}`;
+ const data = await this.fetchJson(url, token);
+ return data.rows || [];
+ }
+
+ /**
+ * Every syncId a side currently holds, ignoring the incremental window.
+ * Used only to decide whether a deletion still has something to delete.
+ */
+ async pullSyncIds(baseUrl, token, entityType) {
+ const rows = await this.pullSide(baseUrl, token, entityType, null);
+ return new Set(rows.filter((row) => row.syncId).map((row) => row.syncId));
+ }
+
+ async pullTombstones(baseUrl, token, entityType, since) {
+ const url = `${baseUrl}/sync/${entityType}/tombstones${since ? `?since=${encodeURIComponent(since)}` : ""}`;
+ const data = await this.fetchJson(url, token);
+ return data.tombstones || [];
+ }
+
+ async pushRow(baseUrl, token, entityType, row) {
+ await this.fetchJson(`${baseUrl}/sync/${entityType}`, token, {
+ method: "POST",
+ body: JSON.stringify({ row }),
+ });
+ }
+
+ async pushTombstone(baseUrl, token, entityType, syncId) {
+ await this.fetchJson(`${baseUrl}/sync/tombstones`, token, {
+ method: "POST",
+ body: JSON.stringify({ entityType, syncId }),
+ });
+ }
+
+ async syncEntity({ entityType, remoteBaseUrl, remoteJwt, since }) {
+ const syncedAt = new Date().toISOString();
+ try {
+ const [localRows, remoteRows, localTombstones, remoteTombstones] =
+ await Promise.all([
+ this.pullSide(EMBEDDED_BASE_URL, this.localJwt, entityType, since),
+ this.pullSide(remoteBaseUrl, remoteJwt, entityType, since),
+ this.pullTombstones(
+ EMBEDDED_BASE_URL,
+ this.localJwt,
+ entityType,
+ since,
+ ),
+ this.pullTombstones(remoteBaseUrl, remoteJwt, entityType, since),
+ ]);
+
+ const tombstonedSyncIds = new Set([
+ ...localTombstones.map((t) => t.syncId),
+ ...remoteTombstones.map((t) => t.syncId),
+ ]);
+
+ const localBySyncId = new Map(
+ localRows.filter((r) => r.syncId).map((r) => [r.syncId, r]),
+ );
+ const remoteBySyncId = new Map(
+ remoteRows.filter((r) => r.syncId).map((r) => [r.syncId, r]),
+ );
+ const allSyncIds = new Set([
+ ...localBySyncId.keys(),
+ ...remoteBySyncId.keys(),
+ ]);
+
+ for (const syncId of allSyncIds) {
+ if (tombstonedSyncIds.has(syncId)) continue;
+
+ const localRow = localBySyncId.get(syncId);
+ const remoteRow = remoteBySyncId.get(syncId);
+
+ if (localRow && !remoteRow) {
+ await this.pushRow(remoteBaseUrl, remoteJwt, entityType, localRow);
+ } else if (remoteRow && !localRow) {
+ await this.pushRow(
+ EMBEDDED_BASE_URL,
+ this.localJwt,
+ entityType,
+ remoteRow,
+ );
+ } else if (localRow && remoteRow) {
+ const localUpdatedAt = new Date(localRow.updatedAt || 0).getTime();
+ const remoteUpdatedAt = new Date(remoteRow.updatedAt || 0).getTime();
+ if (localUpdatedAt > remoteUpdatedAt) {
+ await this.pushRow(remoteBaseUrl, remoteJwt, entityType, localRow);
+ } else if (remoteUpdatedAt > localUpdatedAt) {
+ await this.pushRow(
+ EMBEDDED_BASE_URL,
+ this.localJwt,
+ entityType,
+ remoteRow,
+ );
+ }
+ }
+ }
+
+ // Apply tombstones to whichever side hasn't already deleted the row.
+ //
+ // The presence check cannot use localRows/remoteRows: those are the
+ // incremental window, and a row deleted on one side while untouched on
+ // the other is by definition outside it, so every deletion was dropped.
+ // It also cannot be skipped -- pushing unconditionally makes the
+ // receiving side record a fresh tombstone, which the next pass would push
+ // back, forever. So ask the receiving side what it actually still holds,
+ // and only when there is a deletion to apply.
+ if (localTombstones.length) {
+ const remoteSyncIds = await this.pullSyncIds(
+ remoteBaseUrl,
+ remoteJwt,
+ entityType,
+ );
+ for (const tombstone of localTombstones) {
+ if (remoteSyncIds.has(tombstone.syncId)) {
+ await this.pushTombstone(
+ remoteBaseUrl,
+ remoteJwt,
+ entityType,
+ tombstone.syncId,
+ );
+ }
+ }
+ }
+ if (remoteTombstones.length) {
+ const localSyncIds = await this.pullSyncIds(
+ EMBEDDED_BASE_URL,
+ this.localJwt,
+ entityType,
+ );
+ for (const tombstone of remoteTombstones) {
+ if (localSyncIds.has(tombstone.syncId)) {
+ await this.pushTombstone(
+ EMBEDDED_BASE_URL,
+ this.localJwt,
+ entityType,
+ tombstone.syncId,
+ );
+ }
+ }
+ }
+
+ return { syncedAt };
+ } catch (error) {
+ if (error?.authFailure) {
+ return { syncedAt, authFailure: true };
+ }
+ throw error;
+ }
+ }
+}
+
+let engine = null;
+
+function initRemoteSync(getMainWindow) {
+ engine = new RemoteSyncEngine(getMainWindow);
+ engine.start();
+ return engine;
+}
+
+function getRemoteSyncEngine() {
+ return engine;
+}
+
+module.exports = {
+ initRemoteSync,
+ getRemoteSyncEngine,
+ getDesktopSettings,
+ saveDesktopSettings,
+ getRemoteSyncConfig,
+ saveRemoteSyncConfig,
+ clearRemoteSyncConfig,
+ saveRemoteSyncJwt,
+ getRemoteSyncJwt,
+ clearRemoteSyncJwt,
+ getRemoteSyncUserInfo,
+ isJwtExpiredOrExpiringSoon,
+ decodeJwtExpiry,
+};
diff --git a/eslint.config.mjs b/eslint.config.mjs
index ee87445..7879884 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -46,4 +46,57 @@ export default tseslint.config([
"react-refresh/only-export-components": "warn",
},
},
+ {
+ // MySQL has no RETURNING clause, and drizzle's mysql-core does not expose
+ // the method at all โ a bare .returning() is a TypeError there, not a bad
+ // query, and it only fails on the engine no test in this repo runs against.
+ //
+ // 175 call sites were migrated off it. This is what stops number 176.
+ // Writes that need rows back go through repositories/returning.ts, which
+ // picks one statement or a read-then-write transaction per dialect.
+ files: ["src/backend/database/repositories/**/*.ts"],
+ ignores: [
+ // The two files whose job is to absorb these differences.
+ "src/backend/database/repositories/returning.ts",
+ "src/backend/database/repositories/mutation-result.ts",
+ ],
+ rules: {
+ "no-restricted-syntax": [
+ "error",
+ {
+ selector: "CallExpression[callee.property.name='returning']",
+ message:
+ "MySQL has no RETURNING. Use insertReturning/updateReturning/deleteReturning from ./returning.js, or rowsAffected() if you only need a count. Inside a proven sqlite-only branch, disable this rule with a comment saying so.",
+ },
+ {
+ // `||` concatenates on SQLite and Postgres. On MySQL it is logical OR
+ // unless the server runs with PIPES_AS_CONCAT, so a folder path built
+ // this way silently became 0. Use CONCAT, which all three agree on.
+ selector:
+ "TaggedTemplateExpression[tag.name='sql'] TemplateElement[value.raw=/\\|\\|/]",
+ message:
+ "`||` is logical OR on MySQL, not concatenation. Use CONCAT(...).",
+ },
+ {
+ // Postgres and SQLite spell it ON CONFLICT; MySQL spells it ON
+ // DUPLICATE KEY and names no columns, so drizzle's mysql-core has no
+ // onConflictDoUpdate at all โ another TypeError, not a bad query.
+ selector: "CallExpression[callee.property.name='onConflictDoUpdate']",
+ message:
+ "MySQL has no ON CONFLICT. Use upsert() from ./returning.js.",
+ },
+ {
+ // better-sqlite3 puts these on a write result; node-postgres and
+ // mysql2 do not, so reading them directly yields undefined โ and
+ // Number(undefined) is NaN, which reaches the database as the string
+ // "NaN" and fails an integer column. Three call sites did exactly
+ // this and only broke on Postgres.
+ selector:
+ "MemberExpression[property.name=/^(lastInsertRowid|changes)$/]",
+ message:
+ "lastInsertRowid and changes are better-sqlite3 only. Use insertedId() or rowsAffected() from ./mutation-result.js.",
+ },
+ ],
+ },
+ },
]);
diff --git a/index.html b/index.html
index da71ea3..f3f0c8f 100644
--- a/index.html
+++ b/index.html
@@ -3,7 +3,10 @@
-
+
@@ -44,6 +47,24 @@
border-radius: 3px;
border: 1px solid #1e1e21;
}
+
+ .toolbar-scrollbar {
+ scrollbar-width: thin;
+ scrollbar-color: #4a4a4a transparent;
+ }
+
+ .toolbar-scrollbar::-webkit-scrollbar {
+ height: 3px;
+ }
+
+ .toolbar-scrollbar::-webkit-scrollbar-track {
+ background: transparent;
+ }
+
+ .toolbar-scrollbar::-webkit-scrollbar-thumb {
+ background-color: #4a4a4a;
+ border-radius: 2px;
+ }
diff --git a/package-lock.json b/package-lock.json
index 4e9b87b..734f113 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,154 +1,162 @@
{
"name": "termix",
- "version": "2.5.1",
+ "version": "2.7.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "termix",
- "version": "2.5.1",
+ "version": "2.7.0",
"hasInstallScript": true,
"dependencies": {
+ "@anthropic-ai/sdk": "^0.116.0",
"@simplewebauthn/browser": "^13.3.0",
"@simplewebauthn/server": "^13.3.2",
- "@tanstack/react-virtual": "^3.14.6",
+ "@tanstack/react-virtual": "^3.14.9",
+ "@types/compression": "^1.8.1",
"@types/ldapjs": "^3.0.6",
- "axios": "^1.18.1",
+ "axios": "^1.19.0",
"bcryptjs": "^3.0.3",
- "better-sqlite3": "^12.11.1",
+ "better-sqlite3": "^13.0.2",
"body-parser": "^2.3.0",
- "chalk": "^5.6.2",
+ "chalk": "^6.0.0",
+ "compression": "^1.8.1",
"cookie-parser": "^1.4.7",
"cors": "^2.8.6",
"dotenv": "^17.4.2",
"drizzle-orm": "^0.45.2",
"express": "^5.2.1",
"guacamole-lite": "^1.2.0",
- "jose": "^6.2.2",
- "js-yaml": "^5.2.1",
+ "jose": "^6.2.8",
+ "js-yaml": "^5.2.3",
"jsonwebtoken": "^9.0.3",
"jszip": "^3.10.1",
"ldapjs": "^3.0.7",
- "motion": "^12.42.2",
+ "motion": "^12.43.0",
"multer": "^2.2.0",
- "nanoid": "^5.1.16",
+ "mysql2": "^3.23.2",
+ "nanoid": "^6.0.1",
+ "node-pty": "^1.1.0",
+ "pg": "^8.22.0",
"qrcode": "^1.5.4",
"serialport": "^13.0.0",
+ "sharp": "^0.35.3",
"socks": "^2.8.7",
"speakeasy": "^2.0.0",
"ssh2": "^1.17.0",
- "undici": "^8.7.0",
- "ws": "^8.20.0"
+ "undici": "^8.10.0",
+ "ws": "^8.21.1"
},
"devDependencies": {
- "@biomejs/biome": "2.5.2",
"@codemirror/autocomplete": "^6.20.3",
"@codemirror/commands": "^6.10.4",
"@codemirror/search": "^6.7.1",
"@codemirror/theme-one-dark": "^6.1.3",
- "@codemirror/view": "^6.43.5",
- "@commitlint/cli": "^21.0.2",
- "@commitlint/config-conventional": "^21.0.2",
+ "@codemirror/view": "^6.43.7",
+ "@commitlint/cli": "^21.2.1",
+ "@commitlint/config-conventional": "^21.2.0",
"@deadendjs/swagger-jsdoc": "^8.1.2",
"@electron/notarize": "^3.1.1",
- "@electron/rebuild": "^4.0.4",
+ "@electron/rebuild": "^4.2.0",
"@eslint/js": "^10.0.1",
- "@fontsource-variable/jetbrains-mono": "^5.2.8",
- "@fontsource/fira-code": "^5.2.7",
- "@fontsource/jetbrains-mono": "^5.2.8",
- "@fontsource/source-code-pro": "^5.2.7",
+ "@fontsource-variable/jetbrains-mono": "^5.3.0",
+ "@fontsource/fira-code": "^5.3.0",
+ "@fontsource/jetbrains-mono": "^5.3.0",
+ "@fontsource/source-code-pro": "^5.3.0",
"@monaco-editor/react": "^4.7.0",
- "@radix-ui/react-accordion": "^1.2.15",
- "@radix-ui/react-alert-dialog": "^1.1.18",
- "@radix-ui/react-checkbox": "^1.3.6",
- "@radix-ui/react-dialog": "^1.1.18",
- "@radix-ui/react-dropdown-menu": "^2.1.19",
- "@radix-ui/react-label": "^2.1.11",
- "@radix-ui/react-popover": "^1.1.18",
- "@radix-ui/react-progress": "^1.1.11",
- "@radix-ui/react-scroll-area": "^1.2.13",
- "@radix-ui/react-select": "^2.3.2",
- "@radix-ui/react-separator": "^1.1.11",
- "@radix-ui/react-slider": "^1.4.2",
- "@radix-ui/react-slot": "^1.3.0",
- "@radix-ui/react-switch": "^1.3.2",
- "@radix-ui/react-tabs": "^1.1.16",
- "@radix-ui/react-tooltip": "^1.2.11",
- "@tailwindcss/vite": "^4.3.2",
+ "@radix-ui/react-accordion": "^1.2.20",
+ "@radix-ui/react-alert-dialog": "^1.1.23",
+ "@radix-ui/react-checkbox": "^1.3.11",
+ "@radix-ui/react-dialog": "^1.1.23",
+ "@radix-ui/react-dropdown-menu": "^2.1.24",
+ "@radix-ui/react-label": "^2.1.15",
+ "@radix-ui/react-popover": "^1.1.23",
+ "@radix-ui/react-progress": "^1.1.16",
+ "@radix-ui/react-scroll-area": "^1.2.18",
+ "@radix-ui/react-select": "^2.3.7",
+ "@radix-ui/react-separator": "^1.1.15",
+ "@radix-ui/react-slider": "^1.4.7",
+ "@radix-ui/react-slot": "^1.3.3",
+ "@radix-ui/react-switch": "^1.3.7",
+ "@radix-ui/react-tabs": "^1.1.21",
+ "@radix-ui/react-tooltip": "^1.2.16",
+ "@tailwindcss/vite": "^4.3.3",
"@testing-library/dom": "^10.4.1",
- "@testing-library/jest-dom": "^6.9.1",
+ "@testing-library/jest-dom": "^7.0.0",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
- "@types/better-sqlite3": "^7.6.13",
+ "@types/better-sqlite3": "^9.6.0",
"@types/cookie-parser": "^1.4.10",
"@types/cors": "^2.8.19",
"@types/express": "^5.0.6",
"@types/guacamole-common-js": "^1.5.5",
"@types/js-yaml": "^4.0.9",
"@types/jsonwebtoken": "^9.0.10",
- "@types/multer": "^2.1.0",
- "@types/node": "^26.0.0",
+ "@types/multer": "^2.2.0",
+ "@types/node": "^26.1.2",
+ "@types/pg": "^8.20.3",
"@types/qrcode": "^1.5.6",
- "@types/react": "^19.2.17",
- "@types/react-dom": "^19.2.3",
+ "@types/react": "^19.2.18",
+ "@types/react-dom": "^19.2.4",
"@types/speakeasy": "^2.0.10",
"@types/ssh2": "^1.15.5",
"@types/ws": "^8.18.1",
- "@uiw/codemirror-extensions-langs": "^4.25.9",
- "@uiw/codemirror-theme-github": "^4.25.9",
- "@uiw/react-codemirror": "^4.25.9",
- "@vitejs/plugin-react": "^6.0.3",
- "@vitest/coverage-v8": "^4.1.9",
- "@vitest/ui": "^4.1.9",
+ "@uiw/codemirror-extensions-langs": "^4.25.11",
+ "@uiw/codemirror-theme-github": "^4.25.11",
+ "@uiw/react-codemirror": "^4.25.11",
+ "@vitejs/plugin-react": "^6.0.5",
+ "@vitest/coverage-v8": "^4.1.10",
+ "@vitest/ui": "^4.1.10",
"@xterm/addon-clipboard": "^0.2.0",
"@xterm/addon-fit": "^0.11.0",
+ "@xterm/addon-search": "^0.16.0",
"@xterm/addon-unicode11": "^0.9.0",
"@xterm/addon-web-links": "^0.12.0",
"@xterm/xterm": "^6.0.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
- "concurrently": "^10.0.3",
+ "concurrently": "^10.0.4",
"cytoscape": "^3.34.0",
- "electron": "^43.0.0",
+ "drizzle-kit": "^0.31.10",
+ "electron": "^43.2.0",
"electron-builder": "^26.15.3",
- "eslint": "^10.5.0",
+ "eslint": "^10.8.0",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.3",
"eslint-plugin-unused-imports": "^4.4.1",
- "globals": "^17.5.0",
+ "globals": "^17.8.0",
"guacamole-common-js": "^1.5.0",
"husky": "^9.1.7",
- "i18next": "^26.3.4",
+ "i18next": "^26.3.6",
"i18next-browser-languagedetector": "^8.2.1",
- "jsdom": "^29.1.1",
- "lint-staged": "^17.0.8",
- "lucide-react": "^1.20.0",
- "prettier": "3.8.4",
- "radix-ui": "^1.6.1",
- "react": "^19.2.7",
+ "jsdom": "^30.0.1",
+ "lint-staged": "^17.2.0",
+ "lucide-react": "^1.28.0",
+ "prettier": "3.9.6",
+ "radix-ui": "^1.6.7",
+ "react": "^19.2.8",
"react-cytoscapejs": "^2.0.0",
- "react-dom": "^19.2.7",
+ "react-dom": "^19.2.8",
"react-h5-audio-player": "^3.10.2",
- "react-hook-form": "^7.79.0",
- "react-i18next": "^17.0.4",
- "react-icons": "^5.6.0",
+ "react-hook-form": "^7.84.0",
+ "react-i18next": "^17.0.11",
+ "react-icons": "^5.7.0",
"react-markdown": "^10.1.0",
"react-pdf": "^10.4.1",
"react-photo-view": "^1.2.7",
"react-syntax-highlighter": "^16.1.1",
"react-xtermjs": "^1.0.10",
"remark-gfm": "^4.0.1",
- "sharp": "^0.35.3",
"sonner": "^2.0.7",
"tailwind-merge": "^3.5.0",
"tailwindcss": "^4.2.4",
"tw-animate-css": "^1.4.0",
"typescript": "~6.0.3",
- "typescript-eslint": "^8.61.1",
- "vite": "^8.0.16",
+ "typescript-eslint": "^8.66.0",
+ "vite": "^8.2.0",
"vite-plugin-svgr": "^5.2.0",
- "vitest": "^4.1.9"
+ "vitest": "^4.1.10"
},
"engines": {
"node": ">=22.12.0",
@@ -162,6 +170,27 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@anthropic-ai/sdk": {
+ "version": "0.116.0",
+ "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.116.0.tgz",
+ "integrity": "sha512-4UEapYQ+epLEMsAuLZDvW8ExVSOtHD8a7zTyLzhw0H9RXJ1eilPgmqhjwgcdg22diwx13spw6fJ4rONZ+bS7Ww==",
+ "license": "MIT",
+ "dependencies": {
+ "json-schema-to-ts": "^3.1.1",
+ "standardwebhooks": "^1.0.0"
+ },
+ "bin": {
+ "anthropic-ai-sdk": "bin/cli"
+ },
+ "peerDependencies": {
+ "zod": "^3.25.0 || ^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "zod": {
+ "optional": true
+ }
+ }
+ },
"node_modules/@apidevtools/json-schema-ref-parser": {
"version": "14.0.1",
"resolved": "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-14.0.1.tgz",
@@ -180,9 +209,9 @@
}
},
"node_modules/@apidevtools/json-schema-ref-parser/node_modules/js-yaml": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz",
- "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz",
+ "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==",
"dev": true,
"funding": [
{
@@ -238,56 +267,58 @@
}
},
"node_modules/@asamuzakjp/css-color": {
- "version": "5.1.11",
- "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-5.1.11.tgz",
- "integrity": "sha512-KVw6qIiCTUQhByfTd78h2yD1/00waTmm9uy/R7Ck/ctUyAPj+AEDLkQIdJW0T8+qGgj3j5bpNKK7Q3G+LedJWg==",
+ "version": "6.0.5",
+ "resolved": "https://registry.npmjs.org/@asamuzakjp/css-color/-/css-color-6.0.5.tgz",
+ "integrity": "sha512-mbhpPMmnw/kwW19aRNmSUl1QzLbdGo1SCuE49BT98MNwqF6zaHb3o2owssFc/PEO/4t2UjqtCNwocuDtJornzA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@asamuzakjp/generational-cache": "^1.0.1",
- "@csstools/css-calc": "^3.2.0",
- "@csstools/css-color-parser": "^4.1.0",
+ "@csstools/css-calc": "^3.2.1",
+ "@csstools/css-color-parser": "^4.1.9",
"@csstools/css-parser-algorithms": "^4.0.0",
- "@csstools/css-tokenizer": "^4.0.0"
+ "@csstools/css-tokenizer": "^4.0.0",
+ "lru-cache": "^11.5.2"
},
"engines": {
- "node": "^20.19.0 || ^22.12.0 || >=24.0.0"
+ "node": "^22.13.0 || >=24.0.0"
+ }
+ },
+ "node_modules/@asamuzakjp/css-color/node_modules/lru-cache": {
+ "version": "11.5.2",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz",
+ "integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==",
+ "dev": true,
+ "license": "BlueOak-1.0.0",
+ "engines": {
+ "node": "20 || >=22"
}
},
"node_modules/@asamuzakjp/dom-selector": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-7.1.1.tgz",
- "integrity": "sha512-67RZDnYRc8H/8MLDgQCDE//zoqVFwajkepHZgmXrbwybzXOEwOWGPYGmALYl9J2DOLfFPPs6kKCqmbzV895hTQ==",
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/@asamuzakjp/dom-selector/-/dom-selector-8.3.2.tgz",
+ "integrity": "sha512-93Z1N+BQNXysodoicpOIyNh2drHfz/CTf9nnT0FEx72GJcIiwgydD7tGAr78j41LsYn3hlRn+LdGPuBLn1Bl8Q==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@asamuzakjp/generational-cache": "^1.0.1",
- "@asamuzakjp/nwsapi": "^2.3.9",
"bidi-js": "^1.0.3",
"css-tree": "^3.2.1",
- "is-potential-custom-element-name": "^1.0.1"
+ "is-potential-custom-element-name": "^1.0.1",
+ "lru-cache": "^11.5.2"
},
"engines": {
- "node": "^20.19.0 || ^22.12.0 || >=24.0.0"
+ "node": "^22.13.0 || >=24.0.0"
}
},
- "node_modules/@asamuzakjp/generational-cache": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/@asamuzakjp/generational-cache/-/generational-cache-1.0.1.tgz",
- "integrity": "sha512-wajfB8KqzMCN2KGNFdLkReeHncd0AslUSrvHVvvYWuU8ghncRJoA50kT3zP9MVL0+9g4/67H+cdvBskj9THPzg==",
+ "node_modules/@asamuzakjp/dom-selector/node_modules/lru-cache": {
+ "version": "11.5.2",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz",
+ "integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==",
"dev": true,
- "license": "MIT",
+ "license": "BlueOak-1.0.0",
"engines": {
- "node": "^20.19.0 || ^22.12.0 || >=24.0.0"
+ "node": "20 || >=22"
}
},
- "node_modules/@asamuzakjp/nwsapi": {
- "version": "2.3.9",
- "resolved": "https://registry.npmjs.org/@asamuzakjp/nwsapi/-/nwsapi-2.3.9.tgz",
- "integrity": "sha512-n8GuYSrI9bF7FFZ/SjhwevlHc8xaVlb/7HmHelnc/PZXBD2ZR49NnN9sMMuDdEGPeeRQ5d0hqlSlEpgCX3Wl0Q==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/@babel/code-frame": {
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz",
@@ -504,7 +535,6 @@
"version": "7.29.7",
"resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.7.tgz",
"integrity": "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=6.9.0"
@@ -568,169 +598,6 @@
"node": ">=18"
}
},
- "node_modules/@biomejs/biome": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.5.2.tgz",
- "integrity": "sha512-VQ3RCqr7JmDIX+w6stWYl+g/3bYofN3q2wDBHUKKc/c7i5QWrFKFBZYCYPWTE6agsUPMIZZe6/CMmVUfUAhkKA==",
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "bin": {
- "biome": "bin/biome"
- },
- "engines": {
- "node": ">=14.21.3"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/biome"
- },
- "optionalDependencies": {
- "@biomejs/cli-darwin-arm64": "2.5.2",
- "@biomejs/cli-darwin-x64": "2.5.2",
- "@biomejs/cli-linux-arm64": "2.5.2",
- "@biomejs/cli-linux-arm64-musl": "2.5.2",
- "@biomejs/cli-linux-x64": "2.5.2",
- "@biomejs/cli-linux-x64-musl": "2.5.2",
- "@biomejs/cli-win32-arm64": "2.5.2",
- "@biomejs/cli-win32-x64": "2.5.2"
- }
- },
- "node_modules/@biomejs/cli-darwin-arm64": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.5.2.tgz",
- "integrity": "sha512-e7P3P7EkwFc/KiX2AHw4YDLIBOMfG9CPCAwy52k5Bp0dfhkozx9hf6wCmIr2QeXy2XeccJ3V/Sg+hDmzYEqxSg==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=14.21.3"
- }
- },
- "node_modules/@biomejs/cli-darwin-x64": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.5.2.tgz",
- "integrity": "sha512-ymzMvjC1Jg0b9K0D26ZdARqFQXs7MocfLC5FOCGfkC0Ss+ACUJkX5364ZM5nT4NLZanHRZNVrZEy+Ibwcvux/g==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">=14.21.3"
- }
- },
- "node_modules/@biomejs/cli-linux-arm64": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.5.2.tgz",
- "integrity": "sha512-t7sseOmqND57uUWTwlawU6BYj+J06T/9EkydzBhkrgw/FK3QVhjU2wsJR0frljrKZ0/I8A/rYw7284QgqjQfIQ==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=14.21.3"
- }
- },
- "node_modules/@biomejs/cli-linux-arm64-musl": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.5.2.tgz",
- "integrity": "sha512-w+ANG0ZvTu9IeEg9QnstoOnk6L0fpwJifW6aHR18+cb5Z39bkANItYjAfMrnvce5tmMK+IQ6nPX7/kQFdam5iw==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=14.21.3"
- }
- },
- "node_modules/@biomejs/cli-linux-x64": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.5.2.tgz",
- "integrity": "sha512-M/lOZrewzTCRDINbjhQ1gYYru37KlD3kJBQwwKCG0ckz5E9IZwIoJ3X0wBwRXA+yBDIwWUuPBHS67HzJY4dTfA==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=14.21.3"
- }
- },
- "node_modules/@biomejs/cli-linux-x64-musl": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.5.2.tgz",
- "integrity": "sha512-VArNLAzND063tF+XY0yPyM+DyahpzOMzOAvb7qs259nhjJWRjvjZdssuA+Rfl+l07+NOesKZ0Xu2yFrXyBMtzw==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "optional": true,
- "os": [
- "linux"
- ],
- "engines": {
- "node": ">=14.21.3"
- }
- },
- "node_modules/@biomejs/cli-win32-arm64": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.5.2.tgz",
- "integrity": "sha512-kbjFFKyZlzYnAuw7sRy5qDoFG6zrP40UK08oPQsWK0ct3NMnGSt+Bs1iviEEyEIP57N5MrykGXdO/wRiaR4lww==",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=14.21.3"
- }
- },
- "node_modules/@biomejs/cli-win32-x64": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.5.2.tgz",
- "integrity": "sha512-4InchVpdVmdkkkgjQqKpgvyu+VPnoF/7RPSw5YATgEVpt2j72wcCAeV5TwaE9ZGJUZWZn7v2CwSAj6CrMJEx8A==",
- "cpu": [
- "x64"
- ],
- "dev": true,
- "license": "MIT OR Apache-2.0",
- "optional": true,
- "os": [
- "win32"
- ],
- "engines": {
- "node": ">=14.21.3"
- }
- },
"node_modules/@bramus/specificity": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/@bramus/specificity/-/specificity-2.4.2.tgz",
@@ -1129,9 +996,9 @@
}
},
"node_modules/@codemirror/view": {
- "version": "6.43.5",
- "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.5.tgz",
- "integrity": "sha512-7uT/vUgH6dfXWn3WqOe23KneILMvGy5wQjNMEcRXLKzziJ9NOktpW6tGoyQpwVkBgE5Gj6hKkCcsddbnkaWrOQ==",
+ "version": "6.43.7",
+ "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.7.tgz",
+ "integrity": "sha512-FZsExxkoxnAN+d9TgqXLg5g4A1oQwzX9WlkOT5i2PKkcW7xx3Bmu0vs90g6fo9Mpdsb/l96dnAraQ8932aO4/g==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1142,17 +1009,18 @@
}
},
"node_modules/@commitlint/cli": {
- "version": "21.0.2",
- "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-21.0.2.tgz",
- "integrity": "sha512-YMmfLbqBg+ZRvvmPhc+cilSQFrh/AgzVgCT1U/OifmUZEwPbvCtA8rN//YNaF9d5eoZphxVMGYtmwA2QgQORgg==",
+ "version": "21.2.1",
+ "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-21.2.1.tgz",
+ "integrity": "sha512-blsZGe29hJ72VGEFVl72IVYX+1vsfINpjA9yWQA6i7OKD/McGEOXg08sKIRKjFk4JvzhV/9n0l3i6NooPLTNfg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@commitlint/format": "^21.0.1",
- "@commitlint/lint": "^21.0.2",
- "@commitlint/load": "^21.0.2",
- "@commitlint/read": "^21.0.2",
- "@commitlint/types": "^21.0.1",
+ "@commitlint/config-conventional": "^21.2.0",
+ "@commitlint/format": "^21.2.0",
+ "@commitlint/lint": "^21.2.0",
+ "@commitlint/load": "^21.2.0",
+ "@commitlint/read": "^21.2.1",
+ "@commitlint/types": "^21.2.0",
"tinyexec": "^1.0.0",
"yargs": "^18.0.0"
},
@@ -1263,27 +1131,27 @@
}
},
"node_modules/@commitlint/config-conventional": {
- "version": "21.0.2",
- "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-21.0.2.tgz",
- "integrity": "sha512-P/ZRhryQmkj0Z0dY9FOoRwe3xkwJyyAdtXwt01NT2kuZttcG2CNYp1q5Ci3u+nDT2jcbJRw2kt13Czl1qKNPfg==",
+ "version": "21.2.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-21.2.0.tgz",
+ "integrity": "sha512-Qf8WRDVcyVd14if6VTWenebxFbKnVnbzPUJjlzjkyJGeHK2xCGd63Dr1XZzj0plXKQb9P0BfOxoc1HVeCo2BWQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@commitlint/types": "^21.0.1",
- "conventional-changelog-conventionalcommits": "^9.2.0"
+ "@commitlint/types": "^21.2.0",
+ "conventional-changelog-conventionalcommits": "^10.0.0"
},
"engines": {
"node": ">=22.12.0"
}
},
"node_modules/@commitlint/config-validator": {
- "version": "21.0.1",
- "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-21.0.1.tgz",
- "integrity": "sha512-Zd2UFdndeMMaW2O96HK0tdfT4gOImUvidMpAd/pws2zZ4m1nrAZ/9b/v2JYuE8fs86GpXv9F7LNaIuCIWhY+pA==",
+ "version": "21.2.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-21.2.0.tgz",
+ "integrity": "sha512-t7AzNHAKeIdo/3NRGwzpufKHsKkPHmFs/56N2Fnsh0/r0rGtnQzTxk6vnFgjaGr4hdSQKNB50/KAhR9Yk4LJKA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@commitlint/types": "^21.0.1",
+ "@commitlint/types": "^21.2.0",
"ajv": "^8.11.0"
},
"engines": {
@@ -1291,13 +1159,13 @@
}
},
"node_modules/@commitlint/ensure": {
- "version": "21.0.1",
- "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-21.0.1.tgz",
- "integrity": "sha512-jJ1037967wU7YN/xkv+iRlOBlmaOXPhPO5KQSqya6GyXzBlwuLzELBFao16DVg9dZyqmNrhewzwZ3SAibetHBQ==",
+ "version": "21.2.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-21.2.0.tgz",
+ "integrity": "sha512-76IF9vDNS13lAzEEik9eKwzt8f9hYhWiwVXZ2AnyLCz5/f511FsEQ3pw1X3/zSQpdRLQU7i5qDMVKyXi1GWjSg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@commitlint/types": "^21.0.1",
+ "@commitlint/types": "^21.2.0",
"es-toolkit": "^1.46.0"
},
"engines": {
@@ -1315,13 +1183,13 @@
}
},
"node_modules/@commitlint/format": {
- "version": "21.0.1",
- "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-21.0.1.tgz",
- "integrity": "sha512-ksmG2+cHGtuDPQQbhBbC4unwm444+6TiPw0d1bKf67hntgZqZ8E0g1MuYKUuyT5IH4IMmXZhKq22/Z3jBvtQIw==",
+ "version": "21.2.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-21.2.0.tgz",
+ "integrity": "sha512-c4q64xaav2U83t7k7RyzJerBZurPer7FxUOY0RL5L/6CZijZ7K+s6HIBGIghj0ey1P2+seRX0J9XQYtDued6tg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@commitlint/types": "^21.0.1",
+ "@commitlint/types": "^21.2.0",
"picocolors": "^1.1.1"
},
"engines": {
@@ -1329,13 +1197,13 @@
}
},
"node_modules/@commitlint/is-ignored": {
- "version": "21.0.2",
- "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-21.0.2.tgz",
- "integrity": "sha512-H5z4t8PC9tUsmZ/o+EptM3Nq8sTFtskAShdcqxCoyzklW5eaVT5xbrDAET2uypzir9Vsj4ZZmBtyKjYe2XqgeQ==",
+ "version": "21.2.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-21.2.0.tgz",
+ "integrity": "sha512-4/eB0vBN7L88O/oC4ajAEqi7j2ZfNgxl/+11RfAV9YosejZgDXhY2C9VcHnHJhOzPLoSy5P3Mg/46kqeyJfXKw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@commitlint/types": "^21.0.1",
+ "@commitlint/types": "^21.2.0",
"semver": "^7.6.0"
},
"engines": {
@@ -1343,32 +1211,32 @@
}
},
"node_modules/@commitlint/lint": {
- "version": "21.0.2",
- "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-21.0.2.tgz",
- "integrity": "sha512-PnUmLYGeGLfW8oVatR9KpNxSHYAnJOEWlMZzfdeFOUq6WUrFx1fGQaWCWJqMoIll/xPM+GdfJV+tKHZVHhl0Fg==",
+ "version": "21.2.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-21.2.0.tgz",
+ "integrity": "sha512-ceO5dp9pLjEZ6y6qbq/uXWXDPykqqlTsyzoQ0NzecpisSJhK3kTy9qzQoPeJuWG/IMNdV1lO0RgmzqoAlSi1uw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@commitlint/is-ignored": "^21.0.2",
- "@commitlint/parse": "^21.0.2",
- "@commitlint/rules": "^21.0.2",
- "@commitlint/types": "^21.0.1"
+ "@commitlint/is-ignored": "^21.2.0",
+ "@commitlint/parse": "^21.2.0",
+ "@commitlint/rules": "^21.2.0",
+ "@commitlint/types": "^21.2.0"
},
"engines": {
"node": ">=22.12.0"
}
},
"node_modules/@commitlint/load": {
- "version": "21.0.2",
- "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-21.0.2.tgz",
- "integrity": "sha512-lwUE70hN0/qE/ZRROhbaX65ly/FF12DrqfReLCESo37M0OQCFAf2jRS+2tSCSORq+bm4Kdju7qNDj46uc1QzTA==",
+ "version": "21.2.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-21.2.0.tgz",
+ "integrity": "sha512-RjlzWQqruRwIenJEfZtq7kG97co97nKoHpflE5YnF61tDLXxHPrdWImgzw6VL6MlFyaOcVlk74eBV8ZQmc3oIA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@commitlint/config-validator": "^21.0.1",
+ "@commitlint/config-validator": "^21.2.0",
"@commitlint/execute-rule": "^21.0.1",
- "@commitlint/resolve-extends": "^21.0.1",
- "@commitlint/types": "^21.0.1",
+ "@commitlint/resolve-extends": "^21.2.0",
+ "@commitlint/types": "^21.2.0",
"cosmiconfig": "^9.0.1",
"cosmiconfig-typescript-loader": "^6.1.0",
"es-toolkit": "^1.46.0",
@@ -1380,9 +1248,9 @@
}
},
"node_modules/@commitlint/message": {
- "version": "21.0.2",
- "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-21.0.2.tgz",
- "integrity": "sha512-5n4aqHGD/FNnom/D5L8i7cYtV+xjuXcBL832C3w9VglEsZzIsoHpJsvxzJ7cgiOsOdc/2jU4t5+7qMHh7GBX3g==",
+ "version": "21.2.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-21.2.0.tgz",
+ "integrity": "sha512-YxGoiXD/HXNXLJPrQwE5poXa+XH0CBEm+mdvbHQP0g6MV/dmJyUFCzPNzZbxL93GvZ70TmtTK0Z0/IBpAqHv8g==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1390,30 +1258,30 @@
}
},
"node_modules/@commitlint/parse": {
- "version": "21.0.2",
- "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-21.0.2.tgz",
- "integrity": "sha512-QVZJhGHTm+oiuWyEKOCTQ0ZM3mfJ0eGWFeHuj7WzSKEth+UukcCHac9GD8pgdFlg/qGkFWOtyaNd1T8REgagaw==",
+ "version": "21.2.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-21.2.0.tgz",
+ "integrity": "sha512-QHWxG4d0PLTF634/AdyZ0MQS+CLn5YOuJlCFhMMlSGKFxzYGUetkHBj18xgBD+6fVzUrA2lrCdi/vlS2f/oYXg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@commitlint/types": "^21.0.1",
- "conventional-changelog-angular": "^8.2.0",
- "conventional-commits-parser": "^6.3.0"
+ "@commitlint/types": "^21.2.0",
+ "conventional-changelog-angular": "^9.0.0",
+ "conventional-commits-parser": "^7.0.0"
},
"engines": {
"node": ">=22.12.0"
}
},
"node_modules/@commitlint/read": {
- "version": "21.0.2",
- "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-21.0.2.tgz",
- "integrity": "sha512-BtsrnLVycSSKf4Q0gMch4giCj5NNlmcbhc8ra5vONgGtP2IjRDo33bEFtr5Pm+2N+5fXGWb2MksWPrspPfdhdw==",
+ "version": "21.2.1",
+ "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-21.2.1.tgz",
+ "integrity": "sha512-hUW7EJQnNTL0vPOmVMNK4CrnrNBN0nN+JJHReFkdHO5y4iyHeEmTBwuC15OCqUTjxWo7idnH1LftfpWVIaPWIA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@commitlint/top-level": "^21.0.2",
- "@commitlint/types": "^21.0.1",
- "git-raw-commits": "^5.0.0",
+ "@commitlint/top-level": "^21.2.0",
+ "@commitlint/types": "^21.2.0",
+ "@conventional-changelog/git-client": "^3.0.0",
"tinyexec": "^1.0.0"
},
"engines": {
@@ -1421,14 +1289,14 @@
}
},
"node_modules/@commitlint/resolve-extends": {
- "version": "21.0.1",
- "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-21.0.1.tgz",
- "integrity": "sha512-0DhjYWL6uYrY16Efa032fYk3woGJDU4AGWiG1XXltT9AMUNYKyb5cIZU2ivbaMZ3+kKFqUjikD2cjh66Sbh/Sg==",
+ "version": "21.2.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-21.2.0.tgz",
+ "integrity": "sha512-4O/1j51+79Wth9s/MGxt/5gs0XYLDgNlYpltQfhAvLE0itusLKs9zruxbiNg1oOkmkb9L9L4USYGjEj7n87NxA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@commitlint/config-validator": "^21.0.1",
- "@commitlint/types": "^21.0.1",
+ "@commitlint/config-validator": "^21.2.0",
+ "@commitlint/types": "^21.2.0",
"es-toolkit": "^1.46.0",
"global-directory": "^5.0.0",
"resolve-from": "^5.0.0"
@@ -1438,16 +1306,16 @@
}
},
"node_modules/@commitlint/rules": {
- "version": "21.0.2",
- "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-21.0.2.tgz",
- "integrity": "sha512-k6tQ69Td7t2qUSIbik8D3TL1q3ZJpkEbV+yLogDzCRAdOxJm4ndhtBNREsLA1/puRfWvzS9eioF2w43WT+hHgQ==",
+ "version": "21.2.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-21.2.0.tgz",
+ "integrity": "sha512-C2yXMNpiB8ETZKfx5JD8+ExgF8vTU1VQMKPSUUYwqKpw9oJWQBrlXBpdU038mj2WPjof7o9UzFpmTyBeGMZwZg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@commitlint/ensure": "^21.0.1",
- "@commitlint/message": "^21.0.2",
+ "@commitlint/ensure": "^21.2.0",
+ "@commitlint/message": "^21.2.0",
"@commitlint/to-lines": "^21.0.1",
- "@commitlint/types": "^21.0.1"
+ "@commitlint/types": "^21.2.0"
},
"engines": {
"node": ">=22.12.0"
@@ -1464,9 +1332,9 @@
}
},
"node_modules/@commitlint/top-level": {
- "version": "21.0.2",
- "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-21.0.2.tgz",
- "integrity": "sha512-s9KKM+e+mXgFeIh4n7KmOGAVT3mkJ3Fp1bBYHIK5pjeUwlEMzp/tZfb5u0Poa680AsQTXMEMRxZi1vQ9m2X5ug==",
+ "version": "21.2.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-21.2.0.tgz",
+ "integrity": "sha512-Y5gmQ+KxzqCrBFJfLvFEPvvwD3LDiNZoTT2yeFBm96M8qhmqSzQc5DvX3rheAaAMjyIvMXOCLS/mWfdpONsjyQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1477,13 +1345,13 @@
}
},
"node_modules/@commitlint/types": {
- "version": "21.0.1",
- "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-21.0.1.tgz",
- "integrity": "sha512-4u7w8jcoCUFWhjWnASYzZHAP34OqOtuFBN87nQmFvqda03YU0T6z+yB4w0gSAMpekiRqqGk5rt+qSlW+a2vSEg==",
+ "version": "21.2.0",
+ "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-21.2.0.tgz",
+ "integrity": "sha512-7zVFCDB2reMvJH5dmbKnOQPjZEvjdJTH8jc0U/PIPU1r3/+vf5pD1HlfitV2MWsWXrvu7u39iY1lyLUPOaN0Gw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "conventional-commits-parser": "^6.3.0",
+ "conventional-commits-parser": "^7.0.0",
"picocolors": "^1.1.1"
},
"engines": {
@@ -1491,22 +1359,22 @@
}
},
"node_modules/@conventional-changelog/git-client": {
- "version": "2.7.0",
- "resolved": "https://registry.npmjs.org/@conventional-changelog/git-client/-/git-client-2.7.0.tgz",
- "integrity": "sha512-j7A8/LBEQ+3rugMzPXoKYzyUPpw/0CBQCyvtTR7Lmu4olG4yRC/Tfkq79Mr3yuPs0SUitlO2HwGP3gitMJnRFw==",
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/@conventional-changelog/git-client/-/git-client-3.1.0.tgz",
+ "integrity": "sha512-Tqa/gHco2WJWa740NRjOrfKVvzIqxkZpecb8bemaQ8sKM5PXb1UK4uTyTb/1wIqNuOVaDOFxyBdhTIQZn6gdjQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@simple-libs/child-process-utils": "^1.0.0",
- "@simple-libs/stream-utils": "^1.2.0",
+ "@simple-libs/child-process-utils": "^2.0.0",
+ "@simple-libs/stream-utils": "^2.0.0",
"semver": "^7.5.2"
},
"engines": {
- "node": ">=18"
+ "node": ">=22"
},
"peerDependencies": {
- "conventional-commits-filter": "^5.0.0",
- "conventional-commits-parser": "^6.4.0"
+ "conventional-commits-filter": "^6.0.1",
+ "conventional-commits-parser": "^7.0.1"
},
"peerDependenciesMeta": {
"conventional-commits-filter": {
@@ -1517,10 +1385,20 @@
}
}
},
+ "node_modules/@conventional-changelog/template": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/@conventional-changelog/template/-/template-1.2.1.tgz",
+ "integrity": "sha512-TzlTVpKPjaqW6qOYjQcYUDuGsLCNsvFHVBXkYGTAnf5V37jCWrE5haKNXzz0WZUtVHjrpV76L1buANjwXMfT8w==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=22"
+ }
+ },
"node_modules/@csstools/color-helpers": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-6.0.2.tgz",
- "integrity": "sha512-LMGQLS9EuADloEFkcTBR3BwV/CGHV7zyDxVRtVDTwdI2Ca4it0CCVTT9wCkxSgokjE5Ho41hEPgb8OEUwoXr6Q==",
+ "version": "6.1.0",
+ "resolved": "https://registry.npmjs.org/@csstools/color-helpers/-/color-helpers-6.1.0.tgz",
+ "integrity": "sha512-064IFJdjTfUqnjpCVpMOdbr8FLQBhinbZj6yRv2An2E41O/pLEXqfFRWqGq/SxlE5PEUYTlvWsG2r8MswAVvkg==",
"dev": true,
"funding": [
{
@@ -1538,9 +1416,9 @@
}
},
"node_modules/@csstools/css-calc": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-3.2.1.tgz",
- "integrity": "sha512-DtdHlgXh5ZkA43cwBcAm+huzgJiwx3ZTWVjBs94kwz2xKqSimDA3lBgCjphYgwgVUMWatSM0pDd8TILB1yrVVg==",
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/@csstools/css-calc/-/css-calc-3.3.0.tgz",
+ "integrity": "sha512-c5ihYsPkdG6JCkU2zTMm4+k6r7RXuGxtWYhu5DHMIiF1FHzrfmHL5so11AoFpUv/tu61xfcmT4AmKoFfMPoqdQ==",
"dev": true,
"funding": [
{
@@ -1562,9 +1440,9 @@
}
},
"node_modules/@csstools/css-color-parser": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-4.1.1.tgz",
- "integrity": "sha512-eZ5XOtyhK+mggRafYUWzA0tvaYOFgdY8AkgQiCJF9qNAePnUo/zmsqqYubBBb3sQ8uNUaSKTY9s9klfRaAXL0g==",
+ "version": "4.1.10",
+ "resolved": "https://registry.npmjs.org/@csstools/css-color-parser/-/css-color-parser-4.1.10.tgz",
+ "integrity": "sha512-UZhQLIUyJaaMepqehrCODwCg2KW25vFvLWBmqYFaPclYvvxzj/sG8LBOhBFCp11i9uE7t1EyS+RAoV9tztPFyw==",
"dev": true,
"funding": [
{
@@ -1578,8 +1456,8 @@
],
"license": "MIT",
"dependencies": {
- "@csstools/color-helpers": "^6.0.2",
- "@csstools/css-calc": "^3.2.1"
+ "@csstools/color-helpers": "^6.1.0",
+ "@csstools/css-calc": "^3.3.0"
},
"engines": {
"node": ">=20.19.0"
@@ -1613,9 +1491,9 @@
}
},
"node_modules/@csstools/css-syntax-patches-for-csstree": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.1.5.tgz",
- "integrity": "sha512-oNjBvzLq2GPZtJphCjLqXow/cHySHSgtxvKZb7OqSZ/xHgw6NWNhfad+6AB9cLeVm6eA9d/qMll3JdEHjy6M+A==",
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@csstools/css-syntax-patches-for-csstree/-/css-syntax-patches-for-csstree-1.1.7.tgz",
+ "integrity": "sha512-fQ+05118eQS1cofO3aJpB5efgpBZMvIzwr/sbC8kDLVA5XLG8q1kJV5yzrUAI1f7lvhPnm8fgIjzFB8/O/5Dig==",
"dev": true,
"funding": [
{
@@ -1676,6 +1554,13 @@
"node": ">=20.0.0"
}
},
+ "node_modules/@drizzle-team/brocli": {
+ "version": "0.10.2",
+ "resolved": "https://registry.npmjs.org/@drizzle-team/brocli/-/brocli-0.10.2.tgz",
+ "integrity": "sha512-z33Il7l5dKjUgGULTqBsQBQwckHh5AbIuxhdsIxDDiZAzBOrZO6q9ogcWC65kU382AfynTfgNumVcNIjuIua6w==",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
"node_modules/@electron-internal/extract-zip": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@electron-internal/extract-zip/-/extract-zip-1.0.3.tgz",
@@ -1828,9 +1713,9 @@
}
},
"node_modules/@electron/get/node_modules/undici": {
- "version": "7.27.2",
- "resolved": "https://registry.npmjs.org/undici/-/undici-7.27.2.tgz",
- "integrity": "sha512-uZsKNuzQxDMUY6M3pIMvy5tvlGmtq8XJ2oLAkfRKGNu+1VQAIvLy2xIVG5ATZl5wDXl/tddByAWCizRbOme+TA==",
+ "version": "7.29.0",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-7.29.0.tgz",
+ "integrity": "sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw==",
"dev": true,
"license": "MIT",
"optional": true,
@@ -1888,9 +1773,9 @@
}
},
"node_modules/@electron/rebuild": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/@electron/rebuild/-/rebuild-4.0.4.tgz",
- "integrity": "sha512-Rzc39XPdk/+/wBG8MfwAHohXflep0ITUfulb6Rgz3R0NeSB1noE+E9/M/cb8ftCAiyDD9PPhLuuWgE1GaInbKg==",
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/@electron/rebuild/-/rebuild-4.2.0.tgz",
+ "integrity": "sha512-RKL/O+jGoXJMxrx/5771y1n0xTKmFuOYGO3gMmwypBM6rsH0kou0mswwdXA2JrhIkE4xyC7v9vGk0n6NPzgOxQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1935,9 +1820,9 @@
"license": "MIT"
},
"node_modules/@electron/universal/node_modules/brace-expansion": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.1.tgz",
- "integrity": "sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==",
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.4.tgz",
+ "integrity": "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1975,38 +1860,470 @@
"url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/@emnapi/core": {
- "version": "1.10.0",
- "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz",
- "integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==",
+ "node_modules/@esbuild-kit/core-utils": {
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/@esbuild-kit/core-utils/-/core-utils-3.3.2.tgz",
+ "integrity": "sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==",
+ "deprecated": "Merged into tsx: https://tsx.hirok.io",
"dev": true,
"license": "MIT",
- "optional": true,
"dependencies": {
- "@emnapi/wasi-threads": "1.2.1",
- "tslib": "^2.4.0"
+ "esbuild": "~0.18.20",
+ "source-map-support": "^0.5.21"
}
},
- "node_modules/@emnapi/runtime": {
- "version": "1.10.0",
- "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz",
- "integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==",
+ "node_modules/@esbuild-kit/esm-loader": {
+ "version": "2.6.5",
+ "resolved": "https://registry.npmjs.org/@esbuild-kit/esm-loader/-/esm-loader-2.6.5.tgz",
+ "integrity": "sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==",
+ "deprecated": "Merged into tsx: https://tsx.hirok.io",
"dev": true,
"license": "MIT",
- "optional": true,
"dependencies": {
- "tslib": "^2.4.0"
+ "@esbuild-kit/core-utils": "^3.3.2",
+ "get-tsconfig": "^4.7.0"
}
},
- "node_modules/@emnapi/wasi-threads": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz",
- "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==",
+ "node_modules/@esbuild/aix-ppc64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz",
+ "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==",
+ "cpu": [
+ "ppc64"
+ ],
"dev": true,
"license": "MIT",
"optional": true,
- "dependencies": {
- "tslib": "^2.4.0"
+ "os": [
+ "aix"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz",
+ "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz",
+ "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz",
+ "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz",
+ "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz",
+ "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz",
+ "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz",
+ "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz",
+ "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz",
+ "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz",
+ "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz",
+ "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz",
+ "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz",
+ "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz",
+ "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz",
+ "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz",
+ "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz",
+ "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz",
+ "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz",
+ "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz",
+ "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/openharmony-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz",
+ "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "openharmony"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz",
+ "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz",
+ "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz",
+ "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz",
+ "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=18"
}
},
"node_modules/@eslint-community/eslint-utils": {
@@ -2054,9 +2371,9 @@
}
},
"node_modules/@eslint/config-helpers": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.6.0.tgz",
- "integrity": "sha512-ii6Bw9jJ2zi2cWA2Z+9/QZ/+3DX6kwaV5Q986D/CdP3Lap3w/pgQZ373FV7byY/i7L4IRH/G43I5dz1ClsCbpA==",
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz",
+ "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
@@ -2185,9 +2502,9 @@
"license": "MIT"
},
"node_modules/@fontsource-variable/jetbrains-mono": {
- "version": "5.2.8",
- "resolved": "https://registry.npmjs.org/@fontsource-variable/jetbrains-mono/-/jetbrains-mono-5.2.8.tgz",
- "integrity": "sha512-WBA9elru6Jdp5df2mES55wuOO0WIrn3kpXnI4+W2ek5u3ZgLS9XS4gmIlcQhiZOWEKl95meYdvK7xI+ETLCq/Q==",
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/@fontsource-variable/jetbrains-mono/-/jetbrains-mono-5.3.0.tgz",
+ "integrity": "sha512-F32xpS2NsGYoQi2ADSkKTgpJj7ozajsGgDJ8woTnqjmIB+dxDIqImjl4pXZVEExu8UFZ2ndhmX18EBS/hdz3Lw==",
"dev": true,
"license": "OFL-1.1",
"funding": {
@@ -2195,9 +2512,9 @@
}
},
"node_modules/@fontsource/fira-code": {
- "version": "5.2.7",
- "resolved": "https://registry.npmjs.org/@fontsource/fira-code/-/fira-code-5.2.7.tgz",
- "integrity": "sha512-tnB9NNund9TwIym8/7DMJe573nlPEQb+fKUV5GL8TBYXjIhDvL0D7mgmNVNQUPhXp+R7RylQeiBdkA4EbOHPGQ==",
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/@fontsource/fira-code/-/fira-code-5.3.0.tgz",
+ "integrity": "sha512-EJL968RJRkakubAj/coU8pSUaeTE5UNoRjtzAr6kGiSZ3jWuN8/AKWHwym/PFUaQL1q7IL/H+EXs4358YhrTBQ==",
"dev": true,
"license": "OFL-1.1",
"funding": {
@@ -2205,9 +2522,9 @@
}
},
"node_modules/@fontsource/jetbrains-mono": {
- "version": "5.2.8",
- "resolved": "https://registry.npmjs.org/@fontsource/jetbrains-mono/-/jetbrains-mono-5.2.8.tgz",
- "integrity": "sha512-6w8/SG4kqvIMu7xd7wt6x3idn1Qux3p9N62s6G3rfldOUYHpWcc2FKrqf+Vo44jRvqWj2oAtTHrZXEP23oSKwQ==",
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/@fontsource/jetbrains-mono/-/jetbrains-mono-5.3.0.tgz",
+ "integrity": "sha512-fqDfB5I9f1p1TV486aUgB9t8zP84P0O1FtQR5Ol9vjwPy+S+EIGlVYm1cvj2W5shcZMTg2nZFdVMoH5wFu8a1A==",
"dev": true,
"license": "OFL-1.1",
"funding": {
@@ -2215,9 +2532,9 @@
}
},
"node_modules/@fontsource/source-code-pro": {
- "version": "5.2.7",
- "resolved": "https://registry.npmjs.org/@fontsource/source-code-pro/-/source-code-pro-5.2.7.tgz",
- "integrity": "sha512-7papq9TH94KT+S5VSY8cU7tFmwuGkIe3qxXRMscuAXH6AjMU+KJI75f28FzgBVDrlMfA0jjlTV4/x5+H5o/5EQ==",
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/@fontsource/source-code-pro/-/source-code-pro-5.3.0.tgz",
+ "integrity": "sha512-JxaCODU69HDS3mVra9u96nyBF911La6IvtGLgpQD+PZLxJ1i9IxooNfLR6Y37kx06IFjVGkvoUmg3WPwh/8gBg==",
"dev": true,
"license": "OFL-1.1",
"funding": {
@@ -2323,7 +2640,6 @@
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz",
"integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">=18"
@@ -2336,7 +2652,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -2359,7 +2674,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -2379,7 +2693,6 @@
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.3.tgz",
"integrity": "sha512-lUxcqWIj2wMQ9BrwNjngcr1gWUr5xgaGThBRqPPalIC2n67Cqj1uPh8NnA/ZhAg8hUbKl+kVHKwgUIwe6ZYPrg==",
- "dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -2402,7 +2715,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -2419,7 +2731,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -2436,7 +2747,6 @@
"cpu": [
"arm"
],
- "dev": true,
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -2453,7 +2763,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -2470,7 +2779,6 @@
"cpu": [
"ppc64"
],
- "dev": true,
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -2487,7 +2795,6 @@
"cpu": [
"riscv64"
],
- "dev": true,
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -2504,7 +2811,6 @@
"cpu": [
"s390x"
],
- "dev": true,
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -2521,7 +2827,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -2538,7 +2843,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -2555,7 +2859,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -2572,7 +2875,6 @@
"cpu": [
"arm"
],
- "dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -2595,7 +2897,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -2618,7 +2919,6 @@
"cpu": [
"ppc64"
],
- "dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -2641,7 +2941,6 @@
"cpu": [
"riscv64"
],
- "dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -2664,7 +2963,6 @@
"cpu": [
"s390x"
],
- "dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -2687,7 +2985,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -2710,7 +3007,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -2733,7 +3029,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "Apache-2.0",
"optional": true,
"os": [
@@ -2753,7 +3048,6 @@
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.35.3.tgz",
"integrity": "sha512-cZ0XkcYGpHZkqW6iCkqTcmUC0CD9DhD5d/qeZlZkfRBn6GnHniZXLUo5+9xw8Iv76YE6LQFN9YNBlKREcCG76w==",
- "dev": true,
"license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT",
"optional": true,
"dependencies": {
@@ -2770,7 +3064,6 @@
"version": "1.11.2",
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.2.tgz",
"integrity": "sha512-kyOl3X0DuTiT1h2ft8r2fYO8JYtU9a9Xis/zBSiGArNaagCOWx90N1k2wxp18czFDH+OgcWGb5ZP/XMt3dcyPA==",
- "dev": true,
"license": "MIT",
"optional": true,
"dependencies": {
@@ -2784,7 +3077,6 @@
"cpu": [
"wasm32"
],
- "dev": true,
"license": "Apache-2.0",
"optional": true,
"dependencies": {
@@ -2804,7 +3096,6 @@
"cpu": [
"arm64"
],
- "dev": true,
"license": "Apache-2.0 AND LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -2824,7 +3115,6 @@
"cpu": [
"ia32"
],
- "dev": true,
"license": "Apache-2.0 AND LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -2844,7 +3134,6 @@
"cpu": [
"x64"
],
- "dev": true,
"license": "Apache-2.0 AND LGPL-3.0-or-later",
"optional": true,
"os": [
@@ -3574,25 +3863,6 @@
"url": "https://github.com/sponsors/Brooooooklyn"
}
},
- "node_modules/@napi-rs/wasm-runtime": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz",
- "integrity": "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "@tybys/wasm-util": "^0.10.1"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/Brooooooklyn"
- },
- "peerDependencies": {
- "@emnapi/core": "^1.7.1",
- "@emnapi/runtime": "^1.7.1"
- }
- },
"node_modules/@noble/hashes": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.2.0.tgz",
@@ -3607,9 +3877,9 @@
}
},
"node_modules/@oxc-project/types": {
- "version": "0.133.0",
- "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.133.0.tgz",
- "integrity": "sha512-KzkdCd6Uxqnf6l3HOw1xfatAlUURA0g14cvBYFyJ5SaNOQbOUvBr9PKArcPcrNIeRsBdgcUzOGrhKveVpvOIGA==",
+ "version": "0.143.0",
+ "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.143.0.tgz",
+ "integrity": "sha512-u6JZdLBTLotrNC9Vd6vPssINdzcCzleKAH6EJKImQb7GtYvX5keN2dxkoK44stCc4tffE6QQRtZTXVSzsLUlWA==",
"dev": true,
"license": "MIT",
"funding": {
@@ -3822,27 +4092,27 @@
"license": "MIT"
},
"node_modules/@radix-ui/number": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.2.tgz",
- "integrity": "sha512-ceTwaxc4I5IOi97DgCotl3pqiyRGvffcc0oOsE2dQYaJOFIDsDt4VWG6xEbg1QePv9QWausCEIppud/tJ1wNig==",
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.3.tgz",
+ "integrity": "sha512-Road2bidD0uu/1BGDOWNdPI06g0lIRy6IF9GZcIrDK2KGItfor8IQwQa+yM2ERgHM1MmHxaxpTzk0/Jp42lNfA==",
"dev": true,
"license": "MIT"
},
"node_modules/@radix-ui/primitive": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.4.tgz",
- "integrity": "sha512-7AdCK9PQyiljKoBDbN8OuctCbd/esdwZPQ8RtOE3SsyQtUpiPb+ND75q0jEhC1m1ecBI0MFNeLJvwIh9iKHRcQ==",
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.7.tgz",
+ "integrity": "sha512-rqWnm76nYT8HoNNqEjpgJ7Pw/DrBj5iBTrmEPo6HTX5+VJyBNOqTdv4g89G63HuR5g0AaENoAcH7Is5fF2kZ8Q==",
"dev": true,
"license": "MIT"
},
"node_modules/@radix-ui/react-accessible-icon": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-accessible-icon/-/react-accessible-icon-1.1.11.tgz",
- "integrity": "sha512-HQDOFTKwSnmUij6l54wYJJtxTAnxI71+YJLOrjm2ladFB8HAV5Jt7hwaZPhWTGBkYoW4+ZAOfNZrLDh/qvxSYA==",
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-accessible-icon/-/react-accessible-icon-1.1.15.tgz",
+ "integrity": "sha512-WTQwcAvQf5sOcuUyi90lKPbhwcvQ+j55cjrSmeaN+L2vKU3DooOvlKw2MDeiJ5IkV5N905KW0/fGojKOBhD11A==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-visually-hidden": "1.2.7"
+ "@radix-ui/react-visually-hidden": "1.2.11"
},
"peerDependencies": {
"@types/react": "*",
@@ -3860,21 +4130,21 @@
}
},
"node_modules/@radix-ui/react-accordion": {
- "version": "1.2.15",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.2.15.tgz",
- "integrity": "sha512-24Zz/0SYx8F2bSVThBnQrdJs2VbKelyuJordcFRRdA0fRAhrq/wSegGCqaQz34VQoiWqSMGYCYXEhynLSlyQlg==",
+ "version": "1.2.20",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-accordion/-/react-accordion-1.2.20.tgz",
+ "integrity": "sha512-jDhG9FvAEnlhnjrsINbNXcUa4G+L1KqSkJSunkbKEzFRcAb52jvM0PjPxPRvhe1HNc5F5yc0yzzWeeqlH4yBIg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-collapsible": "1.1.15",
- "@radix-ui/react-collection": "1.1.11",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-direction": "1.1.2",
- "@radix-ui/react-id": "1.1.2",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-controllable-state": "1.2.3"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-collapsible": "1.1.20",
+ "@radix-ui/react-collection": "1.1.15",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-direction": "1.1.4",
+ "@radix-ui/react-id": "1.1.4",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-controllable-state": "1.2.6"
},
"peerDependencies": {
"@types/react": "*",
@@ -3892,17 +4162,17 @@
}
},
"node_modules/@radix-ui/react-alert-dialog": {
- "version": "1.1.18",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-alert-dialog/-/react-alert-dialog-1.1.18.tgz",
- "integrity": "sha512-6c2cXpNlAgHDhKguK24XcWHHayMpK+lk7/WwBXBco+ZJ4Dv7xP++GBM280KgTD/HCRu3jSdfe8WQiZssonYaIA==",
+ "version": "1.1.23",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-alert-dialog/-/react-alert-dialog-1.1.23.tgz",
+ "integrity": "sha512-VAYOiQRqj3GPpYJE0I9J+X8Ip05cyVlNdKOFeiGS2Ou1HHGfpl0BxOyZm6nmVDyU+W+NF3/XLzmjHmVGydhwgA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-dialog": "1.1.18",
- "@radix-ui/react-primitive": "2.1.7"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-dialog": "1.1.23",
+ "@radix-ui/react-primitive": "2.1.10"
},
"peerDependencies": {
"@types/react": "*",
@@ -3920,13 +4190,13 @@
}
},
"node_modules/@radix-ui/react-arrow": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.11.tgz",
- "integrity": "sha512-Kdil9BB1rIFC/khmf4hC35bn8701AJcizTU7G7cUbEbk5XqqbjDuHW60uUfKqO5WojjZcbAW51Q7P0hRmMLw8A==",
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.15.tgz",
+ "integrity": "sha512-v4zggRcjadnI+ClKDuijlQEW4tw3NoaeHc/PwpKnLoLLKNUG4InLegkstooLcRIUWCs+8L22dGURCVuFfOKfnA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-primitive": "2.1.7"
+ "@radix-ui/react-primitive": "2.1.10"
},
"peerDependencies": {
"@types/react": "*",
@@ -3944,13 +4214,13 @@
}
},
"node_modules/@radix-ui/react-aspect-ratio": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-aspect-ratio/-/react-aspect-ratio-1.1.11.tgz",
- "integrity": "sha512-IUAhIVpBUvP5NNICjlaB1OFmtRLGqQqTF3ZOSGPoq3XeLXRFtHiWTRxSVEULgOd9GQR2c7tsYqDnhUennapZnw==",
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-aspect-ratio/-/react-aspect-ratio-1.1.15.tgz",
+ "integrity": "sha512-fy+dyVR+90nelK8rqIznFlxzx7uPcGbhxH8Nfr2bHb4UfSe+e3hklOC0luK0hDwVwnRX7xTRySpsrQVeW+/oNQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-primitive": "2.1.7"
+ "@radix-ui/react-primitive": "2.1.10"
},
"peerDependencies": {
"@types/react": "*",
@@ -3968,17 +4238,18 @@
}
},
"node_modules/@radix-ui/react-avatar": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-avatar/-/react-avatar-1.2.1.tgz",
- "integrity": "sha512-+8PWoLLZv3AVb5m0pvoiOca/bQGzc9vPVb+982HB2x3Un0DpYEPM3zLMl4oqRpBsocJuNqLkiv/HXTnTrlwr4g==",
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-avatar/-/react-avatar-1.2.6.tgz",
+ "integrity": "sha512-4ULOTJ/mqy2hT9GlWa/MFHxHSvH3nJzHnZM1waNsc5Bonv7i70aNenghXmD97S6OJ81ekXONGGt4nT1r0PfEdA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-callback-ref": "1.1.2",
- "@radix-ui/react-use-is-hydrated": "0.1.1",
- "@radix-ui/react-use-layout-effect": "1.1.2"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-callback-ref": "1.1.4",
+ "@radix-ui/react-use-is-hydrated": "0.1.3",
+ "@radix-ui/react-use-layout-effect": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -3996,20 +4267,19 @@
}
},
"node_modules/@radix-ui/react-checkbox": {
- "version": "1.3.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.3.6.tgz",
- "integrity": "sha512-eUEUoGMDpfkgHWSE97ZZaUJtzR1M7EKnNIpD1Q16+8JR9NWghcaqMulx9PuCQ720w0UclfYn6FEbCdd5Hx087g==",
+ "version": "1.3.11",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.3.11.tgz",
+ "integrity": "sha512-Gnptr9pDDQxD3hgq2dtPbtrp/c2qH1mBwIzw3X/ivrMb2e1t0jMTi606fVEqFPaQR1ggXIVQWKj3P2WW9v7zGQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-presence": "1.1.6",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-controllable-state": "1.2.3",
- "@radix-ui/react-use-previous": "1.1.2",
- "@radix-ui/react-use-size": "1.1.2"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-presence": "1.1.10",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-controllable-state": "1.2.6",
+ "@radix-ui/react-use-size": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -4027,20 +4297,20 @@
}
},
"node_modules/@radix-ui/react-collapsible": {
- "version": "1.1.15",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.1.15.tgz",
- "integrity": "sha512-8A1zibu5skAQ+UVbaeNH5hVMibiFCRJzgMuM14LTWGttnTZKQL9jwYnhAbHRuxrtCqPXa4JvvnVUq1pTNgyZYw==",
+ "version": "1.1.20",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collapsible/-/react-collapsible-1.1.20.tgz",
+ "integrity": "sha512-mcGesGplBnzN2sbvJETzpCNfSMyPnb29q1GRLU+Ib7bJrpIG2ywmRoh2V5VbA2uNvKikKUlVbAPks7JDjz4A8Q==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-id": "1.1.2",
- "@radix-ui/react-presence": "1.1.6",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-controllable-state": "1.2.3",
- "@radix-ui/react-use-layout-effect": "1.1.2"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-id": "1.1.4",
+ "@radix-ui/react-presence": "1.1.10",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-controllable-state": "1.2.6",
+ "@radix-ui/react-use-layout-effect": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -4058,16 +4328,16 @@
}
},
"node_modules/@radix-ui/react-collection": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.11.tgz",
- "integrity": "sha512-djW9+zeg137KQdlPtmE8xnaD+K2rcXXMWFrSg0hsmYZ6HRbdTA7tDHFgpaW9+huWVEu0RCabL+985T4TA0BE7g==",
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.15.tgz",
+ "integrity": "sha512-9W+B9NPF0NaaPh/1NJd3+KqsnlLqU9H7T2rvww+fp+T/evVXdNAyYcnfRQZFOjkR1ajQp3yORlqnI8soawLvNA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-slot": "1.3.0"
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-slot": "1.3.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -4085,9 +4355,9 @@
}
},
"node_modules/@radix-ui/react-compose-refs": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.3.tgz",
- "integrity": "sha512-rYOP8OMnuuPMQF1uhPVlGNcCDlkokKqGFE3JcxFViIkAXP7EvFWUliJAstrapypaBLJNHbZL6jGhbVDGTwmVhA==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.5.tgz",
+ "integrity": "sha512-+48PbAAbq3didjJxa+OaWY2ZwgAKsNiRGyeHKszblZMQ+kcpd9pAaT11cMkGEie0vsOi3QdeTE6d5Fe3Gn61kA==",
"dev": true,
"license": "MIT",
"peerDependencies": {
@@ -4101,9 +4371,9 @@
}
},
"node_modules/@radix-ui/react-context": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.1.4.tgz",
- "integrity": "sha512-QwH4PO5urrbO+FaGd5Aglg+YJgWTyyuZ3g/6mKvsqraLkglDdckw9JafgL5McL5VEJ6EPNduPaT3ZE9BttDAqg==",
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.2.2.tgz",
+ "integrity": "sha512-RHCUGwKHDr0hDGg4X7ma4JG4/+12qxw8rkh5QKdDldlCvtja6nUx1Ef/8HVrJze81lEsgLQlqjzjGNHantgnQA==",
"dev": true,
"license": "MIT",
"peerDependencies": {
@@ -4117,17 +4387,17 @@
}
},
"node_modules/@radix-ui/react-context-menu": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-context-menu/-/react-context-menu-2.3.2.tgz",
- "integrity": "sha512-qzsA/ZPhF6yMxBOTIk1nlCkoy2mswSbwYL+ErBa2iP0s4WWrlxmczArYqMcpVfEjmM7KJj/ADPXky0yZfbSxtQ==",
+ "version": "2.3.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-context-menu/-/react-context-menu-2.3.7.tgz",
+ "integrity": "sha512-CtXP35dxaB5T3zXSd+E3uHe/QpXcpYnZmxp6OaIbfthtfW4wyb77M23BG+bwIJDtsMwEP/YssdsmNyZu7jhWew==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-menu": "2.1.19",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-controllable-state": "1.2.3"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-menu": "2.1.24",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-controllable-state": "1.2.6"
},
"peerDependencies": {
"@types/react": "*",
@@ -4145,24 +4415,25 @@
}
},
"node_modules/@radix-ui/react-dialog": {
- "version": "1.1.18",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.18.tgz",
- "integrity": "sha512-apa28mldjMgORmE6g/w3sCcA0Y9UAVeeDVoozN4i7kOw12mLl9RBchfzK3Nn6qxOWjrZhK1Lfy7f07kyzxtnBw==",
+ "version": "1.1.23",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.23.tgz",
+ "integrity": "sha512-Ksw4WeROkO4rC9k/onilX/Ao2Cr1ku1unMNH+XSCcP4jSXYu7HDsg9n4ojMjVb22XpYjAQ9qfrFlVbru1vXDUA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-dismissable-layer": "1.1.14",
- "@radix-ui/react-focus-guards": "1.1.4",
- "@radix-ui/react-focus-scope": "1.1.11",
- "@radix-ui/react-id": "1.1.2",
- "@radix-ui/react-portal": "1.1.13",
- "@radix-ui/react-presence": "1.1.6",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-slot": "1.3.0",
- "@radix-ui/react-use-controllable-state": "1.2.3",
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-dismissable-layer": "1.1.19",
+ "@radix-ui/react-focus-guards": "1.1.6",
+ "@radix-ui/react-focus-scope": "1.1.16",
+ "@radix-ui/react-id": "1.1.4",
+ "@radix-ui/react-portal": "1.1.17",
+ "@radix-ui/react-presence": "1.1.10",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-slot": "1.3.3",
+ "@radix-ui/react-use-controllable-state": "1.2.6",
+ "@radix-ui/react-use-layout-effect": "1.1.4",
"aria-hidden": "^1.2.4",
"react-remove-scroll": "^2.7.2"
},
@@ -4182,9 +4453,9 @@
}
},
"node_modules/@radix-ui/react-direction": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.2.tgz",
- "integrity": "sha512-C3vFhbyi4SW3PmbAi6Awpu4OzJtd0MxGurvSsYtr7p7nM8RNB3VAF3CUmnp2j50knpkrRcB7+ycVXzgLgF6yNA==",
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.4.tgz",
+ "integrity": "sha512-5pzg4FGQNpExhnhT2zlrP1wZFaYCd1K0nYWoFAdcYoYK868IEigqMX3B3f8yIoRlAhAeDWciLI6ZdCKHF9P4Vg==",
"dev": true,
"license": "MIT",
"peerDependencies": {
@@ -4198,17 +4469,17 @@
}
},
"node_modules/@radix-ui/react-dismissable-layer": {
- "version": "1.1.14",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.14.tgz",
- "integrity": "sha512-4lUhWTWAjbDIqFrAPWJ3WqBOpO5YchVZ88X3nh6H9Lu5AFi5nCUeTPj3D8FSDmabmFeRe9ME0BDA4MwKTha5GQ==",
+ "version": "1.1.19",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.19.tgz",
+ "integrity": "sha512-8g4pfOL9HoKKLWGiypT+dphVqjFfmcXO5GBnhsG6zI+lxAx/8feQpr+1LSN8Re3hiZ+XkLNS4O9ztK11/LzQ6w==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-callback-ref": "1.1.2",
- "@radix-ui/react-use-effect-event": "0.0.3"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-callback-ref": "1.1.4",
+ "@radix-ui/react-use-effect-event": "0.0.5"
},
"peerDependencies": {
"@types/react": "*",
@@ -4226,19 +4497,19 @@
}
},
"node_modules/@radix-ui/react-dropdown-menu": {
- "version": "2.1.19",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.19.tgz",
- "integrity": "sha512-HZccBkbK0LOi8nYKIp5jll/zIRW0cCOmG6WWyqsSpmXCU+ZlcBbTqIwlBvPCu886C5RVu6c/kHV7xSP8IgYNHw==",
+ "version": "2.1.24",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.24.tgz",
+ "integrity": "sha512-geq8l2rJkxvkXsT9RMgtUE3P8pITFpTsvYpbySi1IH4fZEABD/Gp85myayFgxk0ktljGMJnCbeFkyTusvSvv7g==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-id": "1.1.2",
- "@radix-ui/react-menu": "2.1.19",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-controllable-state": "1.2.3"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-id": "1.1.4",
+ "@radix-ui/react-menu": "2.1.24",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-controllable-state": "1.2.6"
},
"peerDependencies": {
"@types/react": "*",
@@ -4256,9 +4527,9 @@
}
},
"node_modules/@radix-ui/react-focus-guards": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.4.tgz",
- "integrity": "sha512-cot/aB/mOm0IYVYTTmQcEEK1M48lZWi8FlYe5nDPQQ8NYZUlXEFgncJ9p2Kzer3RKSrY7cTTpEMLZKNo9QoP5Q==",
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.6.tgz",
+ "integrity": "sha512-RNOJjfZMTyBM6xYmV3IVGXkPjIhcBAuv48POevAXwrGJhkWZ9p1rFoIS1JFooPuT193AZmRsCPhpoVJxx6OPoQ==",
"dev": true,
"license": "MIT",
"peerDependencies": {
@@ -4272,15 +4543,15 @@
}
},
"node_modules/@radix-ui/react-focus-scope": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.11.tgz",
- "integrity": "sha512-Mn88Vg2whaRocGJNOH+DKFqYm6ySFPQaiwHNxZPyjn99B52KAEJWWY9NP83+nWdk2HM3rdov+STu9AG471Rt9w==",
+ "version": "1.1.16",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.16.tgz",
+ "integrity": "sha512-wmRZ2WWLvmt6KHy2rNPOdPUjwq5xOHY02+m+udwJTn0aNIox/rkskAvJTyTLGhPK6KgrUjlJUJpgmx/+wFiFIQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-callback-ref": "1.1.2"
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-callback-ref": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -4298,18 +4569,18 @@
}
},
"node_modules/@radix-ui/react-form": {
- "version": "0.1.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-form/-/react-form-0.1.11.tgz",
- "integrity": "sha512-0mTMJHv1gQAuEQoq5VDpTD3MRgmfUFdXAVFhpqR7wBeUr+tyRsof0wv/4XdPHLwQrefhoH2FiGHCggrCJhalIw==",
+ "version": "0.1.16",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-form/-/react-form-0.1.16.tgz",
+ "integrity": "sha512-Q4TLEn2A7TAypxwmd6R9EwrlXDvkfYSDMrq9/887AXAGh+G1rH+kYJKSTv+Si9Y0JPKTwKYv6PviAJosysNimA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-id": "1.1.2",
- "@radix-ui/react-label": "2.1.11",
- "@radix-ui/react-primitive": "2.1.7"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-id": "1.1.4",
+ "@radix-ui/react-label": "2.1.15",
+ "@radix-ui/react-primitive": "2.1.10"
},
"peerDependencies": {
"@types/react": "*",
@@ -4327,21 +4598,21 @@
}
},
"node_modules/@radix-ui/react-hover-card": {
- "version": "1.1.18",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-hover-card/-/react-hover-card-1.1.18.tgz",
- "integrity": "sha512-rt+Fx4HoCeEwFL2IdoV2QaPltqDLlzxN77i9nwB3Y70scFlfAHh1QCdE2TXKuFJtA1TNygb0oivnFBZifgtZOw==",
+ "version": "1.1.23",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-hover-card/-/react-hover-card-1.1.23.tgz",
+ "integrity": "sha512-H8qONfZd3ltrU3+jHCIgITbWo6e1iTKvP9DHdrvYbX48ooRM5FjEDTn16AMwdfuOGkWdZEhpl3PLL/Wk/AnHDQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-dismissable-layer": "1.1.14",
- "@radix-ui/react-popper": "1.3.2",
- "@radix-ui/react-portal": "1.1.13",
- "@radix-ui/react-presence": "1.1.6",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-controllable-state": "1.2.3"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-dismissable-layer": "1.1.19",
+ "@radix-ui/react-popper": "1.3.7",
+ "@radix-ui/react-portal": "1.1.17",
+ "@radix-ui/react-presence": "1.1.10",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-controllable-state": "1.2.6"
},
"peerDependencies": {
"@types/react": "*",
@@ -4359,13 +4630,13 @@
}
},
"node_modules/@radix-ui/react-id": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.2.tgz",
- "integrity": "sha512-orBC88futVpqCmhX1p4cvquNHsELQ+w+vBJnuj3ftETI5bJb0bZn3Tqu3SWN2IOcPycTnMGnhwoermvISt72sA==",
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.4.tgz",
+ "integrity": "sha512-TMQp2llA+RYn7JcjnrMnz7wN4pcVttPZnRZo52PLQsoLVKzNlVwUeHmfePgTgRluXFvlD3GD5g5MOVVTJCO0qA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-use-layout-effect": "1.1.2"
+ "@radix-ui/react-use-layout-effect": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -4378,13 +4649,13 @@
}
},
"node_modules/@radix-ui/react-label": {
- "version": "2.1.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.1.11.tgz",
- "integrity": "sha512-3PKvDDxOn62k0oV1n4QtNtD2vpu+zYjXR7ojLBPaO6SPvhy53yg0vAmgNeBQeJW5rV3dffoRG+HYfLBZuzw0CQ==",
+ "version": "2.1.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-label/-/react-label-2.1.15.tgz",
+ "integrity": "sha512-o/rdYEwZTTo5tjknnPeyQFU45kUC4i/XyeDPP+HGyi6XqpOP6Zf5Ya5vh/Yfe9Id5JiuWnnAx2XqIeD3UYZt0g==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-primitive": "2.1.7"
+ "@radix-ui/react-primitive": "2.1.10"
},
"peerDependencies": {
"@types/react": "*",
@@ -4402,28 +4673,28 @@
}
},
"node_modules/@radix-ui/react-menu": {
- "version": "2.1.19",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.1.19.tgz",
- "integrity": "sha512-Mht9BVd1AIsNFVQr4KG3bIK7XQn5IXF0TL/2ObsrzOdc1loaly/+kBDL5roSCYn8j8XZkvpOD0WYLz2FQtH1Eg==",
+ "version": "2.1.24",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.1.24.tgz",
+ "integrity": "sha512-uW7RVuU6Lp/ZtfeY4b3kL32zccgEWvPv1+cf17ubYzHa9cL8AHokmk36cG/XEiH/smbQvumnieXX9j/e9RqJWA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-collection": "1.1.11",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-direction": "1.1.2",
- "@radix-ui/react-dismissable-layer": "1.1.14",
- "@radix-ui/react-focus-guards": "1.1.4",
- "@radix-ui/react-focus-scope": "1.1.11",
- "@radix-ui/react-id": "1.1.2",
- "@radix-ui/react-popper": "1.3.2",
- "@radix-ui/react-portal": "1.1.13",
- "@radix-ui/react-presence": "1.1.6",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-roving-focus": "1.1.14",
- "@radix-ui/react-slot": "1.3.0",
- "@radix-ui/react-use-callback-ref": "1.1.2",
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-collection": "1.1.15",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-direction": "1.1.4",
+ "@radix-ui/react-dismissable-layer": "1.1.19",
+ "@radix-ui/react-focus-guards": "1.1.6",
+ "@radix-ui/react-focus-scope": "1.1.16",
+ "@radix-ui/react-id": "1.1.4",
+ "@radix-ui/react-popper": "1.3.7",
+ "@radix-ui/react-portal": "1.1.17",
+ "@radix-ui/react-presence": "1.1.10",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-roving-focus": "1.1.19",
+ "@radix-ui/react-slot": "1.3.3",
+ "@radix-ui/react-use-callback-ref": "1.1.4",
"aria-hidden": "^1.2.4",
"react-remove-scroll": "^2.7.2"
},
@@ -4443,22 +4714,22 @@
}
},
"node_modules/@radix-ui/react-menubar": {
- "version": "1.1.19",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-menubar/-/react-menubar-1.1.19.tgz",
- "integrity": "sha512-Glt6mebxcgQvLeVkH3HiqV5bgQubE+31ELxLs7q0GlYI5k0XYkOkeuPrhXoylxK8eufvIt9CJjzY1TfFMXK3qw==",
+ "version": "1.1.24",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-menubar/-/react-menubar-1.1.24.tgz",
+ "integrity": "sha512-eeVs0vf7cuqXaM0qLQCPcufImiJNVBXdJDLu7ZGYl2732UH23Qat/foNGrr6vYV3/DdTsBqASoggUFgH14OcZA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-collection": "1.1.11",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-direction": "1.1.2",
- "@radix-ui/react-id": "1.1.2",
- "@radix-ui/react-menu": "2.1.19",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-roving-focus": "1.1.14",
- "@radix-ui/react-use-controllable-state": "1.2.3"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-collection": "1.1.15",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-direction": "1.1.4",
+ "@radix-ui/react-id": "1.1.4",
+ "@radix-ui/react-menu": "2.1.24",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-roving-focus": "1.1.19",
+ "@radix-ui/react-use-controllable-state": "1.2.6"
},
"peerDependencies": {
"@types/react": "*",
@@ -4476,26 +4747,26 @@
}
},
"node_modules/@radix-ui/react-navigation-menu": {
- "version": "1.2.17",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-navigation-menu/-/react-navigation-menu-1.2.17.tgz",
- "integrity": "sha512-fYeYQvbeNn5AQk2RBbpO7koLm2YbS00UYxC/IL2sgLlninEH5UNIv+X3E0KJ1Vy4WIo+dhN9w8GNqSHhbHWCIg==",
+ "version": "1.2.22",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-navigation-menu/-/react-navigation-menu-1.2.22.tgz",
+ "integrity": "sha512-ou7iLEJ+yrhQndkkA4U21XIdS/CS45F4iXIkTZcb6/Ne9EMsOuDudVmCwmDnfFZZ+y1FZqXRNSIgBy+YMvZVZg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-collection": "1.1.11",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-direction": "1.1.2",
- "@radix-ui/react-dismissable-layer": "1.1.14",
- "@radix-ui/react-id": "1.1.2",
- "@radix-ui/react-presence": "1.1.6",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-callback-ref": "1.1.2",
- "@radix-ui/react-use-controllable-state": "1.2.3",
- "@radix-ui/react-use-layout-effect": "1.1.2",
- "@radix-ui/react-use-previous": "1.1.2",
- "@radix-ui/react-visually-hidden": "1.2.7"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-collection": "1.1.15",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-direction": "1.1.4",
+ "@radix-ui/react-dismissable-layer": "1.1.19",
+ "@radix-ui/react-id": "1.1.4",
+ "@radix-ui/react-presence": "1.1.10",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-callback-ref": "1.1.4",
+ "@radix-ui/react-use-controllable-state": "1.2.6",
+ "@radix-ui/react-use-layout-effect": "1.1.4",
+ "@radix-ui/react-use-previous": "1.1.4",
+ "@radix-ui/react-visually-hidden": "1.2.11"
},
"peerDependencies": {
"@types/react": "*",
@@ -4513,24 +4784,24 @@
}
},
"node_modules/@radix-ui/react-one-time-password-field": {
- "version": "0.1.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-one-time-password-field/-/react-one-time-password-field-0.1.11.tgz",
- "integrity": "sha512-Rsgab65u73E5kPVh8OS6PgPwJgPyf08GFfJDGAbMdF4DL7CgDhFOaDnXuk/DiMEVF6kgQwl0oJmFklvipmiOLg==",
+ "version": "0.1.16",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-one-time-password-field/-/react-one-time-password-field-0.1.16.tgz",
+ "integrity": "sha512-Tj9P6ntAJEw52oq/F0AGknXR4XncxEt7XU47O3xJQOiWfLzEy3d9gtgKfvjSzGxzHkfL+VzvxGu2KTFsloJqXw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/number": "1.1.2",
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-collection": "1.1.11",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-direction": "1.1.2",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-roving-focus": "1.1.14",
- "@radix-ui/react-use-controllable-state": "1.2.3",
- "@radix-ui/react-use-effect-event": "0.0.3",
- "@radix-ui/react-use-is-hydrated": "0.1.1",
- "@radix-ui/react-use-layout-effect": "1.1.2"
+ "@radix-ui/number": "1.1.3",
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-collection": "1.1.15",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-direction": "1.1.4",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-roving-focus": "1.1.19",
+ "@radix-ui/react-use-controllable-state": "1.2.6",
+ "@radix-ui/react-use-effect-event": "0.0.5",
+ "@radix-ui/react-use-is-hydrated": "0.1.3",
+ "@radix-ui/react-use-layout-effect": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -4548,20 +4819,20 @@
}
},
"node_modules/@radix-ui/react-password-toggle-field": {
- "version": "0.1.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-password-toggle-field/-/react-password-toggle-field-0.1.6.tgz",
- "integrity": "sha512-pQ3xGp/uemomASPH97Eb3shfXX8QlG11bBJyEvRBV+vwtO4HvQlS06Yj9f31Ao7XepvF98SFrRgVDQ7jv+2xjQ==",
+ "version": "0.1.11",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-password-toggle-field/-/react-password-toggle-field-0.1.11.tgz",
+ "integrity": "sha512-4gvFnmDXu3dgj21CqsufzIameRvlRd4SBqaWhcrlrNhRo0Y5i/49AmRJYe1fdAM3G2VNBbmin4b0D6cdQocwgw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-id": "1.1.2",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-controllable-state": "1.2.3",
- "@radix-ui/react-use-effect-event": "0.0.3",
- "@radix-ui/react-use-is-hydrated": "0.1.1"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-id": "1.1.4",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-controllable-state": "1.2.6",
+ "@radix-ui/react-use-effect-event": "0.0.5",
+ "@radix-ui/react-use-is-hydrated": "0.1.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -4579,25 +4850,25 @@
}
},
"node_modules/@radix-ui/react-popover": {
- "version": "1.1.18",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.18.tgz",
- "integrity": "sha512-qdXDes+eHlnMUGlBAAAe5EG7oOQvqsXuq4mq585diMudg80iB+jHbsSeG3+Q4eWNsogNyhqU2p/3i+Y0iEepqg==",
+ "version": "1.1.23",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popover/-/react-popover-1.1.23.tgz",
+ "integrity": "sha512-mw58MrBlyHWFisTOYignD0vf/3gdcgAR+9of1s9G/38CbFiUwH1nCDkc0AUM9IrXFgN5Ue8n45j9WCgyM1sbiQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-dismissable-layer": "1.1.14",
- "@radix-ui/react-focus-guards": "1.1.4",
- "@radix-ui/react-focus-scope": "1.1.11",
- "@radix-ui/react-id": "1.1.2",
- "@radix-ui/react-popper": "1.3.2",
- "@radix-ui/react-portal": "1.1.13",
- "@radix-ui/react-presence": "1.1.6",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-slot": "1.3.0",
- "@radix-ui/react-use-controllable-state": "1.2.3",
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-dismissable-layer": "1.1.19",
+ "@radix-ui/react-focus-guards": "1.1.6",
+ "@radix-ui/react-focus-scope": "1.1.16",
+ "@radix-ui/react-id": "1.1.4",
+ "@radix-ui/react-popper": "1.3.7",
+ "@radix-ui/react-portal": "1.1.17",
+ "@radix-ui/react-presence": "1.1.10",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-slot": "1.3.3",
+ "@radix-ui/react-use-controllable-state": "1.2.6",
"aria-hidden": "^1.2.4",
"react-remove-scroll": "^2.7.2"
},
@@ -4617,22 +4888,22 @@
}
},
"node_modules/@radix-ui/react-popper": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.3.2.tgz",
- "integrity": "sha512-3QXNeMkdshed1MR3LNoiCirBywRFPkD8ETJa/HlPuLwSajaQixf2ro+isoDNJlGABg9ug41XuZpINZJIle4XWg==",
+ "version": "1.3.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.3.7.tgz",
+ "integrity": "sha512-UsJrrd7w4wuKKTdvd/DNERVlwSlUcyXzjhyDwBk+3aPOsCjOY6ZSbxuw8E6lZTjjfP8Cpd0J8VVkrYUWyGYXyg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@floating-ui/react-dom": "^2.0.0",
- "@radix-ui/react-arrow": "1.1.11",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-callback-ref": "1.1.2",
- "@radix-ui/react-use-layout-effect": "1.1.2",
- "@radix-ui/react-use-rect": "1.1.2",
- "@radix-ui/react-use-size": "1.1.2",
- "@radix-ui/rect": "1.1.2"
+ "@radix-ui/react-arrow": "1.1.15",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-callback-ref": "1.1.4",
+ "@radix-ui/react-use-layout-effect": "1.1.4",
+ "@radix-ui/react-use-rect": "1.1.4",
+ "@radix-ui/react-use-size": "1.1.4",
+ "@radix-ui/rect": "1.1.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -4650,14 +4921,14 @@
}
},
"node_modules/@radix-ui/react-portal": {
- "version": "1.1.13",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.13.tgz",
- "integrity": "sha512-z3oXfmaHLJTF1wktbjgD6cn9jiEbq3WSondB10LIuIt2m2Ym4iJlrW04/euMwENDdWDdE7z+OuY7Qyp1YpRSwA==",
+ "version": "1.1.17",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.17.tgz",
+ "integrity": "sha512-vKQLcWypUnwZVvfV7UkGahH2g6ySe8M8R+zYBwPrv5byZ9QAW6cQVvNKo7GgmD+p8aYb6D9JBuvy8/WhOno2wQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-layout-effect": "1.1.2"
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-layout-effect": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -4675,13 +4946,13 @@
}
},
"node_modules/@radix-ui/react-presence": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.6.tgz",
- "integrity": "sha512-zdTk4PlUO0E18HnZ3wYbW0KkJJxWCdiNYp6g6X1PtONFhxVkg01vliTJAmwIszU6mHiyBOoW9P0rAugl5/hULQ==",
+ "version": "1.1.10",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.10.tgz",
+ "integrity": "sha512-3wyzCQ6+ubRA+D4uv9m95JYLXxmOHp05qjrkjeA7uKHHtjpPggQzc6DAb0URl7j67oR0K2foO4ip27TiX037Bw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-use-layout-effect": "1.1.2"
+ "@radix-ui/react-use-layout-effect": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -4699,13 +4970,13 @@
}
},
"node_modules/@radix-ui/react-primitive": {
- "version": "2.1.7",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.7.tgz",
- "integrity": "sha512-bC3NiwsprbxKjuon9l7X6BUTw7FPVzEYaL92MPEY5SCd/9hUTPXVFtVwRix7778wtRsVao+zE062gL79FZleeQ==",
+ "version": "2.1.10",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.10.tgz",
+ "integrity": "sha512-MucOnzh6hR5mid6VpkbglRAMYMjKLqRnGBbjXkzjK52fuQDd1qbkx78a5P40mkcnVXJdEVxm26E9OPAiUq7nBg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-slot": "1.3.0"
+ "@radix-ui/react-slot": "1.3.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -4723,14 +4994,14 @@
}
},
"node_modules/@radix-ui/react-progress": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-progress/-/react-progress-1.1.11.tgz",
- "integrity": "sha512-KqiGJcFaZDc+BvveAgU3ZhACg2MvSUDrCBx4lRR/ZVRNal0bvt8lBpvnSkep9heeOuF8Qfw3fszLDX4OpQ2NVw==",
+ "version": "1.1.16",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-progress/-/react-progress-1.1.16.tgz",
+ "integrity": "sha512-5XnomAsoZZCY+KNTxbIghpGqPruZvKFNlvcAljVAOdDRDsH4/OZQxhtwo5wdtoDM5R6MhJBb2sPnDuRFep3lzg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-primitive": "2.1.7"
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-primitive": "2.1.10"
},
"peerDependencies": {
"@types/react": "*",
@@ -4748,22 +5019,21 @@
}
},
"node_modules/@radix-ui/react-radio-group": {
- "version": "1.4.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-radio-group/-/react-radio-group-1.4.2.tgz",
- "integrity": "sha512-W8Uo9riHnlzLLWy+r2mVHUyuEWqD/+be4PZzbEvaGoFSBDHkm+GYWjtcE6u3AmPKNyfanWpnVfpZ2GqPCdzzsw==",
+ "version": "1.4.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-radio-group/-/react-radio-group-1.4.7.tgz",
+ "integrity": "sha512-cgYFEkntCxppHZgtSZ+7vh0wbZQ+IC7PPMw8DSnRG27B6kDd32/Zw0OJt7dGDigCoprMuWHjg2PvUn3PYvPFoQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-direction": "1.1.2",
- "@radix-ui/react-presence": "1.1.6",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-roving-focus": "1.1.14",
- "@radix-ui/react-use-controllable-state": "1.2.3",
- "@radix-ui/react-use-previous": "1.1.2",
- "@radix-ui/react-use-size": "1.1.2"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-direction": "1.1.4",
+ "@radix-ui/react-presence": "1.1.10",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-roving-focus": "1.1.19",
+ "@radix-ui/react-use-controllable-state": "1.2.6",
+ "@radix-ui/react-use-size": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -4781,21 +5051,23 @@
}
},
"node_modules/@radix-ui/react-roving-focus": {
- "version": "1.1.14",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.14.tgz",
- "integrity": "sha512-8Qcnx9447tx/aCBgw6Jenfqg4Skq+vqab9mCBmuGNipIS5YXvL275wbKEu7+ICYHIlAPgCduUMJH1XOYewKF6Q==",
+ "version": "1.1.19",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.19.tgz",
+ "integrity": "sha512-V9jI6hDjT7l3jsCQD9bLNvDLM3tH/gdbOTp7Tefp3hbbgCGQoK7tUvrWiRlcoBHIZ809ElXwNQwVo0B98LuTXQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-collection": "1.1.11",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-direction": "1.1.2",
- "@radix-ui/react-id": "1.1.2",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-callback-ref": "1.1.2",
- "@radix-ui/react-use-controllable-state": "1.2.3"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-collection": "1.1.15",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-direction": "1.1.4",
+ "@radix-ui/react-id": "1.1.4",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-callback-ref": "1.1.4",
+ "@radix-ui/react-use-controllable-state": "1.2.6",
+ "@radix-ui/react-use-is-hydrated": "0.1.3",
+ "@radix-ui/react-use-layout-effect": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -4813,21 +5085,21 @@
}
},
"node_modules/@radix-ui/react-scroll-area": {
- "version": "1.2.13",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-scroll-area/-/react-scroll-area-1.2.13.tgz",
- "integrity": "sha512-7tncSubo2G0UY1e8rk+72qe3XRzrGnOLtZQ1PL1KoBfRUNX0NrJT5akb+0kfwSCc3gVR4wdHqyhAQBDpDNOwDw==",
+ "version": "1.2.18",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-scroll-area/-/react-scroll-area-1.2.18.tgz",
+ "integrity": "sha512-Zn5Cd171wxsO3Dfg8HaW6RifTb9CYTKQJHs/G4+LN1GfmJpaQMZQyQxMprVPHpaz7QY4l9BxK2JwQuzHsXC8nA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/number": "1.1.2",
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-direction": "1.1.2",
- "@radix-ui/react-presence": "1.1.6",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-callback-ref": "1.1.2",
- "@radix-ui/react-use-layout-effect": "1.1.2"
+ "@radix-ui/number": "1.1.3",
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-direction": "1.1.4",
+ "@radix-ui/react-presence": "1.1.10",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-callback-ref": "1.1.4",
+ "@radix-ui/react-use-layout-effect": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -4845,32 +5117,32 @@
}
},
"node_modules/@radix-ui/react-select": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.3.2.tgz",
- "integrity": "sha512-brXD6C/V0fVK0DDbscLVw6LsXrjQ+ay8jdOBaN+tLb4vsHsAMm6Gt6eT77wHX1Eq8GPtD5rJ+RxFtfDozsb4+Q==",
+ "version": "2.3.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.3.7.tgz",
+ "integrity": "sha512-WFGImkmbzcfxeIwq/+4HvRN0pizBwbwQUED4I13ezQsDdfl38ZntN6TmR8XaSzPBqoCToe8rF75j6NPNDSzhbg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/number": "1.1.2",
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-collection": "1.1.11",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-direction": "1.1.2",
- "@radix-ui/react-dismissable-layer": "1.1.14",
- "@radix-ui/react-focus-guards": "1.1.4",
- "@radix-ui/react-focus-scope": "1.1.11",
- "@radix-ui/react-id": "1.1.2",
- "@radix-ui/react-popper": "1.3.2",
- "@radix-ui/react-portal": "1.1.13",
- "@radix-ui/react-presence": "1.1.6",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-slot": "1.3.0",
- "@radix-ui/react-use-callback-ref": "1.1.2",
- "@radix-ui/react-use-controllable-state": "1.2.3",
- "@radix-ui/react-use-layout-effect": "1.1.2",
- "@radix-ui/react-use-previous": "1.1.2",
- "@radix-ui/react-visually-hidden": "1.2.7",
+ "@radix-ui/number": "1.1.3",
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-collection": "1.1.15",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-direction": "1.1.4",
+ "@radix-ui/react-dismissable-layer": "1.1.19",
+ "@radix-ui/react-focus-guards": "1.1.6",
+ "@radix-ui/react-focus-scope": "1.1.16",
+ "@radix-ui/react-id": "1.1.4",
+ "@radix-ui/react-popper": "1.3.7",
+ "@radix-ui/react-portal": "1.1.17",
+ "@radix-ui/react-presence": "1.1.10",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-slot": "1.3.3",
+ "@radix-ui/react-use-callback-ref": "1.1.4",
+ "@radix-ui/react-use-controllable-state": "1.2.6",
+ "@radix-ui/react-use-layout-effect": "1.1.4",
+ "@radix-ui/react-use-previous": "1.1.4",
+ "@radix-ui/react-visually-hidden": "1.2.11",
"aria-hidden": "^1.2.4",
"react-remove-scroll": "^2.7.2"
},
@@ -4890,13 +5162,13 @@
}
},
"node_modules/@radix-ui/react-separator": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.11.tgz",
- "integrity": "sha512-jRhe86+8PF7VZ1u14eOWVOuh2BuAhALg/FT1VcMC4OHedMTRUazDnDlKTt+yxo5cRNKHMfmvZ4sSQtWDeMV4CQ==",
+ "version": "1.1.15",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.15.tgz",
+ "integrity": "sha512-jOLO4lssEzWpoDu7G+Ze4VjwMRUBt291pnZD0gmalREZipnTX3wadQo7Fy48GCTfe14/YRN6rw/rOJqrE85Wxw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-primitive": "2.1.7"
+ "@radix-ui/react-primitive": "2.1.10"
},
"peerDependencies": {
"@types/react": "*",
@@ -4914,23 +5186,23 @@
}
},
"node_modules/@radix-ui/react-slider": {
- "version": "1.4.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slider/-/react-slider-1.4.2.tgz",
- "integrity": "sha512-qt5C1ppJz66aUDrH1VccjPrq7aFchK0wBrn6xsxlCHNUyE57dRRQ7lp1QFpF7OscMexZF8MCGBTVBlENHPkNiA==",
+ "version": "1.4.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slider/-/react-slider-1.4.7.tgz",
+ "integrity": "sha512-mTSLf1GC/C0moWjTbvCM6Qn/gBjvlFt1azuWF2v7MN5C3Zq2U2J2lN3ZEYkpujuOU5Ro7A28wkviSxaKnG0BYg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/number": "1.1.2",
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-collection": "1.1.11",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-direction": "1.1.2",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-controllable-state": "1.2.3",
- "@radix-ui/react-use-layout-effect": "1.1.2",
- "@radix-ui/react-use-previous": "1.1.2",
- "@radix-ui/react-use-size": "1.1.2"
+ "@radix-ui/number": "1.1.3",
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-collection": "1.1.15",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-direction": "1.1.4",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-controllable-state": "1.2.6",
+ "@radix-ui/react-use-layout-effect": "1.1.4",
+ "@radix-ui/react-use-previous": "1.1.4",
+ "@radix-ui/react-use-size": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -4948,13 +5220,13 @@
}
},
"node_modules/@radix-ui/react-slot": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.3.0.tgz",
- "integrity": "sha512-MojKku4U/miO8Av4Dkb+ctMAQx7JmY96LmtDQlAarCRtd7rN52QCSzBF+XAvr5S6coSVj9HEPBgHAHKEJVk/WA==",
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.3.3.tgz",
+ "integrity": "sha512-qx7oqnYbxnK9kYI9m317qmFmEgo6ywqWvbTogdj7cL9p3/yx4M48p7Rnw5z3H890cL/ow/EeWJsuTykeZVXP5Q==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-compose-refs": "1.1.3"
+ "@radix-ui/react-compose-refs": "1.1.5"
},
"peerDependencies": {
"@types/react": "*",
@@ -4967,19 +5239,18 @@
}
},
"node_modules/@radix-ui/react-switch": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.3.2.tgz",
- "integrity": "sha512-tgRBI3DdNwAJYE4BBZyZcz/HRRCvAsPkRvG1wvKc+41tBGMxPn/a87T/wikXAvyDypNQ9kaZwHbeZe+veHCGpA==",
+ "version": "1.3.7",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.3.7.tgz",
+ "integrity": "sha512-48tB/4dn2UVLBCYhTu9AuR63IHl73l/qLbLgxd86noTUor4/K4LFDAcYjK+isP5313qxaFpjPVogE7+Y0/V3Kw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-controllable-state": "1.2.3",
- "@radix-ui/react-use-previous": "1.1.2",
- "@radix-ui/react-use-size": "1.1.2"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-controllable-state": "1.2.6",
+ "@radix-ui/react-use-size": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -4997,20 +5268,20 @@
}
},
"node_modules/@radix-ui/react-tabs": {
- "version": "1.1.16",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.16.tgz",
- "integrity": "sha512-v3Ab2l7z6U7tRB4xA0IyKdq0OsqaO1o9ZjsIEoKKnSZ/l96mZz8aCTX0NCXw+YVHJXr8Km4d+Mn6/Q8YjXa+gw==",
+ "version": "1.1.21",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-tabs/-/react-tabs-1.1.21.tgz",
+ "integrity": "sha512-UKxJlZid7FVtsk/WTxj4i4uSEgj2Au+KBbS7SQyTlzMhhn+86Cz3tISZdTa87bfEfcuvZezf2ZsxD4xuEKtkog==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-direction": "1.1.2",
- "@radix-ui/react-id": "1.1.2",
- "@radix-ui/react-presence": "1.1.6",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-roving-focus": "1.1.14",
- "@radix-ui/react-use-controllable-state": "1.2.3"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-direction": "1.1.4",
+ "@radix-ui/react-id": "1.1.4",
+ "@radix-ui/react-presence": "1.1.10",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-roving-focus": "1.1.19",
+ "@radix-ui/react-use-controllable-state": "1.2.6"
},
"peerDependencies": {
"@types/react": "*",
@@ -5028,24 +5299,24 @@
}
},
"node_modules/@radix-ui/react-toast": {
- "version": "1.2.18",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-toast/-/react-toast-1.2.18.tgz",
- "integrity": "sha512-YNEnTHV47hPep+U0QvVM02OJNka9uygREc+k4Nh5VSZBg4MmE+myI442x3hCGfRpX7N2WSSYSJKws4gE+Z8lgg==",
+ "version": "1.2.23",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-toast/-/react-toast-1.2.23.tgz",
+ "integrity": "sha512-ofhyAsYaocRGOs/n0XWdUOSVzEAG6BfrMVM8z0c0kLEWY38w/0WuMFPTJP/HVaZPYkMvHZoKIIhNcjbTCBILPg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-collection": "1.1.11",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-dismissable-layer": "1.1.14",
- "@radix-ui/react-portal": "1.1.13",
- "@radix-ui/react-presence": "1.1.6",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-callback-ref": "1.1.2",
- "@radix-ui/react-use-controllable-state": "1.2.3",
- "@radix-ui/react-use-layout-effect": "1.1.2",
- "@radix-ui/react-visually-hidden": "1.2.7"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-collection": "1.1.15",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-dismissable-layer": "1.1.19",
+ "@radix-ui/react-portal": "1.1.17",
+ "@radix-ui/react-presence": "1.1.10",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-callback-ref": "1.1.4",
+ "@radix-ui/react-use-controllable-state": "1.2.6",
+ "@radix-ui/react-use-layout-effect": "1.1.4",
+ "@radix-ui/react-visually-hidden": "1.2.11"
},
"peerDependencies": {
"@types/react": "*",
@@ -5063,15 +5334,15 @@
}
},
"node_modules/@radix-ui/react-toggle": {
- "version": "1.1.13",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle/-/react-toggle-1.1.13.tgz",
- "integrity": "sha512-bI2ILJrzwgmAsH05TsJ9pVrzqQwAip7OM2/krqAdYn0R16bl86UPWbe5VPHsALat0EnqpV01cGtkleaUKPNdNg==",
+ "version": "1.1.18",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle/-/react-toggle-1.1.18.tgz",
+ "integrity": "sha512-7lonPlKfSacd20GlOBx2ltuVKz9oqWYZz+oMQyOltw6t1y2nyftj2ZmwwUHYn49kqfDWcp8dNZm5NgV+5Z+mug==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-use-controllable-state": "1.2.3"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-use-controllable-state": "1.2.6"
},
"peerDependencies": {
"@types/react": "*",
@@ -5089,19 +5360,19 @@
}
},
"node_modules/@radix-ui/react-toggle-group": {
- "version": "1.1.14",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle-group/-/react-toggle-group-1.1.14.tgz",
- "integrity": "sha512-TK1vusNKb8IRhF23FTbRgUNZ9zfs5rGIyI7LfR3h26p9LrQ060i0uW9QWeD8baZMddaaP0DBGlIa6pbZG+mitg==",
+ "version": "1.1.19",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle-group/-/react-toggle-group-1.1.19.tgz",
+ "integrity": "sha512-OtnwuSVjd1Ofi+AdnvhsjQdyuhCDwYs1w9RyB5BN/OavXOVQo42SYqQjwUnbPnaiPFBpQ9aX70dWeee+v2oBLA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-direction": "1.1.2",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-roving-focus": "1.1.14",
- "@radix-ui/react-toggle": "1.1.13",
- "@radix-ui/react-use-controllable-state": "1.2.3"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-direction": "1.1.4",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-roving-focus": "1.1.19",
+ "@radix-ui/react-toggle": "1.1.18",
+ "@radix-ui/react-use-controllable-state": "1.2.6"
},
"peerDependencies": {
"@types/react": "*",
@@ -5119,19 +5390,19 @@
}
},
"node_modules/@radix-ui/react-toolbar": {
- "version": "1.1.14",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-toolbar/-/react-toolbar-1.1.14.tgz",
- "integrity": "sha512-L/EkWVqlnj3lL2toHh4C7PwH2jxfa7OCq6lGfXSCii99ve2S4Ux5rc9HnOa7LN9exHa/Nl9kmCAmP9BuDPy5UA==",
+ "version": "1.1.19",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-toolbar/-/react-toolbar-1.1.19.tgz",
+ "integrity": "sha512-Ph0IvtYw4VB12ZnZg+YtrGs8yJQsnizwo/zu0R4Y/nWugtJzA7Pg1eWeuDR9+LSqn+xjamss+UOSOJJJ4gx8jw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-direction": "1.1.2",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-roving-focus": "1.1.14",
- "@radix-ui/react-separator": "1.1.11",
- "@radix-ui/react-toggle-group": "1.1.14"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-direction": "1.1.4",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-roving-focus": "1.1.19",
+ "@radix-ui/react-separator": "1.1.15",
+ "@radix-ui/react-toggle-group": "1.1.19"
},
"peerDependencies": {
"@types/react": "*",
@@ -5149,24 +5420,25 @@
}
},
"node_modules/@radix-ui/react-tooltip": {
- "version": "1.2.11",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.2.11.tgz",
- "integrity": "sha512-8XZ6Py3y3W2nEzAUGCN5cfVKaUi+CVApcz1d6lrNVVf2hvYEixMRkq8k9ggPKnQUpRRuOV5avt8uvxViH2jLwA==",
+ "version": "1.2.16",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-1.2.16.tgz",
+ "integrity": "sha512-6EamKFRRnlpdadndbZ6LMwycfwkwPte1B42hs6QA0gYhjaOKqW4PZ4pjaW9UrlDX5eVt/OjncE7BFTPL5nmZhg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-dismissable-layer": "1.1.14",
- "@radix-ui/react-id": "1.1.2",
- "@radix-ui/react-popper": "1.3.2",
- "@radix-ui/react-portal": "1.1.13",
- "@radix-ui/react-presence": "1.1.6",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-slot": "1.3.0",
- "@radix-ui/react-use-controllable-state": "1.2.3",
- "@radix-ui/react-visually-hidden": "1.2.7"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-dismissable-layer": "1.1.19",
+ "@radix-ui/react-id": "1.1.4",
+ "@radix-ui/react-popper": "1.3.7",
+ "@radix-ui/react-portal": "1.1.17",
+ "@radix-ui/react-presence": "1.1.10",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-slot": "1.3.3",
+ "@radix-ui/react-use-controllable-state": "1.2.6",
+ "@radix-ui/react-use-layout-effect": "1.1.4",
+ "@radix-ui/react-visually-hidden": "1.2.11"
},
"peerDependencies": {
"@types/react": "*",
@@ -5184,9 +5456,9 @@
}
},
"node_modules/@radix-ui/react-use-callback-ref": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.2.tgz",
- "integrity": "sha512-xCso9j1/u8sEgP1RNHjFrXJLApL8LiqOkI1R4ywuN00rxWdYg4oQXuwKLS3i0j5NWLromUD27/4nlxj2UFVvIw==",
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.4.tgz",
+ "integrity": "sha512-R6OUY2e2fA6Yn6s+VSx5KBV6Nx8LQEhu+cz7LCej18rQ1HLyg9PSC9jP/ZNx0o6FAIK9c0F1kHylzSxKsdlkrQ==",
"dev": true,
"license": "MIT",
"peerDependencies": {
@@ -5200,14 +5472,15 @@
}
},
"node_modules/@radix-ui/react-use-controllable-state": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.3.tgz",
- "integrity": "sha512-PLzC90MS+ReootmjC597dvopoelpZ8Q61HJkDXZSExitIq7PL55vHNnesAHwguHK0aPfBnpdNzQtv1uliaqQrA==",
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.6.tgz",
+ "integrity": "sha512-uEQJGT97ZA/TgP/Hydw47lHu+/vQj6z/0jA+WeTbK1o9Rx45GImjpD0tc3W5ad3D6XTSR6e1yEO0FvGq6WQfVQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-use-effect-event": "0.0.3",
- "@radix-ui/react-use-layout-effect": "1.1.2"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-use-effect-event": "0.0.5",
+ "@radix-ui/react-use-layout-effect": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -5220,13 +5493,13 @@
}
},
"node_modules/@radix-ui/react-use-effect-event": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.3.tgz",
- "integrity": "sha512-6c8ZqvPTWILEKnyVkP53EGRCcpnJiKTC21sS/6R1GF5xKyHJJWQEPfkqlcgUkdRQivd6tb23abUwe4ngWmY0JA==",
+ "version": "0.0.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.5.tgz",
+ "integrity": "sha512-7cshFL8HGS/7HEiHH+9kL9HBwp2sa9yX18Knwek6KYWmXwM7pegMgta2AXMQKI+rq3JnfSj9x8wYqFMTdG1Jgg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-use-layout-effect": "1.1.2"
+ "@radix-ui/react-use-layout-effect": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -5239,13 +5512,13 @@
}
},
"node_modules/@radix-ui/react-use-escape-keydown": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.3.tgz",
- "integrity": "sha512-3wEkMiPHXha/2VadZ68rYBcmYnPINVGl4Y3gtcM7fKRjANk0OscK+cdqBgUWdozb7YJxsh0vefM7vgAMHXOjqg==",
+ "version": "1.1.5",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.5.tgz",
+ "integrity": "sha512-ge3ipobwSXTj4JyVtswQ7qZj0ZHdtbGuOno/LrgAAeSxtsJ6Vs4Gz5IkPH2bmqpjcLUFoqGhA/mueuIf63UXlA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-use-callback-ref": "1.1.2"
+ "@radix-ui/react-use-callback-ref": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -5258,9 +5531,9 @@
}
},
"node_modules/@radix-ui/react-use-is-hydrated": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-is-hydrated/-/react-use-is-hydrated-0.1.1.tgz",
- "integrity": "sha512-qwOiz4Tjo8CNnrOLAYUMXeZwDzXgXpvK4TKQPmWLECM9XoWvA6+0Z2/7Ag3A4ivjS4ovbLJPbskkxioFyBhr8A==",
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-is-hydrated/-/react-use-is-hydrated-0.1.3.tgz",
+ "integrity": "sha512-umO/aJ+82CpOnhDZUTbILCQf7kU/g0iv+oGs/Q8jw7IkhWBzaEP4sA268PhFAJTFetbwp3ICc6ktpI4TqtxcIw==",
"dev": true,
"license": "MIT",
"peerDependencies": {
@@ -5274,9 +5547,9 @@
}
},
"node_modules/@radix-ui/react-use-layout-effect": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.2.tgz",
- "integrity": "sha512-jrBWOxZITuGcnjRCM2t2U5ZPkCLxD+Ym6DjfssS5haTj2iiak/DOb64JeN6OdLfLgptb6/e2kKR+ZuTrGoZTPA==",
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.4.tgz",
+ "integrity": "sha512-K20DkRkUwDnxEYMBPcg3Y6voLkEy5p5QQmszZgLngKKiC7dzBR/aEuK3w1qlx2JWDUNH6FluahYdgR3BP+QbYw==",
"dev": true,
"license": "MIT",
"peerDependencies": {
@@ -5290,9 +5563,9 @@
}
},
"node_modules/@radix-ui/react-use-previous": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.2.tgz",
- "integrity": "sha512-IGBQPtRFdhN6MQ8dbegVmBq1LVZluya3F1jWY+puIcQC3MHctRwTDSBWCkL/3ZcnMJLTMJ++Z+ktmvg0F89iCw==",
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-1.1.4.tgz",
+ "integrity": "sha512-XoSLhbRbqxFtgJoi2fNHA3C6pDlY34x508vUpUGoFZfvePfHXHbE1lC4FYFMnJWgiCRroSTw6fOsXQoVS9RwZg==",
"dev": true,
"license": "MIT",
"peerDependencies": {
@@ -5306,13 +5579,13 @@
}
},
"node_modules/@radix-ui/react-use-rect": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.2.tgz",
- "integrity": "sha512-d8a+bBY/FxikNPlgJJoaBHZX+zKVbWHYJGTLnLvveQgFSTntkGdEKv3JDtHrMS0DNYpllz2nRsTLGLKYttbpmw==",
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.4.tgz",
+ "integrity": "sha512-cSOCh6JlkmfjLyNcLiu2nB4v+nm+dkZ+Q5KHWk/soo4U7ZLiEQFKHK9/YmtBHjfCEaU43IBKQOc4/uJmCaiCTQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/rect": "1.1.2"
+ "@radix-ui/rect": "1.1.3"
},
"peerDependencies": {
"@types/react": "*",
@@ -5325,13 +5598,13 @@
}
},
"node_modules/@radix-ui/react-use-size": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.2.tgz",
- "integrity": "sha512-giWQp+4mxjBPt4KZ0MmyuykFNWfbDxKt4x+fPkRYmgRFJSbCZFzUglvMb/Kjn38tm10YP4ufiQZDx3zna4LU6w==",
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.4.tgz",
+ "integrity": "sha512-D3anSY15EJoxrihpsXI6SMrmmonnQtR2ni7arO+Lfdg3O95b9hNXxONk8jA5C8ANdF/h5HMAxejgs8PWJ6rlhw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-use-layout-effect": "1.1.2"
+ "@radix-ui/react-use-layout-effect": "1.1.4"
},
"peerDependencies": {
"@types/react": "*",
@@ -5344,13 +5617,13 @@
}
},
"node_modules/@radix-ui/react-visually-hidden": {
- "version": "1.2.7",
- "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.2.7.tgz",
- "integrity": "sha512-1wNZBggTDK3GRuuQ6nP4k2yi7a6l7I5qbMPbZcRsrGsGVead/f/d5FhEzUvqFs0bcrDLx7n1zKQ3JvLR6whaaw==",
+ "version": "1.2.11",
+ "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.2.11.tgz",
+ "integrity": "sha512-NFS86RYYZb4/exihaESBGOpMJFz8MGLAfu3mOBSGByVnVPC9JPASfYubxd/8KbkQK0sYAv8lVQDEQukDX/qXvQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/react-primitive": "2.1.7"
+ "@radix-ui/react-primitive": "2.1.10"
},
"peerDependencies": {
"@types/react": "*",
@@ -5368,9 +5641,9 @@
}
},
"node_modules/@radix-ui/rect": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.2.tgz",
- "integrity": "sha512-xnXE7wG13PI+cxieVssYXlQJuYVRhH9NBoxt3KNwzghDIA69GMm7d4wXRouHIYjE+KvS6U/MsMO73NdS2MH9ZA==",
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.3.tgz",
+ "integrity": "sha512-JtyZR+mqgBibTo8xea3B6ZRmzZiM/YeVBtUkas6zMuXjAlfIFIW2FgqeM9eLyvEaYX66vr6DJMK+4U6LV0KhNw==",
"dev": true,
"license": "MIT"
},
@@ -5424,9 +5697,9 @@
}
},
"node_modules/@rolldown/binding-android-arm64": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.3.tgz",
- "integrity": "sha512-454rs7jHngixp/NMxd5srYD57OnzSlZ/eFTETjORQHLwJG1lRtmNOJcBerZlfu4GjKqeq8aCCIQrMdHyhI51Hw==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.3.tgz",
+ "integrity": "sha512-zrJtHDcaZJ1Fp7xf4hNl+7seH9Cn/N5TwLYkhgXREtBwAd/jaqW3uqeHxpDugJLVICWg4eW44kOQEGJ1r6jCGw==",
"cpu": [
"arm64"
],
@@ -5441,9 +5714,9 @@
}
},
"node_modules/@rolldown/binding-darwin-arm64": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.3.tgz",
- "integrity": "sha512-PcAhP+ynjURNyy8SKGl5DQP94aGuB/7JrXJb/t7P+hanXvQVMWzUvRRhBAcg/lNRadBhoUPqSoP4xw5tR/KBEA==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.3.tgz",
+ "integrity": "sha512-ieIiibVCp0tX7TLu2cafoNPv8wJyYi01ekXpbf8q2j7F4rGAhhXb/eQh7ge9DRBY78GwmRQtvjZDux7EDbA8kA==",
"cpu": [
"arm64"
],
@@ -5458,9 +5731,9 @@
}
},
"node_modules/@rolldown/binding-darwin-x64": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.3.tgz",
- "integrity": "sha512-9YpfeUvSE2RS7wysJ81uOZkXJz7f7Q55H2Gvp3VEw/EsahqDtrphrZ0EwDLK5vvKOzaCrBsjF8JmnMLcUt78Gg==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.3.tgz",
+ "integrity": "sha512-Zh9tCon19eDXJoihx0rqKhMUlMYqzwj3aPsSuHmI4RWZh62dWUL+DJN4C5YQya5TcQBJU/Fe8+rY0jhXTQITqA==",
"cpu": [
"x64"
],
@@ -5475,9 +5748,9 @@
}
},
"node_modules/@rolldown/binding-freebsd-x64": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.3.tgz",
- "integrity": "sha512-yB1IlAsSNHncV6SCTL27/MVGR5htvQsoGxIv5KMGXALp+Ll1wYsn+x98M9MW7qa+NdSbvrrY7ANI4wLJ0n1e6g==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.3.tgz",
+ "integrity": "sha512-nGbJWewA1wrXXZiQhjAT5rhibGfns5ZNkDVqxsO6zJ3f3YvpoDNNmGMSbbhLuXKjNScaBJVOAboztAWVespQMg==",
"cpu": [
"x64"
],
@@ -5492,9 +5765,9 @@
}
},
"node_modules/@rolldown/binding-linux-arm-gnueabihf": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.3.tgz",
- "integrity": "sha512-Yi30IVAAfLUCy2MseFjbB1jAMDl1VMCAas5StnYp8da9+CKvMd2H2cbEjWcw5NPaPqzvYkVIaF1nNUG+b7u/sw==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.3.tgz",
+ "integrity": "sha512-QNniJr5Kml0kDEB98jiDOJjXNroxIIi0IXIbdYzY26Xt1pVbeP62+KnoIZLwirOymX/0jDk/2gI/bNUv7A7OIw==",
"cpu": [
"arm"
],
@@ -5509,13 +5782,16 @@
}
},
"node_modules/@rolldown/binding-linux-arm64-gnu": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.3.tgz",
- "integrity": "sha512-jsO7R8To+AdlYgUmN5sHSCZbfhtMBkO0WUx8iORQnPcMMdgr7qM2DQmMwgabs3GhNztdmoKkMKQFHD6DTMCIQw==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.3.tgz",
+ "integrity": "sha512-TkqEAcmmvH3I/q4114NB4RVt6241Dao48pF45uLcFGrwAaIn0iITgTAKP/dLjbN0R4buJjGb91+UHSoFmpgIWw==",
"cpu": [
"arm64"
],
"dev": true,
+ "libc": [
+ "glibc"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -5526,13 +5802,16 @@
}
},
"node_modules/@rolldown/binding-linux-arm64-musl": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.3.tgz",
- "integrity": "sha512-VWkUHwWriDciit80wleYwKILoR/KMvxh/IdwS/paX+ZgpuRpCrKLUdadJbc0NpBEiyhpYawsJ73j9aCvOH+f7Q==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.3.tgz",
+ "integrity": "sha512-NHqjnxpsndf4MPymxteFAWHHfkTL8HjWh1KB7z23ofZ6QO2euONuxDXjat69dKZRALnGypg8k8SsK8vZJoXv1Q==",
"cpu": [
"arm64"
],
"dev": true,
+ "libc": [
+ "musl"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -5543,13 +5822,16 @@
}
},
"node_modules/@rolldown/binding-linux-ppc64-gnu": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.3.tgz",
- "integrity": "sha512-5f1laC0SlIR0yDbFCd8acUhvJIag6N3zC5P7oUPN6wX0aOma+uKJ0wBDH5aq7I1PVI2ttTlhJwzwRIBnLiSGEg==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.3.tgz",
+ "integrity": "sha512-6tbrbwfz5GB9DQ4Jwo6hy9v+vR31xZlvzZ6n5Xut6Hhx5PvrA9q/HsK8KMaYQp063iqZGXwNvZtYNLD7EM/x0w==",
"cpu": [
"ppc64"
],
"dev": true,
+ "libc": [
+ "glibc"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -5560,13 +5842,16 @@
}
},
"node_modules/@rolldown/binding-linux-s390x-gnu": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.3.tgz",
- "integrity": "sha512-Iq4ko0r4XsgbrF/LunNgHtAGLRRVE2kXonAXQ/MV0mC6jQpMOhW1SvtZja2EhC/kd05++bP78dsqBeIQyYJ6Yg==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.3.tgz",
+ "integrity": "sha512-oyuXxXmoZHjXC917IAPFAAv4wWAa0cM9afk8nx1+9/jNNOX1uPf8yDA6p7G0RypOfw/X0PQt5IfoquY1um+zSg==",
"cpu": [
"s390x"
],
"dev": true,
+ "libc": [
+ "glibc"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -5577,13 +5862,16 @@
}
},
"node_modules/@rolldown/binding-linux-x64-gnu": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.3.tgz",
- "integrity": "sha512-B8m6tD5+/N5FeNQFbKlLA/2yVq9ycQP1SeedyEYYKWBNR3ZQbkvIUcNnDNM03lO1l5F2roiiFJGgvoLLyZXtSg==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.3.tgz",
+ "integrity": "sha512-TytMwF2KVGqP2tgd0I1OY0PAv78dZRAYcF5ssDzjM34SUXCED3uXvSd5+lHoC0bTD6eEdFz7LdQNCO1y0oVk9w==",
"cpu": [
"x64"
],
"dev": true,
+ "libc": [
+ "glibc"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -5594,13 +5882,16 @@
}
},
"node_modules/@rolldown/binding-linux-x64-musl": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.3.tgz",
- "integrity": "sha512-pSdpdUJHkuCxun9LE7jvgUB9qsRgaiyNNCX7m/AvHTcq67AiT/Yhoxvw5zPfhrM8k/BfP8ce/hMOpthKDpEUow==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.3.tgz",
+ "integrity": "sha512-/E9m3qstrJFVPoULV25mVQblSNExY2+kBsYe4sy0Tn0yOOgJ8wZbZt3KnRbF/XeU2Gl1STKUQnDNTqhIE5MD4A==",
"cpu": [
"x64"
],
"dev": true,
+ "libc": [
+ "musl"
+ ],
"license": "MIT",
"optional": true,
"os": [
@@ -5611,9 +5902,9 @@
}
},
"node_modules/@rolldown/binding-openharmony-arm64": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.3.tgz",
- "integrity": "sha512-OXXS3RKJgX2uLwM+gYyuH5omcH8fL1LJs96pZGgtetVCahON57+d4SJHzTgZiOjxgGkSnpXpOsWuPDGAKAigEg==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.3.tgz",
+ "integrity": "sha512-Kr0OcsoQI816i6HOl3vFHpd1K0eZyh76zgfj4c1nTyaTsd5r2Mj1lwM4R90y/qaCfmTn9eHy0SKwi98eitRxug==",
"cpu": [
"arm64"
],
@@ -5627,29 +5918,10 @@
"node": "^20.19.0 || >=22.12.0"
}
},
- "node_modules/@rolldown/binding-wasm32-wasi": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.3.tgz",
- "integrity": "sha512-JTtb8BWFynicNSoPrehsCzBtOKjZ6jhMiPFEmOiuXg1Fl8dn2KHQob+GuPSGR0dryQa1PQJbzjF3dqO/whhjLg==",
- "cpu": [
- "wasm32"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "@emnapi/core": "1.10.0",
- "@emnapi/runtime": "1.10.0",
- "@napi-rs/wasm-runtime": "^1.1.4"
- },
- "engines": {
- "node": "^20.19.0 || >=22.12.0"
- }
- },
"node_modules/@rolldown/binding-win32-arm64-msvc": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.3.tgz",
- "integrity": "sha512-gEdFFEN70A/jxb2svrWsN3aDL7OUtmvlOy+6fa2jxG8K0wQ1ZbdeLGnidov6Yu5/733dI5ySfzFlQ/cb0bSz1g==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.3.tgz",
+ "integrity": "sha512-hOtMwTqnME+/gJcH/PCZ0wn0zPUjiWOgkHpxbSJpfGKMezHltx1S7/k1SitzVa7Ww2cqrDDaFbZEhcJZO8o+Jw==",
"cpu": [
"arm64"
],
@@ -5664,9 +5936,9 @@
}
},
"node_modules/@rolldown/binding-win32-x64-msvc": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.3.tgz",
- "integrity": "sha512-eXB7CHuaQdqmJcc3koCNtNPmT/bj2gc999kUFgBxG8Ac0NdgXc4rkCHhqrgrhN3zddvvvrgzj1e90SuSfmyIXA==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.3.tgz",
+ "integrity": "sha512-ekcqMMkI2PlhYnfzQnB/cEdYUVVJViWvoUyLrbzgDoi3Snfc1mVBwdnc306ufA5ejy8JSPjT2RlW1nQSjW7efg==",
"cpu": [
"x64"
],
@@ -5950,29 +6222,29 @@
}
},
"node_modules/@simple-libs/child-process-utils": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@simple-libs/child-process-utils/-/child-process-utils-1.0.2.tgz",
- "integrity": "sha512-/4R8QKnd/8agJynkNdJmNw2MBxuFTRcNFnE5Sg/G+jkSsV8/UBgULMzhizWWW42p8L5H7flImV2ATi79Ove2Tw==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@simple-libs/child-process-utils/-/child-process-utils-2.0.0.tgz",
+ "integrity": "sha512-dvNoRKLijXnD0XoJAz94pbNuB5GQgDr55UhpSPhffDkTT0Cmcqh9jSCOtwfT2d4H6MI9E7c4SgtMuJXZ6F3c6A==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@simple-libs/stream-utils": "^1.2.0"
+ "@simple-libs/stream-utils": "^2.0.0"
},
"engines": {
- "node": ">=18"
+ "node": ">=22"
},
"funding": {
"url": "https://ko-fi.com/dangreen"
}
},
"node_modules/@simple-libs/stream-utils": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@simple-libs/stream-utils/-/stream-utils-1.2.0.tgz",
- "integrity": "sha512-KxXvfapcixpz6rVEB6HPjOUZT22yN6v0vI0urQSk1L8MlEWPDFCZkhw2xmkyoTGYeFw7tWTZd7e3lVzRZRN/EA==",
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/@simple-libs/stream-utils/-/stream-utils-2.0.0.tgz",
+ "integrity": "sha512-fCTuZK4QBa+39Oz9l4OGfJfz+GpwCp3AqO7Zch3to99xHPgstVsRFpeQ8LNd2o1Gv8raL2mCFwiaHh7bFSp5DQ==",
"dev": true,
"license": "MIT",
"engines": {
- "node": ">=18"
+ "node": ">=22"
},
"funding": {
"url": "https://ko-fi.com/dangreen"
@@ -6003,6 +6275,12 @@
"node": ">=20.0.0"
}
},
+ "node_modules/@stablelib/base64": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@stablelib/base64/-/base64-1.0.1.tgz",
+ "integrity": "sha512-1bnPQqSxSuc3Ii6MhBysoWCg58j97aUjuCSZrGSmDxNqtytIi0k8utUenAwTZN4V5mXXYGsVUI9zeBqy+jBOSQ==",
+ "license": "MIT"
+ },
"node_modules/@standard-schema/spec": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz",
@@ -6222,9 +6500,9 @@
}
},
"node_modules/@svgr/core/node_modules/js-yaml": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz",
- "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz",
+ "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==",
"dev": true,
"funding": [
{
@@ -6286,49 +6564,49 @@
}
},
"node_modules/@tailwindcss/node": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.2.tgz",
- "integrity": "sha512-yWP/sqEcBLaD8JuA6zNwxoYKr75qxTioYwlRwekj5Jr/I5GXnoJfjetH/psLUIv74cYTH2lBUEzBkinthoYcBg==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.3.tgz",
+ "integrity": "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@jridgewell/remapping": "^2.3.5",
- "enhanced-resolve": "5.21.6",
+ "enhanced-resolve": "^5.24.1",
"jiti": "^2.7.0",
"lightningcss": "1.32.0",
"magic-string": "^0.30.21",
"source-map-js": "^1.2.1",
- "tailwindcss": "4.3.2"
+ "tailwindcss": "4.3.3"
}
},
"node_modules/@tailwindcss/oxide": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.2.tgz",
- "integrity": "sha512-z8ZgnzX8gdNoWLBLqBPoh/sjnxkwvf9ZuWjnO0l0yIzbLa5/9S+eC5QxGZKRobVHIC3/1BoMWjHblqWjcgFgag==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.3.tgz",
+ "integrity": "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 20"
},
"optionalDependencies": {
- "@tailwindcss/oxide-android-arm64": "4.3.2",
- "@tailwindcss/oxide-darwin-arm64": "4.3.2",
- "@tailwindcss/oxide-darwin-x64": "4.3.2",
- "@tailwindcss/oxide-freebsd-x64": "4.3.2",
- "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.2",
- "@tailwindcss/oxide-linux-arm64-gnu": "4.3.2",
- "@tailwindcss/oxide-linux-arm64-musl": "4.3.2",
- "@tailwindcss/oxide-linux-x64-gnu": "4.3.2",
- "@tailwindcss/oxide-linux-x64-musl": "4.3.2",
- "@tailwindcss/oxide-wasm32-wasi": "4.3.2",
- "@tailwindcss/oxide-win32-arm64-msvc": "4.3.2",
- "@tailwindcss/oxide-win32-x64-msvc": "4.3.2"
+ "@tailwindcss/oxide-android-arm64": "4.3.3",
+ "@tailwindcss/oxide-darwin-arm64": "4.3.3",
+ "@tailwindcss/oxide-darwin-x64": "4.3.3",
+ "@tailwindcss/oxide-freebsd-x64": "4.3.3",
+ "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3",
+ "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3",
+ "@tailwindcss/oxide-linux-arm64-musl": "4.3.3",
+ "@tailwindcss/oxide-linux-x64-gnu": "4.3.3",
+ "@tailwindcss/oxide-linux-x64-musl": "4.3.3",
+ "@tailwindcss/oxide-wasm32-wasi": "4.3.3",
+ "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3",
+ "@tailwindcss/oxide-win32-x64-msvc": "4.3.3"
}
},
"node_modules/@tailwindcss/oxide-android-arm64": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.2.tgz",
- "integrity": "sha512-WHxqIuHpvZ5VtdX6GTl1Ik/Vp2YuN42Et+0CdeaVd/frQ9jAvGmvR8vLT+jk3e8/Q3x8kECB9+R17pgpp2BulA==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.3.tgz",
+ "integrity": "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==",
"cpu": [
"arm64"
],
@@ -6343,9 +6621,9 @@
}
},
"node_modules/@tailwindcss/oxide-darwin-arm64": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.2.tgz",
- "integrity": "sha512-GZypeUY/IDJW3877KeM+O67vbXr3MBnbtEL4aYhNErv/JWZhye2vGSWWG9tB6iiqR2MqRNkY8IOUy4NdSZV26w==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.3.tgz",
+ "integrity": "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==",
"cpu": [
"arm64"
],
@@ -6360,9 +6638,9 @@
}
},
"node_modules/@tailwindcss/oxide-darwin-x64": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.2.tgz",
- "integrity": "sha512-UIIzmefR6KO1sDU7MzRqAxC8iBpft/VhkGjTjnhoS6k7Z3rQ9wEgA1ODSiyH/tcSYssulNm4Ci3hOeK1jH7ccQ==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.3.tgz",
+ "integrity": "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==",
"cpu": [
"x64"
],
@@ -6377,9 +6655,9 @@
}
},
"node_modules/@tailwindcss/oxide-freebsd-x64": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.2.tgz",
- "integrity": "sha512-GN+uAmcI6DNspnCDwtOAZrTz6oukJnp337qZvxqCGLd3BHBzJpO0ZbTLRvJNdztOeAmTzewewGIMPb0tk2R4WA==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.3.tgz",
+ "integrity": "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==",
"cpu": [
"x64"
],
@@ -6394,9 +6672,9 @@
}
},
"node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.2.tgz",
- "integrity": "sha512-4ABn7qSbdHRwTiDiuWNegCyb5+2FJ4vKIKc3DmKrvAFw7MU1Lm11dIkTPwUaFdTzc7IsOpDbqBrlh0x6y36U/w==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.3.tgz",
+ "integrity": "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==",
"cpu": [
"arm"
],
@@ -6411,9 +6689,9 @@
}
},
"node_modules/@tailwindcss/oxide-linux-arm64-gnu": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.2.tgz",
- "integrity": "sha512-wDgEIGwoM8w8pufh9LVt1PahDgNdKXrLC2qfAnV3vAmococ9RWbxeAw4pxPttd/TsJfwjyLf90Dg1y9y8I6Emw==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.3.tgz",
+ "integrity": "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==",
"cpu": [
"arm64"
],
@@ -6428,9 +6706,9 @@
}
},
"node_modules/@tailwindcss/oxide-linux-arm64-musl": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.2.tgz",
- "integrity": "sha512-J5Nuk0uZQIiMTJj3LEx4sAA9tMFUoXQZFv1J6An+QGYe53HKRJuFDi0rpq/tuouCZeAbOBY3kQ6g8qeD4TUjtA==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.3.tgz",
+ "integrity": "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==",
"cpu": [
"arm64"
],
@@ -6445,9 +6723,9 @@
}
},
"node_modules/@tailwindcss/oxide-linux-x64-gnu": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.2.tgz",
- "integrity": "sha512-kqCZpSKOBEJO4mz7OqWoofBZeXTAwaVGPj0ErAj7CojmhKpWVWVOnrt9dE8odoIraZq4oj3ausM37kXi+Tow8w==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.3.tgz",
+ "integrity": "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==",
"cpu": [
"x64"
],
@@ -6462,9 +6740,9 @@
}
},
"node_modules/@tailwindcss/oxide-linux-x64-musl": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.2.tgz",
- "integrity": "sha512-cixpqbh2toJDmkuCRI68nXA8ZxNmdK9Y+9v5h3MC3ZQKy/0BO8AWzlkWyRM7JAFSGBlfig4YVTPsK6MVgqz1uw==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.3.tgz",
+ "integrity": "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==",
"cpu": [
"x64"
],
@@ -6479,9 +6757,9 @@
}
},
"node_modules/@tailwindcss/oxide-wasm32-wasi": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.2.tgz",
- "integrity": "sha512-4ec2Z/LOmRsAgU23CS4xeJfcJlmRg94A/XrbGRCF1gyU/zdDfRLYDVsS+ynSZCmGNxQ1jQriQOKMQeQxBA3Isw==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.3.tgz",
+ "integrity": "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==",
"bundleDependencies": [
"@napi-rs/wasm-runtime",
"@emnapi/core",
@@ -6575,9 +6853,9 @@
"optional": true
},
"node_modules/@tailwindcss/oxide-win32-arm64-msvc": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.2.tgz",
- "integrity": "sha512-Zyr/M0+XcYZu3bZrUytc7TXvrk0ftWfl8gN2MwekNDzhqhKRUucMPSeOzM0o0wH5AWOU49BsKRrfKxI2atCPMQ==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz",
+ "integrity": "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==",
"cpu": [
"arm64"
],
@@ -6592,9 +6870,9 @@
}
},
"node_modules/@tailwindcss/oxide-win32-x64-msvc": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.2.tgz",
- "integrity": "sha512-QI9BO7KlNZsp2GuO0jwAAj5jCDABOKXRkCk2XuKTSaNEFSdfzqswYVTtCHBNKHLsqyjFyFkqlDiwkNbTYSssMQ==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.3.tgz",
+ "integrity": "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==",
"cpu": [
"x64"
],
@@ -6609,27 +6887,27 @@
}
},
"node_modules/@tailwindcss/vite": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.2.tgz",
- "integrity": "sha512-eHpMeX4JXfVNJDEcsouTeCBubJBTcTLigeaw/NTUW6PB5ATKKXdyonnXgTBX2VuRbjz1hjfz6C5XAhr52ImQXA==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.3.tgz",
+ "integrity": "sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@tailwindcss/node": "4.3.2",
- "@tailwindcss/oxide": "4.3.2",
- "tailwindcss": "4.3.2"
+ "@tailwindcss/node": "4.3.3",
+ "@tailwindcss/oxide": "4.3.3",
+ "tailwindcss": "4.3.3"
},
"peerDependencies": {
"vite": "^5.2.0 || ^6 || ^7 || ^8"
}
},
"node_modules/@tanstack/react-virtual": {
- "version": "3.14.6",
- "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.14.6.tgz",
- "integrity": "sha512-4+Uq8m0/gzO4kMCHUEpTtGX1RnONK0C+g88b2ltwPMWUBiaVarBuWKoPJaz7gj1cKCVRAdyu+U8GcKhwCc2beA==",
+ "version": "3.14.9",
+ "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.14.9.tgz",
+ "integrity": "sha512-qZyr0FZDP8rDC4WBhsryIZmAd9bveJvFGUJJtskWaew6/0dTRS6wZxnR6VQ5bY2KwL3LjerrHqQLk3a0GKcPXQ==",
"license": "MIT",
"dependencies": {
- "@tanstack/virtual-core": "3.17.4"
+ "@tanstack/virtual-core": "3.17.7"
},
"funding": {
"type": "github",
@@ -6641,9 +6919,9 @@
}
},
"node_modules/@tanstack/virtual-core": {
- "version": "3.17.4",
- "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.17.4.tgz",
- "integrity": "sha512-nGm5KteqxasUdThLc2izl6dHUqLv0LQj7Nuyo5gYalTPf/U8a9ermvsl7reT+6ioBW1l8WfpP/mcU338nLXpqw==",
+ "version": "3.17.7",
+ "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.17.7.tgz",
+ "integrity": "sha512-bp+v10y65sp2H7WpWfIMyxTNfl8ZVfxFTLRjPIFRryi6FV/J33z4IS53WO4pTk36KlvJ4iLiQz+oaydDC1xbcA==",
"license": "MIT",
"funding": {
"type": "github",
@@ -6688,9 +6966,9 @@
"license": "MIT"
},
"node_modules/@testing-library/jest-dom": {
- "version": "6.9.1",
- "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.9.1.tgz",
- "integrity": "sha512-zIcONa+hVtVSSep9UT3jZ5rizo2BsxgyDYU7WFD5eICBE7no3881HGeb/QkGfsJs6JTkY1aQhT7rIPC7e+0nnA==",
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-7.0.0.tgz",
+ "integrity": "sha512-HKAH9C6mBo5yBG6yRO5i43L2iisencAo5z+o5P/saHUoY+miC5ivXRxHBJcFyB5ypPNxHJdK3BoF/3O4DIptMg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6702,9 +6980,12 @@
"redent": "^3.0.0"
},
"engines": {
- "node": ">=14",
+ "node": ">=22",
"npm": ">=6",
"yarn": ">=1"
+ },
+ "peerDependencies": {
+ "@testing-library/dom": ">=10 <11"
}
},
"node_modules/@testing-library/react": {
@@ -6749,17 +7030,6 @@
"@testing-library/dom": ">=7.21.4"
}
},
- "node_modules/@tybys/wasm-util": {
- "version": "0.10.2",
- "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz",
- "integrity": "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==",
- "dev": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "tslib": "^2.4.0"
- }
- },
"node_modules/@types/aria-query": {
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-5.0.4.tgz",
@@ -6768,9 +7038,9 @@
"license": "MIT"
},
"node_modules/@types/better-sqlite3": {
- "version": "7.6.13",
- "resolved": "https://registry.npmjs.org/@types/better-sqlite3/-/better-sqlite3-7.6.13.tgz",
- "integrity": "sha512-NMv9ASNARoKksWtsq/SHakpYAYnhBrQgGD8zkLYk/jaK8jUGn08CfEdTRgYhMypUQAfzSP8W6gNLe0q19/t4VA==",
+ "version": "9.6.0",
+ "resolved": "https://registry.npmjs.org/@types/better-sqlite3/-/better-sqlite3-9.6.0.tgz",
+ "integrity": "sha512-ZEEwBSgMu7GYJOynoagg5X9JbxfL6dTJDsgViJIqh67jV44kyOr9RXfmFjLK5rzC4MWssP06t9hu/JwGDnUbCg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6781,7 +7051,6 @@
"version": "1.19.6",
"resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz",
"integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==",
- "dev": true,
"license": "MIT",
"dependencies": {
"@types/connect": "*",
@@ -6799,11 +7068,20 @@
"assertion-error": "^2.0.1"
}
},
+ "node_modules/@types/compression": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@types/compression/-/compression-1.8.1.tgz",
+ "integrity": "sha512-kCFuWS0ebDbmxs0AXYn6e2r2nrGAb5KwQhknjSPSPgJcGd8+HVSILlUyFhGqML2gk39HcG7D1ydW9/qpYkN00Q==",
+ "license": "MIT",
+ "dependencies": {
+ "@types/express": "*",
+ "@types/node": "*"
+ }
+ },
"node_modules/@types/connect": {
"version": "3.4.38",
"resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz",
"integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==",
- "dev": true,
"license": "MIT",
"dependencies": {
"@types/node": "*"
@@ -6874,7 +7152,6 @@
"version": "5.0.6",
"resolved": "https://registry.npmjs.org/@types/express/-/express-5.0.6.tgz",
"integrity": "sha512-sKYVuV7Sv9fbPIt/442koC7+IIwK5olP1KWeD88e/idgoJqDm3JV/YUiPwkoKK92ylff2MGxSz1CSjsXelx0YA==",
- "dev": true,
"license": "MIT",
"dependencies": {
"@types/body-parser": "*",
@@ -6886,7 +7163,6 @@
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.1.1.tgz",
"integrity": "sha512-v4zIMr/cX7/d2BpAEX3KNKL/JrT1s43s96lLvvdTmza1oEvDudCqK9aF/djc/SWgy8Yh0h30TZx5VpzqFCxk5A==",
- "dev": true,
"license": "MIT",
"dependencies": {
"@types/node": "*",
@@ -6926,7 +7202,6 @@
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz",
"integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==",
- "dev": true,
"license": "MIT"
},
"node_modules/@types/js-yaml": {
@@ -6981,9 +7256,9 @@
"license": "MIT"
},
"node_modules/@types/multer": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/@types/multer/-/multer-2.1.0.tgz",
- "integrity": "sha512-zYZb0+nJhOHtPpGDb3vqPjwpdeGlGC157VpkqNQL+UU2qwoacoQ7MpsAmUptI/0Oa127X32JzWDqQVEXp2RcIA==",
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/@types/multer/-/multer-2.2.0.tgz",
+ "integrity": "sha512-3U1troeqGV8Ntp7Q3klwf4zr23VEoqYVocYXaswm9+8z3O9UHDYAqLxjJ/h550iRADTjKdOdhhasXw6gD6kYtg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -6991,14 +7266,26 @@
}
},
"node_modules/@types/node": {
- "version": "26.0.0",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-26.0.0.tgz",
- "integrity": "sha512-vf2YFi1iY9lHGwNJMs01biZFbKJkrZR1T6/MlzjhJLPdntOHLhTrDSnSVcdtvjihi4VQNlrFRIxLsDBlQpAipA==",
+ "version": "26.1.2",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.2.tgz",
+ "integrity": "sha512-Vu4a5UFA9rIIFJ7rB/Vaafh9lrCQszopTCx6KjFboXTGQbPNasehVR5TEiithSDGyd1DEiUByggTZsg8jukeIg==",
"license": "MIT",
"dependencies": {
"undici-types": "~8.3.0"
}
},
+ "node_modules/@types/pg": {
+ "version": "8.20.3",
+ "resolved": "https://registry.npmjs.org/@types/pg/-/pg-8.20.3.tgz",
+ "integrity": "sha512-4Tvg+HO6+oQaAkpT8GTYoSExzpGGZz532GXgbbCElWJQeQdMozBWxEKNBhJJpHFjWXsMxqPbyypvj/89FWNoSQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@types/node": "*",
+ "pg-protocol": "*",
+ "pg-types": "^2.2.0"
+ }
+ },
"node_modules/@types/prismjs": {
"version": "1.26.6",
"resolved": "https://registry.npmjs.org/@types/prismjs/-/prismjs-1.26.6.tgz",
@@ -7020,20 +7307,18 @@
"version": "6.15.1",
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.15.1.tgz",
"integrity": "sha512-GZHUBZR9hckSUhrxmp1nG6NwdpM9fCunJwyThLW1X3AyHgd9IlHb6VANpQQqDr2o/qQp6McZ3y/IA2rVzKzSbw==",
- "dev": true,
"license": "MIT"
},
"node_modules/@types/range-parser": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz",
"integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==",
- "dev": true,
"license": "MIT"
},
"node_modules/@types/react": {
- "version": "19.2.17",
- "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.17.tgz",
- "integrity": "sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==",
+ "version": "19.2.18",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.18.tgz",
+ "integrity": "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7041,9 +7326,9 @@
}
},
"node_modules/@types/react-dom": {
- "version": "19.2.3",
- "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz",
- "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==",
+ "version": "19.2.4",
+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.4.tgz",
+ "integrity": "sha512-Bsc+QHgp+P/F02XDzNCY9jnZNCUuLki36KT7VKrTXXLdHf+vHMNZnW1rVu5DNW/rCK+fya3DATySbLM4yhtKUw==",
"dev": true,
"license": "MIT",
"peerDependencies": {
@@ -7054,7 +7339,6 @@
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.1.tgz",
"integrity": "sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==",
- "dev": true,
"license": "MIT",
"dependencies": {
"@types/node": "*"
@@ -7064,7 +7348,6 @@
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-2.2.0.tgz",
"integrity": "sha512-8mam4H1NHLtu7nmtalF7eyBH14QyOASmcxHhSfEoRyr0nP/YdoesEtU+uSRvMe96TW/HPTtkoKqQLl53N7UXMQ==",
- "dev": true,
"license": "MIT",
"dependencies": {
"@types/http-errors": "*",
@@ -7126,17 +7409,17 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin": {
- "version": "8.61.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.61.1.tgz",
- "integrity": "sha512-ZPlVl3PB3et/59Ne0fv/sci6ZXz4T4Hp4nTJ56i/Y0gR89ARb+KphojTq6j+56E5PIezmOIOOWyY+aWQFd+IkQ==",
+ "version": "8.66.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.66.0.tgz",
+ "integrity": "sha512-p088eaGrzYz1s+7cov0aMOCkNGTJlVxF4jgubf28c8L0Cv9Rloj8YBHnv4hXLq6IIEE1AsjNWavO+k+8kP2Y0A==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/regexpp": "^4.12.2",
- "@typescript-eslint/scope-manager": "8.61.1",
- "@typescript-eslint/type-utils": "8.61.1",
- "@typescript-eslint/utils": "8.61.1",
- "@typescript-eslint/visitor-keys": "8.61.1",
+ "@typescript-eslint/scope-manager": "8.66.0",
+ "@typescript-eslint/type-utils": "8.66.0",
+ "@typescript-eslint/utils": "8.66.0",
+ "@typescript-eslint/visitor-keys": "8.66.0",
"ignore": "^7.0.5",
"natural-compare": "^1.4.0",
"ts-api-utils": "^2.5.0"
@@ -7149,15 +7432,15 @@
"url": "https://opencollective.com/typescript-eslint"
},
"peerDependencies": {
- "@typescript-eslint/parser": "^8.61.1",
+ "@typescript-eslint/parser": "^8.66.0",
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
"typescript": ">=4.8.4 <6.1.0"
}
},
"node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": {
- "version": "7.0.5",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz",
- "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==",
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.6.tgz",
+ "integrity": "sha512-BAg6QkE8W+TuQLrrw0Ugr7HegXduRuuj8/ti2kSOc+jz1dmx8/WNcjr6XGnq5YpDWxFwwaavqD0+jIUOKelTsw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7165,16 +7448,16 @@
}
},
"node_modules/@typescript-eslint/parser": {
- "version": "8.61.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.61.1.tgz",
- "integrity": "sha512-PJ5vePq5/ognBbrIcoC5+SHO5dfpeLPzP9FpLkzWrguoYQEeeSjlJpVwOpo1JRSTEi7dRcwNy4h4dzV70PqHcg==",
+ "version": "8.66.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.66.0.tgz",
+ "integrity": "sha512-X6ypGChaWYk6PBtUg2BwuTZEFFcHJAtGTVJ9/lCTOufhZ4i9fNolQNnktq+kkMCwMj7V8Svsq7+TxSDslmhE0g==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/scope-manager": "8.61.1",
- "@typescript-eslint/types": "8.61.1",
- "@typescript-eslint/typescript-estree": "8.61.1",
- "@typescript-eslint/visitor-keys": "8.61.1",
+ "@typescript-eslint/scope-manager": "8.66.0",
+ "@typescript-eslint/types": "8.66.0",
+ "@typescript-eslint/typescript-estree": "8.66.0",
+ "@typescript-eslint/visitor-keys": "8.66.0",
"debug": "^4.4.3"
},
"engines": {
@@ -7190,14 +7473,14 @@
}
},
"node_modules/@typescript-eslint/project-service": {
- "version": "8.61.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.61.1.tgz",
- "integrity": "sha512-PrC4JYGmR241lYnfhmKGTXkFqv8+ymbTFgSAY0fVXpY82/QkMw5TZPl+vGzuDDU2QYJk9fIDOBTntF+yDv9LEA==",
+ "version": "8.66.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.66.0.tgz",
+ "integrity": "sha512-7MthGPTt4BP69lSryqpqq8HQqxuzynssckL/jyDyk3+TNMQ3y2jFWkptCrktWvBrP+EH787Nl5N5Qpw7WZg+5g==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/tsconfig-utils": "^8.61.1",
- "@typescript-eslint/types": "^8.61.1",
+ "@typescript-eslint/tsconfig-utils": "^8.66.0",
+ "@typescript-eslint/types": "^8.66.0",
"debug": "^4.4.3"
},
"engines": {
@@ -7212,14 +7495,14 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
- "version": "8.61.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.61.1.tgz",
- "integrity": "sha512-L2bdIeoQS8FlKAvONAr20w6OcLXeB+qiDKbAooS9A0Ben+iSIkBef0FxqwKWYqt5sa0i4KJtxVyVmhMylKzF5w==",
+ "version": "8.66.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.66.0.tgz",
+ "integrity": "sha512-8TGcH25j9zqJ/IULB/ppyhRvxA8QYfFEZ7nfbg6/BN9spDgb8fPWQXlE5l8TWBL50EtUx007uZ1o9VOwrq2/9g==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "8.61.1",
- "@typescript-eslint/visitor-keys": "8.61.1"
+ "@typescript-eslint/types": "8.66.0",
+ "@typescript-eslint/visitor-keys": "8.66.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -7230,9 +7513,9 @@
}
},
"node_modules/@typescript-eslint/tsconfig-utils": {
- "version": "8.61.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.61.1.tgz",
- "integrity": "sha512-UN/H4di+OO7EWx2ovME+8t31YO+KVnK0RRKEHR3kOt21/Ay8BOq3M1OMvWs5vNiqcFCYGYoxK3MXPZzmMUE+yg==",
+ "version": "8.66.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.66.0.tgz",
+ "integrity": "sha512-9D5gLYZG4rOjcoag8MQ/fWI8WqA9wcPDyOGyWtWFhvM1lHRbliqUSPIY5J3zqCU1tvSwzXxnnjhQhz5Ne7mJ4g==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7247,15 +7530,15 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
- "version": "8.61.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.61.1.tgz",
- "integrity": "sha512-GYRicKmVK0C4fsKgaACaknOUAq9Oa2kwsjnpFhFcS/5p4Ht5IP9OVLbgIgcK4SRk92nVHFluurg1lumD9dBcLw==",
+ "version": "8.66.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.66.0.tgz",
+ "integrity": "sha512-LG2dWfjZQQp0ADtAu/EWJVayefGL2UEZ3CDeI44D9v3rXB/WYUqE/jpO28KrEKul5AySrmI+Zh1v6v+xW2U9+g==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "8.61.1",
- "@typescript-eslint/typescript-estree": "8.61.1",
- "@typescript-eslint/utils": "8.61.1",
+ "@typescript-eslint/types": "8.66.0",
+ "@typescript-eslint/typescript-estree": "8.66.0",
+ "@typescript-eslint/utils": "8.66.0",
"debug": "^4.4.3",
"ts-api-utils": "^2.5.0"
},
@@ -7272,9 +7555,9 @@
}
},
"node_modules/@typescript-eslint/types": {
- "version": "8.61.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.61.1.tgz",
- "integrity": "sha512-G+CRlPqLv7Bz1IZVs03x5K59F1veqL0EJUROAdGhKsEq8qOiRiZbI+HUojPq5l0fEGOKModD9br6lObhB8zkoA==",
+ "version": "8.66.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.66.0.tgz",
+ "integrity": "sha512-H6gcYaSDOyvL3AD/jHUtUFo2jqGgn/F6nuyuZSu0QTesxL+cP4dQoIMrODRofuJC09g64+WgZ6tE19Y1N2YIFQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -7286,16 +7569,16 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
- "version": "8.61.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.61.1.tgz",
- "integrity": "sha512-u+oQD3BqYWPc8YV9Zab4vaJElJuwOLPRc10Jm1o/qS+6Qwen14HCWwx0Seo4LnSn2wxea2Ik8DxPt2/FHmuhrg==",
+ "version": "8.66.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.66.0.tgz",
+ "integrity": "sha512-8/x4INiiQb10jGgXYD7116/zQ+OL84ZIFn0za68wwFHCanT/VLbBEroWht8RV8fn0/ZCAoazHLQgwUC0UQcDfg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/project-service": "8.61.1",
- "@typescript-eslint/tsconfig-utils": "8.61.1",
- "@typescript-eslint/types": "8.61.1",
- "@typescript-eslint/visitor-keys": "8.61.1",
+ "@typescript-eslint/project-service": "8.66.0",
+ "@typescript-eslint/tsconfig-utils": "8.66.0",
+ "@typescript-eslint/types": "8.66.0",
+ "@typescript-eslint/visitor-keys": "8.66.0",
"debug": "^4.4.3",
"minimatch": "^10.2.2",
"semver": "^7.7.3",
@@ -7314,16 +7597,16 @@
}
},
"node_modules/@typescript-eslint/utils": {
- "version": "8.61.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.61.1.tgz",
- "integrity": "sha512-1+P/3Dj6jvtybE1q0HQ6yBt/gq+oKJyLdEv4HdnqasaEXRSYCAsD59mXEVQnM/ULNdQxbX77tdG4jPRjIS6knA==",
+ "version": "8.66.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.66.0.tgz",
+ "integrity": "sha512-jasearZPolBw5NJNYGMwxzHMF83niVWmMU1VdHzG1CyfI2VS7f7nZltnKtHcg20hW+7Uo5GfK4MeDPoU3qI8EA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.9.1",
- "@typescript-eslint/scope-manager": "8.61.1",
- "@typescript-eslint/types": "8.61.1",
- "@typescript-eslint/typescript-estree": "8.61.1"
+ "@typescript-eslint/scope-manager": "8.66.0",
+ "@typescript-eslint/types": "8.66.0",
+ "@typescript-eslint/typescript-estree": "8.66.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -7338,13 +7621,13 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
- "version": "8.61.1",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.61.1.tgz",
- "integrity": "sha512-6fJ9MHWtK14C1DSkiMlHUSOmrVebL7150xZJBlJiL62jjhIA4JmOq6flwBgDxIdBKKdoiZRel+dfPD5MLfny3w==",
+ "version": "8.66.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.66.0.tgz",
+ "integrity": "sha512-dkKR8q+lKciskj1Y3vthHktl+3cMLWGyVUP23bRiPZ5O9BRT++4EqDDV+TVeIKBL1VXVEqrJlz8MYbcnvJcAlg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/types": "8.61.1",
+ "@typescript-eslint/types": "8.66.0",
"eslint-visitor-keys": "^5.0.0"
},
"engines": {
@@ -7356,9 +7639,9 @@
}
},
"node_modules/@uiw/codemirror-extensions-basic-setup": {
- "version": "4.25.10",
- "resolved": "https://registry.npmjs.org/@uiw/codemirror-extensions-basic-setup/-/codemirror-extensions-basic-setup-4.25.10.tgz",
- "integrity": "sha512-P3vytLlpE62KYSWrMUnwDCv2lvaQDuDZzyj03mHntuHo5bSl34fRZpjTY3kQTPGuXHxkGSYpoPFFj+hMTqaaMQ==",
+ "version": "4.25.11",
+ "resolved": "https://registry.npmjs.org/@uiw/codemirror-extensions-basic-setup/-/codemirror-extensions-basic-setup-4.25.11.tgz",
+ "integrity": "sha512-otyFa+n9IOYtEjaKOxPedHkj15fTPUF21wdR9pv0GpZPfuGl27cvmcv6+tognbRu9VvEcsHKE+ESoszeo3KfTw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7384,9 +7667,9 @@
}
},
"node_modules/@uiw/codemirror-extensions-langs": {
- "version": "4.25.10",
- "resolved": "https://registry.npmjs.org/@uiw/codemirror-extensions-langs/-/codemirror-extensions-langs-4.25.10.tgz",
- "integrity": "sha512-VsfENMb23HrcKG2z0n0RB0KY7d11k+8qzUlH6i36099QXa07D/FEfeffoSnP+QdghhvISNnuMTJsWKqYQq6qlA==",
+ "version": "4.25.11",
+ "resolved": "https://registry.npmjs.org/@uiw/codemirror-extensions-langs/-/codemirror-extensions-langs-4.25.11.tgz",
+ "integrity": "sha512-RJ6MQTGInT+HBnzEs6PoUmPBgLFbWH3e9ZiF0+H1bdWJXrqN0Kfkiopumz1OCcbWFJ8aVJCD6KPK9mXV/LQ4yA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7425,22 +7708,22 @@
}
},
"node_modules/@uiw/codemirror-theme-github": {
- "version": "4.25.10",
- "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-github/-/codemirror-theme-github-4.25.10.tgz",
- "integrity": "sha512-iMM2QT4FaebJMO4W7lXmxNkRPIjKzgY26wL0QG0Ugy0gzsnxoNz4zgNeFIblPA8rvrN3vOIhNNh4nk9UOlFKxA==",
+ "version": "4.25.11",
+ "resolved": "https://registry.npmjs.org/@uiw/codemirror-theme-github/-/codemirror-theme-github-4.25.11.tgz",
+ "integrity": "sha512-3s0LK3gX2mvGI996z3G0tEHZqshbeJRly+QMRsKGAI1Tfr1V475bfaW9NvnoDdINuQHt+RB+ri6q57+WWF8d+A==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@uiw/codemirror-themes": "4.25.10"
+ "@uiw/codemirror-themes": "4.25.11"
},
"funding": {
"url": "https://jaywcjlove.github.io/#/sponsor"
}
},
"node_modules/@uiw/codemirror-themes": {
- "version": "4.25.10",
- "resolved": "https://registry.npmjs.org/@uiw/codemirror-themes/-/codemirror-themes-4.25.10.tgz",
- "integrity": "sha512-Fqiz1HIuDlDftcL+/O53V333UOH6MqQ84VbiQB5egn6u+uDwAqACp1FrdAoi4wgpR3b3TGW4Gr0wIYcrJSSz1A==",
+ "version": "4.25.11",
+ "resolved": "https://registry.npmjs.org/@uiw/codemirror-themes/-/codemirror-themes-4.25.11.tgz",
+ "integrity": "sha512-SBNCOgRsCtewGNocRbmjbCkltGXlFcPJsvhxQ351VynQjnWUiPbUrFcEU/haQ3HanROdAAjWXZJPk5bMBxl2jw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7458,9 +7741,9 @@
}
},
"node_modules/@uiw/react-codemirror": {
- "version": "4.25.10",
- "resolved": "https://registry.npmjs.org/@uiw/react-codemirror/-/react-codemirror-4.25.10.tgz",
- "integrity": "sha512-DzgSMwM5qzB7v1FIb4gEeriYt67iiay756/HIOM9mAbeOVK0MO7rqefHf0O5c0269pJKMW7AH9FjclExD23V9w==",
+ "version": "4.25.11",
+ "resolved": "https://registry.npmjs.org/@uiw/react-codemirror/-/react-codemirror-4.25.11.tgz",
+ "integrity": "sha512-DYVFAKLX+F/4JS9N/7xexh+TICrlncwkX9HKKInrP1bwO0tSfc3k0GB6oawTYhelVKh20cX3TuRx+NJSkVXuMw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7468,7 +7751,7 @@
"@codemirror/commands": "^6.1.0",
"@codemirror/state": "^6.1.1",
"@codemirror/theme-one-dark": "^6.0.0",
- "@uiw/codemirror-extensions-basic-setup": "4.25.10",
+ "@uiw/codemirror-extensions-basic-setup": "4.25.11",
"codemirror": "^6.0.0"
},
"funding": {
@@ -7492,9 +7775,9 @@
"license": "ISC"
},
"node_modules/@vitejs/plugin-react": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.0.3.tgz",
- "integrity": "sha512-vmFvco5/QuC2f9Oj+wTk0+9XeDFkHxSamwZKYc7MxYwKICfvUvlMhqKI0VuICPltGqh1neqBKDvO4kes1ya8vg==",
+ "version": "6.0.5",
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-6.0.5.tgz",
+ "integrity": "sha512-BOVzne/NL162sMdResB25mUv+vWMF5NoAjNf09TeGlE7ZpszZWSD3winycicLJw72yeVsoCn/2kOhEuCvEShMA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7518,14 +7801,14 @@
}
},
"node_modules/@vitest/coverage-v8": {
- "version": "4.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.9.tgz",
- "integrity": "sha512-G9/lgqibheLVBDRuya45EbsEXTYcWoSG+TLg7i2axuzx0Eq62eXn+aWXyaVdV5vKvFSWd6ywcX8hA7la9Pvu8g==",
+ "version": "4.1.10",
+ "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-4.1.10.tgz",
+ "integrity": "sha512-IM49HmthevbgAO4anp1hwtoT9wYe59w0LR00gr+eagHE+ZJ5lK4sLPeO0ubgoJcwLk6dehU3R24N+FbEEKDc8g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@bcoe/v8-coverage": "^1.0.2",
- "@vitest/utils": "4.1.9",
+ "@vitest/utils": "4.1.10",
"ast-v8-to-istanbul": "^1.0.0",
"istanbul-lib-coverage": "^3.2.2",
"istanbul-lib-report": "^3.0.1",
@@ -7539,8 +7822,8 @@
"url": "https://opencollective.com/vitest"
},
"peerDependencies": {
- "@vitest/browser": "4.1.9",
- "vitest": "4.1.9"
+ "@vitest/browser": "4.1.10",
+ "vitest": "4.1.10"
},
"peerDependenciesMeta": {
"@vitest/browser": {
@@ -7549,16 +7832,16 @@
}
},
"node_modules/@vitest/expect": {
- "version": "4.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.9.tgz",
- "integrity": "sha512-vl/rYsUKcBr3SnQn166+XR5ZQcgMx3DQhFWdfli/cWpLnLUmbxZvyrJZotLFUryib+LtArYMSTJ5RbQ57ZqrlA==",
+ "version": "4.1.10",
+ "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.10.tgz",
+ "integrity": "sha512-YsCn+qAk1GWjQOWFEsEcL2gNQ0zmVmQu3T03qP6UyjhtmdtwtbuI+DASn/7iQB3HGTXkdBwGddzxPlmiql5vlA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@standard-schema/spec": "^1.1.0",
"@types/chai": "^5.2.2",
- "@vitest/spy": "4.1.9",
- "@vitest/utils": "4.1.9",
+ "@vitest/spy": "4.1.10",
+ "@vitest/utils": "4.1.10",
"chai": "^6.2.2",
"tinyrainbow": "^3.1.0"
},
@@ -7567,13 +7850,13 @@
}
},
"node_modules/@vitest/mocker": {
- "version": "4.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.9.tgz",
- "integrity": "sha512-EVkXzBjrPGM+cK8/ANWgBrkUCfJfb38/EfTSO8h7pWvKkyPkpWxvR7BkD2MyItMF62C97zAEoqdpUixwR/e+Rw==",
+ "version": "4.1.10",
+ "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.10.tgz",
+ "integrity": "sha512-v0xaezt+DKEmKfaxg133ldzADrwLGd7Ze1MfQQTYfvs8OqZIwbxyxaYURivwV7sWy5fqn3rH5uOrSp07bp44Ow==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/spy": "4.1.9",
+ "@vitest/spy": "4.1.10",
"estree-walker": "^3.0.3",
"magic-string": "^0.30.21"
},
@@ -7604,9 +7887,9 @@
}
},
"node_modules/@vitest/pretty-format": {
- "version": "4.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.9.tgz",
- "integrity": "sha512-s0iufns3iIFitdgm+YR7g1whCAaGtXz459VS9/PqyKDEEFgYIhsHOQmXgIgDuYCt7DeQmiZT0Qe2OA2p4ZPu5A==",
+ "version": "4.1.10",
+ "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.10.tgz",
+ "integrity": "sha512-W1HsjSH4MXQ9YfmmhLAoIYf1HRfekQCGngeIgcei6MP5QQGWUe0gkopdZQaVCFO+JDJMrAJGwa5pRpNpvy4P8Q==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -7617,13 +7900,13 @@
}
},
"node_modules/@vitest/runner": {
- "version": "4.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.9.tgz",
- "integrity": "sha512-KXLMDtc7oe70+3mJfGrPUWPesswH+3sTxAMAMl8DG7I8IUQT4XW718dY5ID3vPUcmlu27CcKfY4P3h3I29SLJg==",
+ "version": "4.1.10",
+ "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.10.tgz",
+ "integrity": "sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/utils": "4.1.9",
+ "@vitest/utils": "4.1.10",
"pathe": "^2.0.3"
},
"funding": {
@@ -7631,14 +7914,14 @@
}
},
"node_modules/@vitest/snapshot": {
- "version": "4.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.9.tgz",
- "integrity": "sha512-Jc7RKGNBo8Z28WYIm0Niej4xdSPByRf6mU58VpHQkd6Zh05rlnA+twjbK5HyeIGHxrzsc3mJgS43uM0CZKzaIA==",
+ "version": "4.1.10",
+ "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.10.tgz",
+ "integrity": "sha512-xRkfOT1qpTAi/Ti4Y1LtfRc3kEuqxGw59eN2jN9pRWMtS/XDevekhcFSqvQqjUNGksfjMJu3Y+oJ+4Ypn2OaJw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/pretty-format": "4.1.9",
- "@vitest/utils": "4.1.9",
+ "@vitest/pretty-format": "4.1.10",
+ "@vitest/utils": "4.1.10",
"magic-string": "^0.30.21",
"pathe": "^2.0.3"
},
@@ -7647,9 +7930,9 @@
}
},
"node_modules/@vitest/spy": {
- "version": "4.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.9.tgz",
- "integrity": "sha512-fHpsS6mIi+PiEW+vcRVOMkX1oSaPKne3VOclSFICPcGOmfKgXPU5iAah+wcNcj2xPrCCmfq99IDGf+EojhhvhA==",
+ "version": "4.1.10",
+ "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.10.tgz",
+ "integrity": "sha512-PLf/Ugvoq5wO/b4rwYCR1h2PSIdXz7wnkQFMiUpLdtM7l6pqVFcQIBEHyT1+l+cj7mNwAfZHzqXqDyjvOuwbDw==",
"dev": true,
"license": "MIT",
"funding": {
@@ -7657,13 +7940,13 @@
}
},
"node_modules/@vitest/ui": {
- "version": "4.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-4.1.9.tgz",
- "integrity": "sha512-U/cRvtqfEPj27FI1n9cyUvi4vXXdcLhjJiI+InYKdk8hP4VrS6RXOjGL7rfFaeBc37iRKANsR6eEzIoC7lmgBQ==",
+ "version": "4.1.10",
+ "resolved": "https://registry.npmjs.org/@vitest/ui/-/ui-4.1.10.tgz",
+ "integrity": "sha512-EOUqfXHTXtpSHsyLHH40ts3Ue+hRhSGwzwzMlK0dTEOLSDYyOXLyr5JDGmHQWhN2DYI30gw6dVx3cdgM9FZl+Q==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/utils": "4.1.9",
+ "@vitest/utils": "4.1.10",
"fflate": "^0.8.2",
"flatted": "^3.4.2",
"pathe": "^2.0.3",
@@ -7675,17 +7958,17 @@
"url": "https://opencollective.com/vitest"
},
"peerDependencies": {
- "vitest": "4.1.9"
+ "vitest": "4.1.10"
}
},
"node_modules/@vitest/utils": {
- "version": "4.1.9",
- "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.9.tgz",
- "integrity": "sha512-A51o8ymO5PpqlWNnBP9ZHPXDIpuMtTLlGSjN7la4US+LJzoUMyhwjA5QXlm39JexgwHKW4Xjs8Z2d3dLCXOeuA==",
+ "version": "4.1.10",
+ "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.10.tgz",
+ "integrity": "sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/pretty-format": "4.1.9",
+ "@vitest/pretty-format": "4.1.10",
"convert-source-map": "^2.0.0",
"tinyrainbow": "^3.1.0"
},
@@ -7720,6 +8003,13 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/@xterm/addon-search": {
+ "version": "0.16.0",
+ "resolved": "https://registry.npmjs.org/@xterm/addon-search/-/addon-search-0.16.0.tgz",
+ "integrity": "sha512-9OeuBFu0/uZJPu+9AHKY6g/w0Czyb/Ut0A5t79I4ULoU4IfU5BEpPFVGQxP4zTTMdfZEYkVIRYbHBX1xWwjeSA==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/@xterm/addon-unicode11": {
"version": "0.9.0",
"resolved": "https://registry.npmjs.org/@xterm/addon-unicode11/-/addon-unicode11-0.9.0.tgz",
@@ -7838,22 +8128,6 @@
}
}
},
- "node_modules/ansi-escapes": {
- "version": "7.3.0",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.3.0.tgz",
- "integrity": "sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "environment": "^1.0.0"
- },
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/ansi-regex": {
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",
@@ -8010,9 +8284,9 @@
}
},
"node_modules/app-builder-lib/node_modules/js-yaml": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz",
- "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz",
+ "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==",
"dev": true,
"funding": [
{
@@ -8073,6 +8347,19 @@
"integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==",
"license": "Python-2.0"
},
+ "node_modules/argue-cli": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/argue-cli/-/argue-cli-3.1.0.tgz",
+ "integrity": "sha512-DhBpBfXL4SS2uC0N922MMajKR3CdrTG0u2or1PNYgXMsrSzViJrbtvT0nCLlLGUI0plam/ZZCs7aAauHtW9thw==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": ">=22"
+ },
+ "funding": {
+ "url": "https://ko-fi.com/dangreen"
+ }
+ },
"node_modules/aria-hidden": {
"version": "1.2.6",
"resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.6.tgz",
@@ -8096,13 +8383,6 @@
"node": ">= 0.4"
}
},
- "node_modules/array-ify": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz",
- "integrity": "sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/asn1": {
"version": "0.2.6",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
@@ -8207,6 +8487,15 @@
"node": ">= 4.0.0"
}
},
+ "node_modules/aws-ssl-profiles": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/aws-ssl-profiles/-/aws-ssl-profiles-1.1.2.tgz",
+ "integrity": "sha512-NZKeq9AfyQvEeNlN0zSYAaWrmBffJh3IELMZfRpJVWgrpEbtEpnjvzqBPf+mxoI287JohRDoa+/nsfqqiZmF6g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 6.0.0"
+ }
+ },
"node_modules/aws4": {
"version": "1.13.2",
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz",
@@ -8215,13 +8504,13 @@
"license": "MIT"
},
"node_modules/axios": {
- "version": "1.18.1",
- "resolved": "https://registry.npmjs.org/axios/-/axios-1.18.1.tgz",
- "integrity": "sha512-3nTvFlvpn9Zu/RkHUqtc7/+al4UpRW5az71ap5zccp6e8RAYEzhMTecX8Dz1wWDYrPpUoB1HAQEGEAEvUr7S9g==",
+ "version": "1.19.0",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.19.0.tgz",
+ "integrity": "sha512-ht/iuYZXEjFxLH/Hkezgd7m6JKlHHXEUSneaDz8uZe1Gj5QZtCnpyDsckvAiEnT89OEbCLmnte4R4sn7P0EKFw==",
"license": "MIT",
"dependencies": {
"follow-redirects": "^1.16.0",
- "form-data": "^4.0.5",
+ "form-data": "^4.0.6",
"https-proxy-agent": "^5.0.1",
"proxy-from-env": "^2.1.0"
}
@@ -8251,20 +8540,6 @@
"node": ">= 6"
}
},
- "node_modules/b4a": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.8.1.tgz",
- "integrity": "sha512-aiqre1Nr0B/6DgE2N5vwTc+2/oQZ4Wh1t4NznYY4E00y8LCt6NqdRv81so00oo27D8MVKTpUa/MwUUtBLXCoDw==",
- "license": "Apache-2.0",
- "peerDependencies": {
- "react-native-b4a": "*"
- },
- "peerDependenciesMeta": {
- "react-native-b4a": {
- "optional": true
- }
- }
- },
"node_modules/backoff": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/backoff/-/backoff-2.5.0.tgz",
@@ -8298,97 +8573,6 @@
"node": "18 || 20 || >=22"
}
},
- "node_modules/bare-events": {
- "version": "2.8.3",
- "resolved": "https://registry.npmjs.org/bare-events/-/bare-events-2.8.3.tgz",
- "integrity": "sha512-HdUm8EMQBLaJvGUdidNNbqpA1kYkwNcb+MYxkxCLAPJGQzlv9J0C24h8V65Z4c5GLd/JEALDvpFCQgpLJqc0zw==",
- "license": "Apache-2.0",
- "peerDependencies": {
- "bare-abort-controller": "*"
- },
- "peerDependenciesMeta": {
- "bare-abort-controller": {
- "optional": true
- }
- }
- },
- "node_modules/bare-fs": {
- "version": "4.7.1",
- "resolved": "https://registry.npmjs.org/bare-fs/-/bare-fs-4.7.1.tgz",
- "integrity": "sha512-WDRsyVN52eAx/lBamKD6uyw8H4228h/x0sGGGegOamM2cd7Pag88GfMQalobXI+HaEUxpCkbKQUDOQqt9wawRw==",
- "license": "Apache-2.0",
- "dependencies": {
- "bare-events": "^2.5.4",
- "bare-path": "^3.0.0",
- "bare-stream": "^2.6.4",
- "bare-url": "^2.2.2",
- "fast-fifo": "^1.3.2"
- },
- "engines": {
- "bare": ">=1.16.0"
- },
- "peerDependencies": {
- "bare-buffer": "*"
- },
- "peerDependenciesMeta": {
- "bare-buffer": {
- "optional": true
- }
- }
- },
- "node_modules/bare-os": {
- "version": "3.9.1",
- "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-3.9.1.tgz",
- "integrity": "sha512-6M5XjcnsygQNPMCMPXSK379xrJFiZ/AEMNBmFEmQW8d/789VQATvriyi5r0HYTL9TkQ26rn3kgdTG3aisbrXkQ==",
- "license": "Apache-2.0",
- "engines": {
- "bare": ">=1.14.0"
- }
- },
- "node_modules/bare-path": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/bare-path/-/bare-path-3.0.0.tgz",
- "integrity": "sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==",
- "license": "Apache-2.0",
- "dependencies": {
- "bare-os": "^3.0.1"
- }
- },
- "node_modules/bare-stream": {
- "version": "2.13.1",
- "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.13.1.tgz",
- "integrity": "sha512-Vp0cnjYyrEC4whYTymQ+YZi6pBpfiICZO3cfRG8sy67ZNWe951urv1x4eW1BKNngw3U+3fPYb5JQvHbCtxH7Ow==",
- "license": "Apache-2.0",
- "dependencies": {
- "streamx": "^2.25.0",
- "teex": "^1.0.1"
- },
- "peerDependencies": {
- "bare-abort-controller": "*",
- "bare-buffer": "*",
- "bare-events": "*"
- },
- "peerDependenciesMeta": {
- "bare-abort-controller": {
- "optional": true
- },
- "bare-buffer": {
- "optional": true
- },
- "bare-events": {
- "optional": true
- }
- }
- },
- "node_modules/bare-url": {
- "version": "2.4.3",
- "resolved": "https://registry.npmjs.org/bare-url/-/bare-url-2.4.3.tgz",
- "integrity": "sha512-Kccpc7ACfXaxfeInfqKcZtW4pT5YBn1mesc4sCsun6sRwtbJ4h+sNOaksUpYEJUKfN65YWC6Bw2OJEFiKxq8nQ==",
- "license": "Apache-2.0",
- "dependencies": {
- "bare-path": "^3.0.0"
- }
- },
"node_modules/base32.js": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/base32.js/-/base32.js-0.0.1.tgz",
@@ -8448,17 +8632,16 @@
}
},
"node_modules/better-sqlite3": {
- "version": "12.11.1",
- "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-12.11.1.tgz",
- "integrity": "sha512-dq9AtApgg5PGFtBzPFSBl3HZQjHok5gaQCM6zh2Yk0aSmDCs1CbnVI8/HgASQkNKsWFpseIO9beg5xxpYhbIfA==",
+ "version": "13.0.2",
+ "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-13.0.2.tgz",
+ "integrity": "sha512-jW6oufeDhXZaiX9Lw5A+oerVClx4iFrI6uDj1zu7SqUAjak9vbJvA0NEcKLNxHiQHb6kYCoFzzXYV0YOauhV3g==",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
- "bindings": "^1.5.0",
- "prebuild-install": "^7.1.1"
+ "node-addon-api": "^8.0.0"
},
"engines": {
- "node": "20.x || 22.x || 23.x || 24.x || 25.x || 26.x"
+ "node": ">=22"
}
},
"node_modules/bidi-js": {
@@ -8471,15 +8654,6 @@
"require-from-string": "^2.0.2"
}
},
- "node_modules/bindings": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
- "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
- "license": "MIT",
- "dependencies": {
- "file-uri-to-path": "1.0.0"
- }
- },
"node_modules/bluebird": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
@@ -8525,16 +8699,16 @@
}
},
"node_modules/brace-expansion": {
- "version": "5.0.6",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz",
- "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==",
+ "version": "5.0.9",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz",
+ "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^4.0.2"
},
"engines": {
- "node": "18 || 20 || >=22"
+ "node": "20 || >=22"
}
},
"node_modules/browserslist": {
@@ -8650,9 +8824,9 @@
}
},
"node_modules/builder-util/node_modules/js-yaml": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz",
- "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz",
+ "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==",
"dev": true,
"funding": [
{
@@ -8817,12 +8991,12 @@
}
},
"node_modules/chalk": {
- "version": "5.6.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz",
- "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-6.0.0.tgz",
+ "integrity": "sha512-2uNTXIuTTxk7ciZgAU1BQcgnchcG0xXnrs6jzkQfj9SsRa9M2s5zE8WT96hS6KmG4MzWHSrvH43DF1m4XRkrFg==",
"license": "MIT",
"engines": {
- "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ "node": ">=22"
},
"funding": {
"url": "https://github.com/chalk/chalk?sponsor=1"
@@ -8918,22 +9092,6 @@
"url": "https://polar.sh/cva"
}
},
- "node_modules/cli-cursor": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz",
- "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "restore-cursor": "^5.0.0"
- },
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/cliui": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
@@ -9096,17 +9254,6 @@
"node": ">=20"
}
},
- "node_modules/compare-func": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz",
- "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "array-ify": "^1.0.0",
- "dot-prop": "^5.1.0"
- }
- },
"node_modules/compare-version": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/compare-version/-/compare-version-0.1.2.tgz",
@@ -9117,6 +9264,60 @@
"node": ">=0.10.0"
}
},
+ "node_modules/compressible": {
+ "version": "2.0.18",
+ "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
+ "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-db": ">= 1.43.0 < 2"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/compression": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/compression/-/compression-1.8.1.tgz",
+ "integrity": "sha512-9mAqGPHLakhCLeNyxPkK4xVo746zQ/czLH1Ky+vkitMnWfWZps8r0qXuwhwizagCRttsL4lfG4pIOvaWLpAP0w==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "3.1.2",
+ "compressible": "~2.0.18",
+ "debug": "2.6.9",
+ "negotiator": "~0.6.4",
+ "on-headers": "~1.1.0",
+ "safe-buffer": "5.2.1",
+ "vary": "~1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/compression/node_modules/debug": {
+ "version": "2.6.9",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+ "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+ "license": "MIT",
+ "dependencies": {
+ "ms": "2.0.0"
+ }
+ },
+ "node_modules/compression/node_modules/ms": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
+ "license": "MIT"
+ },
+ "node_modules/compression/node_modules/negotiator": {
+ "version": "0.6.4",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz",
+ "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
@@ -9154,15 +9355,15 @@
}
},
"node_modules/concurrently": {
- "version": "10.0.3",
- "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-10.0.3.tgz",
- "integrity": "sha512-hc3LH4UaKWd/bbyDK/IGVa4RB6PtQ3CUYwtrkzqHn+wIG3Hr5fhpRlk0L/gCa8ZE1L/Ufj50Zho69cI5w8SQBA==",
+ "version": "10.0.4",
+ "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-10.0.4.tgz",
+ "integrity": "sha512-trZql+7l/0+WRAsAnEdctr4+iiOS6ZrViI6H8QWcCF9MFS/LT0dKpe8vluB1to6it+OxSI4VospFTIFMW8DJRw==",
"dev": true,
"license": "MIT",
"dependencies": {
"chalk": "5.6.2",
"rxjs": "7.8.2",
- "shell-quote": "1.8.4",
+ "shell-quote": "1.9.0",
"supports-color": "10.2.2",
"tree-kill": "1.2.2",
"yargs": "18.0.0"
@@ -9191,6 +9392,19 @@
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
+ "node_modules/concurrently/node_modules/chalk": {
+ "version": "5.6.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.6.2.tgz",
+ "integrity": "sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==",
+ "dev": true,
+ "license": "MIT",
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
"node_modules/concurrently/node_modules/cliui": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz",
@@ -9300,46 +9514,46 @@
}
},
"node_modules/conventional-changelog-angular": {
- "version": "8.3.1",
- "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-8.3.1.tgz",
- "integrity": "sha512-6gfI3otXK5Ph5DfCOI1dblr+kN3FAm5a97hYoQkqNZxOaYa5WKfXH+AnpsmS+iUH2mgVC2Cg2Qw9m5OKcmNrIg==",
+ "version": "9.2.1",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-9.2.1.tgz",
+ "integrity": "sha512-oWSL6ZhnXbYraOFTK3PgRAQJ8fADDAEv5K6AdeyQPLvjFmhG8+ejL0jZZp/R7vTmGJaBvZEE+sE7dB4bCv7sAw==",
"dev": true,
"license": "ISC",
"dependencies": {
- "compare-func": "^2.0.0"
+ "@conventional-changelog/template": "^1.2.1"
},
"engines": {
- "node": ">=18"
+ "node": ">=22"
}
},
"node_modules/conventional-changelog-conventionalcommits": {
- "version": "9.3.1",
- "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-9.3.1.tgz",
- "integrity": "sha512-dTYtpIacRpcZgrvBYvBfArMmK2xvIpv2TaxM0/ZI5CBtNUzvF2x0t15HsbRABWprS6UPmvj+PzHVjSx4qAVKyw==",
+ "version": "10.2.1",
+ "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-10.2.1.tgz",
+ "integrity": "sha512-n4Kr1HFMTf3iMbES0TMxKIcYtUUv4rKqyQQp2JwfOEfFCOfGT3Tq4mCyJ8S9/YPyWhydjfKrrvnyl+gCjA+mJQ==",
"dev": true,
"license": "ISC",
"dependencies": {
- "compare-func": "^2.0.0"
+ "@conventional-changelog/template": "^1.2.1"
},
"engines": {
- "node": ">=18"
+ "node": ">=22"
}
},
"node_modules/conventional-commits-parser": {
- "version": "6.4.0",
- "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-6.4.0.tgz",
- "integrity": "sha512-tvRg7FIBNlyPzjdG8wWRlPHQJJHI7DylhtRGeU9Lq+JuoPh5BKpPRX83ZdLrvXuOSu5Eo/e7SzOQhU4Hd2Miuw==",
+ "version": "7.1.2",
+ "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-7.1.2.tgz",
+ "integrity": "sha512-O+x4N2yH+ijvqWlIyTHsXTAP+algNWgGbjY2duCe8w2vUMvUB95cLRslCPfTMQyLAKlet3bhZTdu6ozn4M+QJQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@simple-libs/stream-utils": "^1.2.0",
- "meow": "^13.0.0"
+ "@simple-libs/stream-utils": "^2.0.0",
+ "argue-cli": "^3.1.0"
},
"bin": {
"conventional-commits-parser": "dist/cli/index.js"
},
"engines": {
- "node": ">=18"
+ "node": ">=22"
}
},
"node_modules/convert-source-map": {
@@ -9456,9 +9670,9 @@
}
},
"node_modules/cosmiconfig/node_modules/js-yaml": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz",
- "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz",
+ "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==",
"dev": true,
"funding": [
{
@@ -9613,21 +9827,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/decompress-response": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
- "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
- "license": "MIT",
- "dependencies": {
- "mimic-response": "^3.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/deep-extend": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
@@ -9653,6 +9852,15 @@
"node": ">=0.4.0"
}
},
+ "node_modules/denque": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/denque/-/denque-2.1.0.tgz",
+ "integrity": "sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==",
+ "license": "Apache-2.0",
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
"node_modules/depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
@@ -9727,9 +9935,9 @@
"license": "MIT"
},
"node_modules/dir-compare/node_modules/brace-expansion": {
- "version": "1.1.15",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.15.tgz",
- "integrity": "sha512-EwOCDEex4quD37XhqM3omwtMoJjr//isUZz1JopUNWms+4Z2ViyM/k1YIRePpoVNnQhENnxtFjLaxNHrT7xIUg==",
+ "version": "1.1.18",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz",
+ "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -9764,9 +9972,9 @@
}
},
"node_modules/dmg-builder/node_modules/js-yaml": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.2.0.tgz",
- "integrity": "sha512-ePWsvanv0DWuDRsW8dnt+R4jQ31SCRCQ7hhNcPXZPsoBZiemuZNYGf7adZdqX2D86j6rvKp3RpCxVTSb8WQlOw==",
+ "version": "4.3.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.1.tgz",
+ "integrity": "sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==",
"dev": true,
"funding": [
{
@@ -9804,19 +10012,6 @@
"tslib": "^2.0.3"
}
},
- "node_modules/dot-prop": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz",
- "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "is-obj": "^2.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/dotenv": {
"version": "17.4.2",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz",
@@ -9858,6 +10053,22 @@
"url": "https://dotenvx.com"
}
},
+ "node_modules/drizzle-kit": {
+ "version": "0.31.10",
+ "resolved": "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.31.10.tgz",
+ "integrity": "sha512-7OZcmQUrdGI+DUNNsKBn1aW8qSoKuTH7d0mYgSP8bAzdFzKoovxEFnoGQp2dVs82EOJeYycqRtciopszwUf8bw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@drizzle-team/brocli": "^0.10.2",
+ "@esbuild-kit/esm-loader": "^2.5.5",
+ "esbuild": "^0.25.4",
+ "tsx": "^4.21.0"
+ },
+ "bin": {
+ "drizzle-kit": "bin.cjs"
+ }
+ },
"node_modules/drizzle-orm": {
"version": "0.45.2",
"resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.45.2.tgz",
@@ -10039,9 +10250,9 @@
}
},
"node_modules/electron": {
- "version": "43.0.0",
- "resolved": "https://registry.npmjs.org/electron/-/electron-43.0.0.tgz",
- "integrity": "sha512-PV60GsWU6qufhuOhw3n+Yix3WPDcqDtBqE8orbEQGQGHEkgp9o/JCPgb7L4vIL0r1HnfPdqSRtboOTqbDkcFDQ==",
+ "version": "43.2.0",
+ "resolved": "https://registry.npmjs.org/electron/-/electron-43.2.0.tgz",
+ "integrity": "sha512-80zvrgG7ZRXD+tD0IyLvrnN9n+veSxadMRsMaC9wKKP3iUbtC7rGM8+dVuCmOb0Rrwwv8ESW4awnUZh9Hbp1fA==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -10200,19 +10411,10 @@
"node": ">= 0.8"
}
},
- "node_modules/end-of-stream": {
- "version": "1.4.5",
- "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",
- "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==",
- "license": "MIT",
- "dependencies": {
- "once": "^1.4.0"
- }
- },
"node_modules/enhanced-resolve": {
- "version": "5.21.6",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.21.6.tgz",
- "integrity": "sha512-aNnGCvbJ/RIyWo1IuhNdVjnNF+EjH9wpzpNHt+ci/m9He9LJvUN8wrCcXjp9cWsGNAuvSpVFTx/vraAFQ8qGjQ==",
+ "version": "5.24.2",
+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.24.2.tgz",
+ "integrity": "sha512-rpsZEGT1jFuve6QlpyRp9ckQ+kN61hvF9BzCPyMdaKTm8UJce96KBn3sorXOFXlzjPrs3Vc4T1NsSroZ3PxlFw==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -10246,19 +10448,6 @@
"node": ">=6"
}
},
- "node_modules/environment": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz",
- "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/err-code": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz",
@@ -10329,16 +10518,59 @@
}
},
"node_modules/es-toolkit": {
- "version": "1.47.0",
- "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.47.0.tgz",
- "integrity": "sha512-n1GuoD0WEQZMBk5tttoZSqwgyLx01oqa5XsBmCHwPyNe1S9jPBEmtR2pSgp2kJuWE3ciFZ6yRHmY4pM4C3OOkw==",
+ "version": "1.50.0",
+ "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.50.0.tgz",
+ "integrity": "sha512-OyZKhUVvEep9ITEiwHn8GKnMRQIVqoSIX7WnRbkWgJkllCujilqP2rD0u979tkl8wqyc8ICwlc1UBVv/Sl1G6w==",
"dev": true,
"license": "MIT",
"workspaces": [
"docs",
- "benchmarks"
+ "benchmarks",
+ "tests/types"
]
},
+ "node_modules/esbuild": {
+ "version": "0.28.2",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz",
+ "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "license": "MIT",
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "optionalDependencies": {
+ "@esbuild/aix-ppc64": "0.28.2",
+ "@esbuild/android-arm": "0.28.2",
+ "@esbuild/android-arm64": "0.28.2",
+ "@esbuild/android-x64": "0.28.2",
+ "@esbuild/darwin-arm64": "0.28.2",
+ "@esbuild/darwin-x64": "0.28.2",
+ "@esbuild/freebsd-arm64": "0.28.2",
+ "@esbuild/freebsd-x64": "0.28.2",
+ "@esbuild/linux-arm": "0.28.2",
+ "@esbuild/linux-arm64": "0.28.2",
+ "@esbuild/linux-ia32": "0.28.2",
+ "@esbuild/linux-loong64": "0.28.2",
+ "@esbuild/linux-mips64el": "0.28.2",
+ "@esbuild/linux-ppc64": "0.28.2",
+ "@esbuild/linux-riscv64": "0.28.2",
+ "@esbuild/linux-s390x": "0.28.2",
+ "@esbuild/linux-x64": "0.28.2",
+ "@esbuild/netbsd-arm64": "0.28.2",
+ "@esbuild/netbsd-x64": "0.28.2",
+ "@esbuild/openbsd-arm64": "0.28.2",
+ "@esbuild/openbsd-x64": "0.28.2",
+ "@esbuild/openharmony-arm64": "0.28.2",
+ "@esbuild/sunos-x64": "0.28.2",
+ "@esbuild/win32-arm64": "0.28.2",
+ "@esbuild/win32-ia32": "0.28.2",
+ "@esbuild/win32-x64": "0.28.2"
+ }
+ },
"node_modules/escalade": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
@@ -10369,9 +10601,9 @@
}
},
"node_modules/eslint": {
- "version": "10.5.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.5.0.tgz",
- "integrity": "sha512-1y+7C+vi12bUK1IpZeaV3gsH9fHLBmPvYmPx42pvT/E9yG0IC8g3PUZZgp0+JLJl7ZDK0flc2gc+Aw9dpCvIsQ==",
+ "version": "10.8.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.8.0.tgz",
+ "integrity": "sha512-nuKKvN+oIBO0koN7Tm7dlkmnkc21mtt0QJLwAKzjLq14y6lRTdVG36MZHJ8eQHwdJMwZbQNMlPOYedMq/oVJvQ==",
"dev": true,
"license": "MIT",
"workspaces": [
@@ -10381,7 +10613,7 @@
"@eslint-community/eslint-utils": "^4.8.0",
"@eslint-community/regexpp": "^4.12.2",
"@eslint/config-array": "^0.23.5",
- "@eslint/config-helpers": "^0.6.0",
+ "@eslint/config-helpers": "^0.7.0",
"@eslint/core": "^1.2.1",
"@eslint/plugin-kit": "^0.7.2",
"@humanfs/node": "^0.16.6",
@@ -10405,7 +10637,7 @@
"imurmurhash": "^0.1.4",
"is-glob": "^4.0.0",
"json-stable-stringify-without-jsonify": "^1.0.1",
- "minimatch": "^10.2.4",
+ "minimatch": "^10.2.5",
"natural-compare": "^1.4.0",
"optionator": "^0.9.3"
},
@@ -10620,31 +10852,6 @@
"node": ">= 0.6"
}
},
- "node_modules/eventemitter3": {
- "version": "5.0.4",
- "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz",
- "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/events-universal": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/events-universal/-/events-universal-1.0.1.tgz",
- "integrity": "sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==",
- "license": "Apache-2.0",
- "dependencies": {
- "bare-events": "^2.7.0"
- }
- },
- "node_modules/expand-template": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
- "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
- "license": "(MIT OR WTFPL)",
- "engines": {
- "node": ">=6"
- }
- },
"node_modules/expect-type": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz",
@@ -10737,12 +10944,6 @@
"dev": true,
"license": "MIT"
},
- "node_modules/fast-fifo": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz",
- "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==",
- "license": "MIT"
- },
"node_modules/fast-json-stable-stringify": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
@@ -10757,10 +10958,16 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/fast-sha256": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/fast-sha256/-/fast-sha256-1.3.0.tgz",
+ "integrity": "sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==",
+ "license": "Unlicense"
+ },
"node_modules/fast-uri": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz",
- "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==",
+ "version": "3.1.5",
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.5.tgz",
+ "integrity": "sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==",
"dev": true,
"funding": [
{
@@ -10826,12 +11033,6 @@
"node": ">=16.0.0"
}
},
- "node_modules/file-uri-to-path": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
- "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
- "license": "MIT"
- },
"node_modules/filelist": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.6.tgz",
@@ -10850,9 +11051,9 @@
"license": "MIT"
},
"node_modules/filelist/node_modules/brace-expansion": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.1.tgz",
- "integrity": "sha512-WR1cURNjuvBLMZBMbqM0UoE+WAfdUcEV1ccD8PVBVOI+Z3ND4+SZbN8RsfT2bMuG1qwz5RFvPukSZm5fF2D5eA==",
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.4.tgz",
+ "integrity": "sha512-hGfVzPxthbf3+2yjg/RBs60cB0FhqBS/zvdV/4wn4/BmN0bNMMHPc4V/BbFieqf1TKAGGAHnY4eSjajCl0f2Xg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -10969,16 +11170,16 @@
}
},
"node_modules/form-data": {
- "version": "4.0.5",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
- "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz",
+ "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==",
"license": "MIT",
"dependencies": {
"asynckit": "^0.4.0",
"combined-stream": "^1.0.8",
"es-set-tostringtag": "^2.1.0",
- "hasown": "^2.0.2",
- "mime-types": "^2.1.12"
+ "hasown": "^2.0.4",
+ "mime-types": "^2.1.35"
},
"engines": {
"node": ">= 6"
@@ -11024,12 +11225,12 @@
}
},
"node_modules/framer-motion": {
- "version": "12.42.2",
- "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.42.2.tgz",
- "integrity": "sha512-5XY9luDiu0oHfHBjpDthFMh0ES+122w6p/papSJBweMkO8Sn+PW2QaEgRblQBpWFnuvZS5qvarpt/hO2pjGmnw==",
+ "version": "12.43.0",
+ "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-12.43.0.tgz",
+ "integrity": "sha512-1eaL3RvR/kAlbG7UYcpMptEyzPoENO0c6w7ZnB3/hh2vSAz/6uGAFn6fdoqTBguNstf3MsFhJHsD/0DHiclG+g==",
"license": "MIT",
"dependencies": {
- "motion-dom": "^12.42.2",
+ "motion-dom": "^12.43.0",
"motion-utils": "^12.39.0",
"tslib": "^2.4.0"
},
@@ -11098,6 +11299,15 @@
"url": "https://github.com/sponsors/ljharb"
}
},
+ "node_modules/generate-function": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.3.1.tgz",
+ "integrity": "sha512-eeB5GfMNeevm/GRYq20ShmsaGcmI81kIX2K9XQx5miC8KdHaC6Jm0qQ8ZNeGOi7wYB8OsdxKs+Y2oVuTFuVwKQ==",
+ "license": "MIT",
+ "dependencies": {
+ "is-property": "^1.0.2"
+ }
+ },
"node_modules/gensync": {
"version": "1.0.0-beta.2",
"resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
@@ -11177,29 +11387,19 @@
"node": ">= 0.4"
}
},
- "node_modules/git-raw-commits": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-5.0.1.tgz",
- "integrity": "sha512-Y+csSm2GD/PCSh6Isd/WiMjNAydu0VBiG9J7EdQsNA5P9uXvLayqjmTsNlK5Gs9IhblFZqOU0yid5Il5JPoLiQ==",
+ "node_modules/get-tsconfig": {
+ "version": "4.14.0",
+ "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.14.0.tgz",
+ "integrity": "sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@conventional-changelog/git-client": "^2.6.0",
- "meow": "^13.0.0"
+ "resolve-pkg-maps": "^1.0.0"
},
- "bin": {
- "git-raw-commits": "src/cli.js"
- },
- "engines": {
- "node": ">=18"
+ "funding": {
+ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1"
}
},
- "node_modules/github-from-package": {
- "version": "0.0.0",
- "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
- "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==",
- "license": "MIT"
- },
"node_modules/glob": {
"version": "12.0.0",
"resolved": "https://registry.npmjs.org/glob/-/glob-12.0.0.tgz",
@@ -11254,9 +11454,9 @@
}
},
"node_modules/globals": {
- "version": "17.6.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-17.6.0.tgz",
- "integrity": "sha512-sepffkT8stwnIYbsMBpoCHJuJM5l98FUF2AnE07hfvE0m/qp3R586hw4jF4uadbhvg1ooIdzuu7CsfD2jzCaNA==",
+ "version": "17.9.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-17.9.0.tgz",
+ "integrity": "sha512-m/MvAW61QVU5VDNF1Vj8axt016h8w7L5TU1e9zlab7XIttAT2YAlCwl75K1fOqvMM9apmD7lbCIRhpfkhmxhCg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -11343,9 +11543,9 @@
}
},
"node_modules/hasown": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz",
- "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==",
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
+ "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==",
"license": "MIT",
"dependencies": {
"function-bind": "^1.1.2"
@@ -11516,13 +11716,13 @@
"license": "MIT"
},
"node_modules/html-parse-stringify": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/html-parse-stringify/-/html-parse-stringify-3.0.1.tgz",
- "integrity": "sha512-KknJ50kTInJ7qIScF3jeaFRpMpE8/lfiTdzf/twXyPBLAGrLRTmkz3AdTnKeh40X8k9L2fdYwEp/42WGXIRGcg==",
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/html-parse-stringify/-/html-parse-stringify-4.0.1.tgz",
+ "integrity": "sha512-0zHsZJrK7S3K2aucXWL6ycoYJ/iNtIcFHC/nYQgFklPtrv5LpJctIiSCroWZWeuoXvuyFdzp6KzjJQ+OT5MfFw==",
"dev": true,
"license": "MIT",
- "dependencies": {
- "void-elements": "3.1.0"
+ "funding": {
+ "url": "https://locize.com"
}
},
"node_modules/html-url-attributes": {
@@ -11601,9 +11801,9 @@
}
},
"node_modules/i18next": {
- "version": "26.3.4",
- "resolved": "https://registry.npmjs.org/i18next/-/i18next-26.3.4.tgz",
- "integrity": "sha512-pa7m0d7pBDqGHZxljT+WPFeyFgQ7P7SciPPo1tTqYuO0z4sqADYhwnBESmmGp/wEof1inwdls/k8ZgTg8rxFHA==",
+ "version": "26.3.6",
+ "resolved": "https://registry.npmjs.org/i18next/-/i18next-26.3.6.tgz",
+ "integrity": "sha512-Bu5Z2nAXgfVyM8xvW3jk9EKRIuX37PudsrBViThNFx7CR7aaYTpP01cxNB/E4c4UUzTDiAZRstEhsRfPOL/8xA==",
"dev": true,
"funding": [
{
@@ -11621,7 +11821,7 @@
],
"license": "MIT",
"peerDependencies": {
- "typescript": "^5 || ^6"
+ "typescript": "^5 || ^6 || ^7"
},
"peerDependenciesMeta": {
"typescript": {
@@ -11742,9 +11942,9 @@
"license": "MIT"
},
"node_modules/ip-address": {
- "version": "10.2.0",
- "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.2.0.tgz",
- "integrity": "sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==",
+ "version": "10.5.0",
+ "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.5.0.tgz",
+ "integrity": "sha512-R5SnVLJmgYYvf2F2ZgwSBnelz5G4q5AxIC277GDfUaNbrZKNANcBC7RHqYYePlszf4kBolVkJauG0ZjHHFh55g==",
"license": "MIT",
"engines": {
"node": ">= 12"
@@ -11846,16 +12046,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/is-obj": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz",
- "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/is-plain-obj": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz",
@@ -11882,6 +12072,12 @@
"integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
"license": "MIT"
},
+ "node_modules/is-property": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz",
+ "integrity": "sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==",
+ "license": "MIT"
+ },
"node_modules/isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
@@ -12005,9 +12201,9 @@
}
},
"node_modules/jose": {
- "version": "6.2.3",
- "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.3.tgz",
- "integrity": "sha512-YYVDInQKFJfR/xa3ojUTl8c2KoTwiL1R5Wg9YCydwH0x0B9grbzlg5HC7mMjCtUJjbQ/YnGEZIhI5tCgfTb4Hw==",
+ "version": "6.2.8",
+ "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.8.tgz",
+ "integrity": "sha512-Bsdjwm3Qsd/P0jR+BHDe3LytDfY7WBq2HmCCLIwuVRHMuEC9ae7/R474GIUdF1NgCyZjzVo/A9DOiOBtXq8ZoQ==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/panva"
@@ -12028,9 +12224,9 @@
"license": "MIT"
},
"node_modules/js-yaml": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.2.1.tgz",
- "integrity": "sha512-zfLtNfQqxVqq3uaTqSkh4x4hZw3KHobGUA0fJUj4wawW8bsQLTVqpHdXSIzidh7o+4lEW36tANuAGdaFx6Zgnw==",
+ "version": "5.2.3",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.2.3.tgz",
+ "integrity": "sha512-n+mUVyUX5bVv7G/G2zyIHOhdxfuU1dY2NOFzTQUWiMUbFss8b57NFlgCCaggU78wSw5KVS9cllzeLyzyR+n5nw==",
"funding": [
{
"type": "github",
@@ -12050,39 +12246,39 @@
}
},
"node_modules/jsdom": {
- "version": "29.1.1",
- "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-29.1.1.tgz",
- "integrity": "sha512-ECi4Fi2f7BdJtUKTflYRTiaMxIB0O6zfR1fX0GXpUrf6flp8QIYn1UT20YQqdSOfk2dfkCwS8LAFoJDEppNK5Q==",
+ "version": "30.0.1",
+ "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-30.0.1.tgz",
+ "integrity": "sha512-52v7mUVUfNQVYYqE1lcdaymWL0njO7lTLUog6ZvW2U5KsbiLk/GnZlVJ+qx0xfNJZ6Gn+KSpPNE52vurbxZwrA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@asamuzakjp/css-color": "^5.1.11",
- "@asamuzakjp/dom-selector": "^7.1.1",
+ "@asamuzakjp/css-color": "^6.0.5",
+ "@asamuzakjp/dom-selector": "^8.3.0",
"@bramus/specificity": "^2.4.2",
- "@csstools/css-syntax-patches-for-csstree": "^1.1.3",
- "@exodus/bytes": "^1.15.0",
+ "@csstools/css-syntax-patches-for-csstree": "^1.1.7",
+ "@exodus/bytes": "^1.15.1",
"css-tree": "^3.2.1",
"data-urls": "^7.0.0",
"decimal.js": "^10.6.0",
"html-encoding-sniffer": "^6.0.0",
"is-potential-custom-element-name": "^1.0.1",
- "lru-cache": "^11.3.5",
+ "lru-cache": "^11.5.2",
"parse5": "^8.0.1",
"saxes": "^6.0.0",
"symbol-tree": "^3.2.4",
- "tough-cookie": "^6.0.1",
- "undici": "^7.25.0",
+ "tough-cookie": "^6.0.2",
+ "undici": "^8.9.0",
"w3c-xmlserializer": "^5.0.0",
"webidl-conversions": "^8.0.1",
"whatwg-mimetype": "^5.0.0",
- "whatwg-url": "^16.0.1",
+ "whatwg-url": "^17.1.0",
"xml-name-validator": "^5.0.0"
},
"engines": {
- "node": "^20.19.0 || ^22.13.0 || >=24.0.0"
+ "node": "^22.22.2 || ^24.15.0 || >=26.0.0"
},
"peerDependencies": {
- "canvas": "^3.0.0"
+ "canvas": "^3.2.3"
},
"peerDependenciesMeta": {
"canvas": {
@@ -12091,23 +12287,28 @@
}
},
"node_modules/jsdom/node_modules/lru-cache": {
- "version": "11.5.1",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.1.tgz",
- "integrity": "sha512-RPimw/7aMdv2oqRrxKwvZXcPfwBrn/JZ2xYcY9Hus/6LaS3VOAKVWKWgNLCFSiOm1ESXinjsDlidVU7JlnCN2A==",
+ "version": "11.5.2",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz",
+ "integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==",
"dev": true,
"license": "BlueOak-1.0.0",
"engines": {
"node": "20 || >=22"
}
},
- "node_modules/jsdom/node_modules/undici": {
- "version": "7.27.2",
- "resolved": "https://registry.npmjs.org/undici/-/undici-7.27.2.tgz",
- "integrity": "sha512-uZsKNuzQxDMUY6M3pIMvy5tvlGmtq8XJ2oLAkfRKGNu+1VQAIvLy2xIVG5ATZl5wDXl/tddByAWCizRbOme+TA==",
+ "node_modules/jsdom/node_modules/whatwg-url": {
+ "version": "17.1.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-17.1.0.tgz",
+ "integrity": "sha512-3GeworPmc2ZfEEHP7lEbUfBX/L75wdEsi0rLNhXcXxnoN5jyq0SL5gCy06SGW2cyTIZdTvWIDQNQoza++vKeaw==",
"dev": true,
"license": "MIT",
+ "dependencies": {
+ "@exodus/bytes": "^1.15.1",
+ "tr46": "^6.0.0",
+ "webidl-conversions": "^8.0.1"
+ },
"engines": {
- "node": ">=20.18.1"
+ "node": "^22.14.0 || >=24.0.0"
}
},
"node_modules/jsesc": {
@@ -12137,6 +12338,19 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/json-schema-to-ts": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-3.1.1.tgz",
+ "integrity": "sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g==",
+ "license": "MIT",
+ "dependencies": {
+ "@babel/runtime": "^7.18.3",
+ "ts-algebra": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=16"
+ }
+ },
"node_modules/json-schema-traverse": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
@@ -12564,14 +12778,13 @@
"license": "MIT"
},
"node_modules/lint-staged": {
- "version": "17.0.8",
- "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-17.0.8.tgz",
- "integrity": "sha512-B2P/d+jVW0UXOQ0MVMLrB/9ydA1P+zz6jYfdrbbEd9ur3S2rcbduFWKiUCC02Sm5hbC8nrm7y24WuYMG54HfxA==",
+ "version": "17.3.0",
+ "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-17.3.0.tgz",
+ "integrity": "sha512-woZS3vNe3UKqBaLPvbLOtKRY4tLANpWQhom12MGWqC8Mh1lCOO+WgSwmX2amjJAqTY9BkXYW87fCUH5H9Ph6xw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "listr2": "^10.2.1",
- "picomatch": "^4.0.4",
+ "picomatch": "^4.0.5",
"string-argv": "^0.3.2",
"tinyexec": "^1.2.4"
},
@@ -12605,103 +12818,6 @@
"url": "https://github.com/sponsors/eemeli"
}
},
- "node_modules/listr2": {
- "version": "10.2.1",
- "resolved": "https://registry.npmjs.org/listr2/-/listr2-10.2.1.tgz",
- "integrity": "sha512-7I5knELsJKTUjXG+A6BkKAiGkW1i25fNa/xlUl9hFtk15WbE9jndA89xu5FzQKrY5llajE1hfZZFMILXkDHk/Q==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "cli-truncate": "^5.2.0",
- "eventemitter3": "^5.0.4",
- "log-update": "^6.1.0",
- "rfdc": "^1.4.1",
- "wrap-ansi": "^10.0.0"
- },
- "engines": {
- "node": ">=22.13.0"
- }
- },
- "node_modules/listr2/node_modules/ansi-styles": {
- "version": "6.2.3",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
- "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/listr2/node_modules/cli-truncate": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-5.2.0.tgz",
- "integrity": "sha512-xRwvIOMGrfOAnM1JYtqQImuaNtDEv9v6oIYAs4LIHwTiKee8uwvIi363igssOC0O5U04i4AlENs79LQLu9tEMw==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "slice-ansi": "^8.0.0",
- "string-width": "^8.2.0"
- },
- "engines": {
- "node": ">=20"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/listr2/node_modules/is-fullwidth-code-point": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz",
- "integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "get-east-asian-width": "^1.3.1"
- },
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/listr2/node_modules/slice-ansi": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-8.0.0.tgz",
- "integrity": "sha512-stxByr12oeeOyY2BlviTNQlYV5xOj47GirPr4yA1hE9JCtxfQN0+tVbkxwCtYDQWhEKWFHsEK48ORg5jrouCAg==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-styles": "^6.2.3",
- "is-fullwidth-code-point": "^5.1.0"
- },
- "engines": {
- "node": ">=20"
- },
- "funding": {
- "url": "https://github.com/chalk/slice-ansi?sponsor=1"
- }
- },
- "node_modules/listr2/node_modules/string-width": {
- "version": "8.2.1",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.2.1.tgz",
- "integrity": "sha512-IIaP0g3iy9Cyy18w3M9YcaDudujEAVHKt3a3QJg1+sr/oX96TbaGUubG0hJyCjCBThFH+tFpcIyoUHUn1ogaLA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "get-east-asian-width": "^1.5.0",
- "strip-ansi": "^7.1.2"
- },
- "engines": {
- "node": ">=20"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/locate-path": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
@@ -12767,114 +12883,11 @@
"integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==",
"license": "MIT"
},
- "node_modules/log-update": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz",
- "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-escapes": "^7.0.0",
- "cli-cursor": "^5.0.0",
- "slice-ansi": "^7.1.0",
- "strip-ansi": "^7.1.0",
- "wrap-ansi": "^9.0.0"
- },
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/log-update/node_modules/ansi-styles": {
- "version": "6.2.3",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
- "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/log-update/node_modules/emoji-regex": {
- "version": "10.6.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz",
- "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==",
- "dev": true,
- "license": "MIT"
- },
- "node_modules/log-update/node_modules/is-fullwidth-code-point": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz",
- "integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "get-east-asian-width": "^1.3.1"
- },
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/log-update/node_modules/slice-ansi": {
- "version": "7.1.2",
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz",
- "integrity": "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-styles": "^6.2.1",
- "is-fullwidth-code-point": "^5.0.0"
- },
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/chalk/slice-ansi?sponsor=1"
- }
- },
- "node_modules/log-update/node_modules/string-width": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
- "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "emoji-regex": "^10.3.0",
- "get-east-asian-width": "^1.0.0",
- "strip-ansi": "^7.1.0"
- },
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/log-update/node_modules/wrap-ansi": {
- "version": "9.0.2",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz",
- "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-styles": "^6.2.1",
- "string-width": "^7.0.0",
- "strip-ansi": "^7.1.0"
- },
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
- }
+ "node_modules/long": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/long/-/long-5.3.2.tgz",
+ "integrity": "sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==",
+ "license": "Apache-2.0"
},
"node_modules/longest-streak": {
"version": "3.1.0",
@@ -12935,10 +12948,25 @@
"yallist": "^3.0.2"
}
},
+ "node_modules/lru.min": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/lru.min/-/lru.min-1.1.4.tgz",
+ "integrity": "sha512-DqC6n3QQ77zdFpCMASA1a3Jlb64Hv2N2DciFGkO/4L9+q/IpIAuRlKOvCXabtRW6cQf8usbmM6BE/TOPysCdIA==",
+ "license": "MIT",
+ "engines": {
+ "bun": ">=1.0.0",
+ "deno": ">=1.30.0",
+ "node": ">=8.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/wellwelwel"
+ }
+ },
"node_modules/lucide-react": {
- "version": "1.20.0",
- "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-1.20.0.tgz",
- "integrity": "sha512-jhXLeC/7m0/tjL1nzMdKk6x256zWA6AtbhTVreHOiKPoeX2d6MK4FbyIQPpVq0E6iPWBisyy1TW+pEge/uMEuQ==",
+ "version": "1.28.0",
+ "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-1.28.0.tgz",
+ "integrity": "sha512-fARAFJULsGuDDydjp6+6blekG/sBIM29TerzLjc9bQUKAcEfrSc4ZQKb25KRz4OMKd87cZTb5dgq0w/T6KufVg==",
"dev": true,
"license": "ISC",
"peerDependencies": {
@@ -13347,19 +13375,6 @@
"node": ">= 0.8"
}
},
- "node_modules/meow": {
- "version": "13.2.0",
- "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz",
- "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/merge-descriptors": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
@@ -14019,31 +14034,6 @@
"url": "https://opencollective.com/express"
}
},
- "node_modules/mimic-function": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz",
- "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/mimic-response": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
- "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
- "license": "MIT",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/min-indent": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
@@ -14074,6 +14064,7 @@
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+ "dev": true,
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -14102,19 +14093,13 @@
"node": ">= 18"
}
},
- "node_modules/mkdirp-classic": {
- "version": "0.5.3",
- "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
- "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
- "license": "MIT"
- },
"node_modules/motion": {
- "version": "12.42.2",
- "resolved": "https://registry.npmjs.org/motion/-/motion-12.42.2.tgz",
- "integrity": "sha512-Atvv11yUKIid41cVrRBDVX5m8tF8kNpExRSlbpt6APClhDjtwQssgFHhQzejxw7/7YYbjHSPKBVbHo05BuJT5Q==",
+ "version": "12.43.0",
+ "resolved": "https://registry.npmjs.org/motion/-/motion-12.43.0.tgz",
+ "integrity": "sha512-BQgQbSa9Hn3/mtbib0MK53y6JSANa+YKUKlaYnWzAVDH424RYQ5LVpV3pNiWH00BA2z4ojsSdMzqT7g2FQwjuQ==",
"license": "MIT",
"dependencies": {
- "framer-motion": "^12.42.2",
+ "framer-motion": "^12.43.0",
"tslib": "^2.4.0"
},
"peerDependencies": {
@@ -14135,9 +14120,9 @@
}
},
"node_modules/motion-dom": {
- "version": "12.42.2",
- "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.42.2.tgz",
- "integrity": "sha512-5gIMWLp/PycBtJRJWRgjxke5n8dlvkSn2DrYW+tr3XcqAZY1xZh6BJyooJXCM8wdfM7wfMjkBJNLge1CKPUIRA==",
+ "version": "12.43.0",
+ "resolved": "https://registry.npmjs.org/motion-dom/-/motion-dom-12.43.0.tgz",
+ "integrity": "sha512-azKON4d9S65PEoFUiQTMTgPheEmzf2QngdRc50AKfJp9Q9mmcBVw22c8eMq9k8kxOFHdL7+WZY7N/5F/lwiDag==",
"license": "MIT",
"dependencies": {
"motion-utils": "^12.39.0"
@@ -14227,6 +14212,40 @@
"node": ">= 0.6"
}
},
+ "node_modules/mysql2": {
+ "version": "3.23.2",
+ "resolved": "https://registry.npmjs.org/mysql2/-/mysql2-3.23.2.tgz",
+ "integrity": "sha512-fxh3HpQ8vJtu/Mmnd4Xsur19jGjHGzRLMxptiDtOkbX7EVBgnafGSGDx1WGGVmJLClVh2LeeBMMo24IFv8wCyQ==",
+ "license": "MIT",
+ "dependencies": {
+ "aws-ssl-profiles": "^1.1.2",
+ "denque": "^2.1.0",
+ "generate-function": "^2.3.1",
+ "iconv-lite": "^0.7.2",
+ "long": "^5.3.2",
+ "lru.min": "^1.1.4",
+ "named-placeholders": "^1.1.6",
+ "sql-escaper": "^1.5.1"
+ },
+ "engines": {
+ "node": ">= 8.0"
+ },
+ "peerDependencies": {
+ "@types/node": ">= 8"
+ }
+ },
+ "node_modules/named-placeholders": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/named-placeholders/-/named-placeholders-1.1.6.tgz",
+ "integrity": "sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w==",
+ "license": "MIT",
+ "dependencies": {
+ "lru.min": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
"node_modules/nan": {
"version": "2.27.0",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.27.0.tgz",
@@ -14235,9 +14254,9 @@
"optional": true
},
"node_modules/nanoid": {
- "version": "5.1.16",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.1.16.tgz",
- "integrity": "sha512-kVrnsrJqMR8+oLJnGEmSWw9BivK5mt7H3FZatVRjrc5wGqFYuBxX1yG7+A7Gi5AefkX6t/oCkizcQgpu0cY1dQ==",
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-6.0.1.tgz",
+ "integrity": "sha512-3wVS3i51pE2pi1k5FFL/95BGfVS0kSsvDVuGXHOtxox/TywUmtgq+3qiTOTbs9J7KfHaXPiN171k/A6dBnaXFw==",
"funding": [
{
"type": "github",
@@ -14249,15 +14268,9 @@
"nanoid": "bin/nanoid.js"
},
"engines": {
- "node": "^18 || >=20"
+ "node": "^22 || ^24 || >=26"
}
},
- "node_modules/napi-build-utils": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz",
- "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==",
- "license": "MIT"
- },
"node_modules/natural-compare": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
@@ -14364,9 +14377,9 @@
}
},
"node_modules/node-gyp/node_modules/undici": {
- "version": "6.26.0",
- "resolved": "https://registry.npmjs.org/undici/-/undici-6.26.0.tgz",
- "integrity": "sha512-4yqz8a3n5HmGTlsbADNtr/dJlhkh/55Rq798G6ibiULcXbDtaLpTl1pvdqcbFfeoj3iSi52lePFM7h9H21cw/A==",
+ "version": "6.28.0",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-6.28.0.tgz",
+ "integrity": "sha512-LIY910g9TI13YS95lrMFrs8Rm/u/irgHeTWoKCoteeJ04CUJ92eEfj0rVn+7VKMPBpUPiUoBKfhNyLI23EE/KA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -14396,6 +14409,22 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/node-pty": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-1.1.0.tgz",
+ "integrity": "sha512-20JqtutY6JPXTUnL0ij1uad7Qe1baT46lyolh2sSENDd4sTzKZ4nmAFkeAARDKwmlLjPx6XKRlwRUxwjOy+lUg==",
+ "hasInstallScript": true,
+ "license": "MIT",
+ "dependencies": {
+ "node-addon-api": "^7.1.0"
+ }
+ },
+ "node_modules/node-pty/node_modules/node-addon-api": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz",
+ "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",
+ "license": "MIT"
+ },
"node_modules/node-releases": {
"version": "2.0.46",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.46.tgz",
@@ -14466,6 +14495,15 @@
"node": ">= 0.8"
}
},
+ "node_modules/on-headers": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz",
+ "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -14475,22 +14513,6 @@
"wrappy": "1"
}
},
- "node_modules/onetime": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz",
- "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "mimic-function": "^5.0.0"
- },
- "engines": {
- "node": ">=18"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/optionator": {
"version": "0.9.4",
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz",
@@ -14758,6 +14780,95 @@
"url": "https://github.com/sponsors/jet2jet"
}
},
+ "node_modules/pg": {
+ "version": "8.22.0",
+ "resolved": "https://registry.npmjs.org/pg/-/pg-8.22.0.tgz",
+ "integrity": "sha512-8wih1vVIBMxoUM2oB4soJsD9tDnDpLv4OXBJ+EJzFsvycD+lfyIreC2gGHq78f8jbLLt+bvlPTFdFZfJkOuzAA==",
+ "license": "MIT",
+ "dependencies": {
+ "pg-connection-string": "^2.14.0",
+ "pg-pool": "^3.14.0",
+ "pg-protocol": "^1.15.0",
+ "pg-types": "2.2.0",
+ "pgpass": "1.0.5"
+ },
+ "engines": {
+ "node": ">= 16.0.0"
+ },
+ "optionalDependencies": {
+ "pg-cloudflare": "^1.4.0"
+ },
+ "peerDependencies": {
+ "pg-native": ">=3.0.1"
+ },
+ "peerDependenciesMeta": {
+ "pg-native": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/pg-cloudflare": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/pg-cloudflare/-/pg-cloudflare-1.4.0.tgz",
+ "integrity": "sha512-Vo7z/6rrQYxpNRylp4Tlob2elzbh+N/MOQbxFVWCxS7oEx6jF53GTJFxK2WWpKuBRkmiin4Mt+xofFDjx09R0A==",
+ "license": "MIT",
+ "optional": true
+ },
+ "node_modules/pg-connection-string": {
+ "version": "2.14.0",
+ "resolved": "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.14.0.tgz",
+ "integrity": "sha512-XwWDGcLRGCXAR8F/AM5bG7Q+A3Wm2s6QeEjlOKZLlH3UYcguiqCWKyWXVag5TLTIjR7oOJUY8kcADaZgWPyLeg==",
+ "license": "MIT"
+ },
+ "node_modules/pg-int8": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz",
+ "integrity": "sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==",
+ "license": "ISC",
+ "engines": {
+ "node": ">=4.0.0"
+ }
+ },
+ "node_modules/pg-pool": {
+ "version": "3.14.0",
+ "resolved": "https://registry.npmjs.org/pg-pool/-/pg-pool-3.14.0.tgz",
+ "integrity": "sha512-gKtPkFdQPU3DksooVLi9LsjZxrsBUZIpa+7aVx+LV5pNh0KzP4Zleud2po+ConrxbuXGBJ6Hfer6hdgpIBpBaw==",
+ "license": "MIT",
+ "peerDependencies": {
+ "pg": ">=8.0"
+ }
+ },
+ "node_modules/pg-protocol": {
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.15.0.tgz",
+ "integrity": "sha512-cq9sECI5s0+uPUXjbz8ioyPJni6RzsRib0US67i5IoTZKw8fNeYlVE7u8F4dG7vEJJtc5wdD1K189lCCUwqWTQ==",
+ "license": "MIT"
+ },
+ "node_modules/pg-types": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/pg-types/-/pg-types-2.2.0.tgz",
+ "integrity": "sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==",
+ "license": "MIT",
+ "dependencies": {
+ "pg-int8": "1.0.1",
+ "postgres-array": "~2.0.0",
+ "postgres-bytea": "~1.0.0",
+ "postgres-date": "~1.0.4",
+ "postgres-interval": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/pgpass": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/pgpass/-/pgpass-1.0.5.tgz",
+ "integrity": "sha512-FdW9r/jQZhSeohs1Z3sI1yxFQNFvMcnmfuj4WBMUTxOrAyLMaTcE1aAMBiTlbMNaXvBCQuVi0R7hd8udDSP7ug==",
+ "license": "MIT",
+ "dependencies": {
+ "split2": "^4.1.0"
+ }
+ },
"node_modules/picocolors": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
@@ -14766,9 +14877,9 @@
"license": "ISC"
},
"node_modules/picomatch": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",
- "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==",
+ "version": "4.0.5",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz",
+ "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==",
"dev": true,
"license": "MIT",
"engines": {
@@ -14834,9 +14945,9 @@
}
},
"node_modules/postcss": {
- "version": "8.5.15",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.15.tgz",
- "integrity": "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==",
+ "version": "8.5.26",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz",
+ "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==",
"dev": true,
"funding": [
{
@@ -14854,7 +14965,7 @@
],
"license": "MIT",
"dependencies": {
- "nanoid": "^3.3.12",
+ "nanoid": "^3.3.17",
"picocolors": "^1.1.1",
"source-map-js": "^1.2.1"
},
@@ -14863,9 +14974,9 @@
}
},
"node_modules/postcss/node_modules/nanoid": {
- "version": "3.3.12",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz",
- "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==",
+ "version": "3.3.18",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz",
+ "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==",
"dev": true,
"funding": [
{
@@ -14881,43 +14992,43 @@
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
- "node_modules/prebuild-install": {
- "name": "@mmomtchev/prebuild-install",
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@mmomtchev/prebuild-install/-/prebuild-install-1.0.2.tgz",
- "integrity": "sha512-0Vje0eg5XQa8Ta1jtQiWqnT1kS/P7OAAvFJ4VZG5EXT2gJmpmPA5SrsDrh++BqNjIxYy8O6aF4wZjJc/k4JQ6w==",
+ "node_modules/postgres-array": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-2.0.0.tgz",
+ "integrity": "sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA==",
"license": "MIT",
- "dependencies": {
- "detect-libc": "^2.0.3",
- "expand-template": "^2.0.3",
- "github-from-package": "^0.0.0",
- "minimist": "^1.2.8",
- "mkdirp-classic": "^0.5.3",
- "napi-build-utils": "^1.0.2",
- "node-abi": "^3.63.0",
- "pump": "^3.0.0",
- "rc": "^1.2.8",
- "simple-get": "^4.0.1",
- "tar-fs": "^3.0.6",
- "tunnel-agent": "^0.6.0"
- },
- "bin": {
- "prebuild-install": "bin.js"
- },
"engines": {
- "node": ">=18"
+ "node": ">=4"
}
},
- "node_modules/prebuild-install/node_modules/node-abi": {
- "version": "3.92.0",
- "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.92.0.tgz",
- "integrity": "sha512-KdHvFWZjEKDf0cakgFjebl371GPsISX2oZHcuyKqM7DtogIsHrqKeLTo8wBHxaXRAQlY2PsPlZmfo+9ZCxEREQ==",
+ "node_modules/postgres-bytea": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/postgres-bytea/-/postgres-bytea-1.0.1.tgz",
+ "integrity": "sha512-5+5HqXnsZPE65IJZSMkZtURARZelel2oXUEO8rH83VS/hxH5vv1uHquPg5wZs8yMAfdv971IU+kcPUczi7NVBQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/postgres-date": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/postgres-date/-/postgres-date-1.0.7.tgz",
+ "integrity": "sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/postgres-interval": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/postgres-interval/-/postgres-interval-1.2.0.tgz",
+ "integrity": "sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ==",
"license": "MIT",
"dependencies": {
- "semver": "^7.3.5"
+ "xtend": "^4.0.0"
},
"engines": {
- "node": ">=10"
+ "node": ">=0.10.0"
}
},
"node_modules/precond": {
@@ -14939,9 +15050,9 @@
}
},
"node_modules/prettier": {
- "version": "3.8.4",
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.4.tgz",
- "integrity": "sha512-N2MylSdi48+5N/6S5j+maeHbUSIzzZ5uOcX5Hm4QpV8Dkb1HFjfAKTKX6yNPJQD9AhcT3ifHNB66tWTTJDi11Q==",
+ "version": "3.9.6",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz",
+ "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==",
"dev": true,
"license": "MIT",
"bin": {
@@ -15119,16 +15230,6 @@
"node": ">=10"
}
},
- "node_modules/pump": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz",
- "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==",
- "license": "MIT",
- "dependencies": {
- "end-of-stream": "^1.1.0",
- "once": "^1.3.1"
- }
- },
"node_modules/punycode": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
@@ -15338,67 +15439,67 @@
}
},
"node_modules/radix-ui": {
- "version": "1.6.1",
- "resolved": "https://registry.npmjs.org/radix-ui/-/radix-ui-1.6.1.tgz",
- "integrity": "sha512-QXDXJtB6sK83mLASONYUZCauatcWb+knFviFpN1EhtdbbmlsRmzCLrbZSKztnNiem2KOHIBbiDbauVB7SORXMw==",
+ "version": "1.6.7",
+ "resolved": "https://registry.npmjs.org/radix-ui/-/radix-ui-1.6.7.tgz",
+ "integrity": "sha512-QBdhh1arIEUvPC0dQ5+nwWAxt7+N+oP/9jPwjJkGFoSk/sqxg32gJtSXGtFh8frAIcS6oC9cx2Q+7KYCQLOAeA==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@radix-ui/primitive": "1.1.4",
- "@radix-ui/react-accessible-icon": "1.1.11",
- "@radix-ui/react-accordion": "1.2.15",
- "@radix-ui/react-alert-dialog": "1.1.18",
- "@radix-ui/react-arrow": "1.1.11",
- "@radix-ui/react-aspect-ratio": "1.1.11",
- "@radix-ui/react-avatar": "1.2.1",
- "@radix-ui/react-checkbox": "1.3.6",
- "@radix-ui/react-collapsible": "1.1.15",
- "@radix-ui/react-collection": "1.1.11",
- "@radix-ui/react-compose-refs": "1.1.3",
- "@radix-ui/react-context": "1.1.4",
- "@radix-ui/react-context-menu": "2.3.2",
- "@radix-ui/react-dialog": "1.1.18",
- "@radix-ui/react-direction": "1.1.2",
- "@radix-ui/react-dismissable-layer": "1.1.14",
- "@radix-ui/react-dropdown-menu": "2.1.19",
- "@radix-ui/react-focus-guards": "1.1.4",
- "@radix-ui/react-focus-scope": "1.1.11",
- "@radix-ui/react-form": "0.1.11",
- "@radix-ui/react-hover-card": "1.1.18",
- "@radix-ui/react-label": "2.1.11",
- "@radix-ui/react-menu": "2.1.19",
- "@radix-ui/react-menubar": "1.1.19",
- "@radix-ui/react-navigation-menu": "1.2.17",
- "@radix-ui/react-one-time-password-field": "0.1.11",
- "@radix-ui/react-password-toggle-field": "0.1.6",
- "@radix-ui/react-popover": "1.1.18",
- "@radix-ui/react-popper": "1.3.2",
- "@radix-ui/react-portal": "1.1.13",
- "@radix-ui/react-presence": "1.1.6",
- "@radix-ui/react-primitive": "2.1.7",
- "@radix-ui/react-progress": "1.1.11",
- "@radix-ui/react-radio-group": "1.4.2",
- "@radix-ui/react-roving-focus": "1.1.14",
- "@radix-ui/react-scroll-area": "1.2.13",
- "@radix-ui/react-select": "2.3.2",
- "@radix-ui/react-separator": "1.1.11",
- "@radix-ui/react-slider": "1.4.2",
- "@radix-ui/react-slot": "1.3.0",
- "@radix-ui/react-switch": "1.3.2",
- "@radix-ui/react-tabs": "1.1.16",
- "@radix-ui/react-toast": "1.2.18",
- "@radix-ui/react-toggle": "1.1.13",
- "@radix-ui/react-toggle-group": "1.1.14",
- "@radix-ui/react-toolbar": "1.1.14",
- "@radix-ui/react-tooltip": "1.2.11",
- "@radix-ui/react-use-callback-ref": "1.1.2",
- "@radix-ui/react-use-controllable-state": "1.2.3",
- "@radix-ui/react-use-effect-event": "0.0.3",
- "@radix-ui/react-use-escape-keydown": "1.1.3",
- "@radix-ui/react-use-is-hydrated": "0.1.1",
- "@radix-ui/react-use-layout-effect": "1.1.2",
- "@radix-ui/react-use-size": "1.1.2",
- "@radix-ui/react-visually-hidden": "1.2.7"
+ "@radix-ui/primitive": "1.1.7",
+ "@radix-ui/react-accessible-icon": "1.1.15",
+ "@radix-ui/react-accordion": "1.2.20",
+ "@radix-ui/react-alert-dialog": "1.1.23",
+ "@radix-ui/react-arrow": "1.1.15",
+ "@radix-ui/react-aspect-ratio": "1.1.15",
+ "@radix-ui/react-avatar": "1.2.6",
+ "@radix-ui/react-checkbox": "1.3.11",
+ "@radix-ui/react-collapsible": "1.1.20",
+ "@radix-ui/react-collection": "1.1.15",
+ "@radix-ui/react-compose-refs": "1.1.5",
+ "@radix-ui/react-context": "1.2.2",
+ "@radix-ui/react-context-menu": "2.3.7",
+ "@radix-ui/react-dialog": "1.1.23",
+ "@radix-ui/react-direction": "1.1.4",
+ "@radix-ui/react-dismissable-layer": "1.1.19",
+ "@radix-ui/react-dropdown-menu": "2.1.24",
+ "@radix-ui/react-focus-guards": "1.1.6",
+ "@radix-ui/react-focus-scope": "1.1.16",
+ "@radix-ui/react-form": "0.1.16",
+ "@radix-ui/react-hover-card": "1.1.23",
+ "@radix-ui/react-label": "2.1.15",
+ "@radix-ui/react-menu": "2.1.24",
+ "@radix-ui/react-menubar": "1.1.24",
+ "@radix-ui/react-navigation-menu": "1.2.22",
+ "@radix-ui/react-one-time-password-field": "0.1.16",
+ "@radix-ui/react-password-toggle-field": "0.1.11",
+ "@radix-ui/react-popover": "1.1.23",
+ "@radix-ui/react-popper": "1.3.7",
+ "@radix-ui/react-portal": "1.1.17",
+ "@radix-ui/react-presence": "1.1.10",
+ "@radix-ui/react-primitive": "2.1.10",
+ "@radix-ui/react-progress": "1.1.16",
+ "@radix-ui/react-radio-group": "1.4.7",
+ "@radix-ui/react-roving-focus": "1.1.19",
+ "@radix-ui/react-scroll-area": "1.2.18",
+ "@radix-ui/react-select": "2.3.7",
+ "@radix-ui/react-separator": "1.1.15",
+ "@radix-ui/react-slider": "1.4.7",
+ "@radix-ui/react-slot": "1.3.3",
+ "@radix-ui/react-switch": "1.3.7",
+ "@radix-ui/react-tabs": "1.1.21",
+ "@radix-ui/react-toast": "1.2.23",
+ "@radix-ui/react-toggle": "1.1.18",
+ "@radix-ui/react-toggle-group": "1.1.19",
+ "@radix-ui/react-toolbar": "1.1.19",
+ "@radix-ui/react-tooltip": "1.2.16",
+ "@radix-ui/react-use-callback-ref": "1.1.4",
+ "@radix-ui/react-use-controllable-state": "1.2.6",
+ "@radix-ui/react-use-effect-event": "0.0.5",
+ "@radix-ui/react-use-escape-keydown": "1.1.5",
+ "@radix-ui/react-use-is-hydrated": "0.1.3",
+ "@radix-ui/react-use-layout-effect": "1.1.4",
+ "@radix-ui/react-use-size": "1.1.4",
+ "@radix-ui/react-visually-hidden": "1.2.11"
},
"peerDependencies": {
"@types/react": "*",
@@ -15439,40 +15540,10 @@
"node": ">= 0.10"
}
},
- "node_modules/rc": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
- "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
- "license": "(BSD-2-Clause OR MIT OR Apache-2.0)",
- "dependencies": {
- "deep-extend": "^0.6.0",
- "ini": "~1.3.0",
- "minimist": "^1.2.0",
- "strip-json-comments": "~2.0.1"
- },
- "bin": {
- "rc": "cli.js"
- }
- },
- "node_modules/rc/node_modules/ini": {
- "version": "1.3.8",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
- "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
- "license": "ISC"
- },
- "node_modules/rc/node_modules/strip-json-comments": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
- "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/react": {
- "version": "19.2.7",
- "resolved": "https://registry.npmjs.org/react/-/react-19.2.7.tgz",
- "integrity": "sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ==",
+ "version": "19.2.8",
+ "resolved": "https://registry.npmjs.org/react/-/react-19.2.8.tgz",
+ "integrity": "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==",
"dev": true,
"license": "MIT",
"engines": {
@@ -15494,16 +15565,16 @@
}
},
"node_modules/react-dom": {
- "version": "19.2.7",
- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.7.tgz",
- "integrity": "sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ==",
+ "version": "19.2.8",
+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.8.tgz",
+ "integrity": "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"scheduler": "^0.27.0"
},
"peerDependencies": {
- "react": "^19.2.7"
+ "react": "^19.2.8"
}
},
"node_modules/react-h5-audio-player": {
@@ -15525,9 +15596,9 @@
}
},
"node_modules/react-hook-form": {
- "version": "7.79.0",
- "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.79.0.tgz",
- "integrity": "sha512-mhYp/MTmXvzYX6AJcJVko0rktoIhhmRnEouObj4wF5i/tCttgJvnp1+9wRkpITZjDTqpo4IOSJqu0dBlPlV/Lw==",
+ "version": "7.84.0",
+ "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.84.0.tgz",
+ "integrity": "sha512-+hWvQP6GLco56mDwrbU4XnHix8t1z90ltZsDIrREl+jnQFQxYLX8oAzqe/Xn8nHpmoXTY5M6oEXrAhbP1qevNQ==",
"dev": true,
"license": "MIT",
"engines": {
@@ -15542,20 +15613,20 @@
}
},
"node_modules/react-i18next": {
- "version": "17.0.8",
- "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-17.0.8.tgz",
- "integrity": "sha512-0ooKbGLU8JXhe1zwpQUWIeXSgLPOfwJmgheWRIUpcoA0CpyabpGhayjdG+/eA5esC1AQ8h2jWpXjJfzQzeDOCw==",
+ "version": "17.0.11",
+ "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-17.0.11.tgz",
+ "integrity": "sha512-cDtkXgxjuFTWUH6V+aQn1Ve5vDiUztCNPWW5GtSHDccsgRXO1nE6QFWCEmc1KAutrb3OUv87wFShJL5RhUwPXg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.29.2",
- "html-parse-stringify": "^3.0.1",
+ "html-parse-stringify": "^4.0.1",
"use-sync-external-store": "^1.6.0"
},
"peerDependencies": {
"i18next": ">= 26.2.0",
"react": ">= 16.8.0",
- "typescript": "^5 || ^6"
+ "typescript": "^5 || ^6 || ^7"
},
"peerDependenciesMeta": {
"react-dom": {
@@ -15570,9 +15641,9 @@
}
},
"node_modules/react-icons": {
- "version": "5.6.0",
- "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.6.0.tgz",
- "integrity": "sha512-RH93p5ki6LfOiIt0UtDyNg/cee+HLVR6cHHtW3wALfo+eOHTp8RnU2kRkI6E+H19zMIs03DyxUG/GfZMOGvmiA==",
+ "version": "5.7.0",
+ "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.7.0.tgz",
+ "integrity": "sha512-LBLy340Rzqy6+/yVhZKT3B/QpP1BZaesGqasf09HPOBzRarcDIFH0WwXlXQfE7q7ipxK4MSiC5DIBWURCny6fw==",
"dev": true,
"license": "MIT",
"peerDependencies": {
@@ -15952,21 +16023,14 @@
"node": ">=8"
}
},
- "node_modules/restore-cursor": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz",
- "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==",
+ "node_modules/resolve-pkg-maps": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz",
+ "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==",
"dev": true,
"license": "MIT",
- "dependencies": {
- "onetime": "^7.0.0",
- "signal-exit": "^4.1.0"
- },
- "engines": {
- "node": ">=18"
- },
"funding": {
- "url": "https://github.com/sponsors/sindresorhus"
+ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1"
}
},
"node_modules/retry": {
@@ -15979,21 +16043,14 @@
"node": ">= 4"
}
},
- "node_modules/rfdc": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz",
- "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==",
- "dev": true,
- "license": "MIT"
- },
"node_modules/rolldown": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.3.tgz",
- "integrity": "sha512-i00lAJ2ks1BYr7rjNjKC7BcqAS7nVfiT3QX1SI5aY+AFHblCmaUf9OE9dbdzDvW6dJxbi2ZCZiy9v3CcwOiX3g==",
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.3.tgz",
+ "integrity": "sha512-rn9wpmxplLf7NLNyCk9FyWh3FM43DbY8jOzCdEPzH7uflhTftRbCEpqi6Ly2osgoU8OwObtmavMbWLaWy4LX7A==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@oxc-project/types": "=0.133.0",
+ "@oxc-project/types": "=0.143.0",
"@rolldown/pluginutils": "^1.0.0"
},
"bin": {
@@ -16003,21 +16060,20 @@
"node": "^20.19.0 || >=22.12.0"
},
"optionalDependencies": {
- "@rolldown/binding-android-arm64": "1.0.3",
- "@rolldown/binding-darwin-arm64": "1.0.3",
- "@rolldown/binding-darwin-x64": "1.0.3",
- "@rolldown/binding-freebsd-x64": "1.0.3",
- "@rolldown/binding-linux-arm-gnueabihf": "1.0.3",
- "@rolldown/binding-linux-arm64-gnu": "1.0.3",
- "@rolldown/binding-linux-arm64-musl": "1.0.3",
- "@rolldown/binding-linux-ppc64-gnu": "1.0.3",
- "@rolldown/binding-linux-s390x-gnu": "1.0.3",
- "@rolldown/binding-linux-x64-gnu": "1.0.3",
- "@rolldown/binding-linux-x64-musl": "1.0.3",
- "@rolldown/binding-openharmony-arm64": "1.0.3",
- "@rolldown/binding-wasm32-wasi": "1.0.3",
- "@rolldown/binding-win32-arm64-msvc": "1.0.3",
- "@rolldown/binding-win32-x64-msvc": "1.0.3"
+ "@rolldown/binding-android-arm64": "1.2.3",
+ "@rolldown/binding-darwin-arm64": "1.2.3",
+ "@rolldown/binding-darwin-x64": "1.2.3",
+ "@rolldown/binding-freebsd-x64": "1.2.3",
+ "@rolldown/binding-linux-arm-gnueabihf": "1.2.3",
+ "@rolldown/binding-linux-arm64-gnu": "1.2.3",
+ "@rolldown/binding-linux-arm64-musl": "1.2.3",
+ "@rolldown/binding-linux-ppc64-gnu": "1.2.3",
+ "@rolldown/binding-linux-s390x-gnu": "1.2.3",
+ "@rolldown/binding-linux-x64-gnu": "1.2.3",
+ "@rolldown/binding-linux-x64-musl": "1.2.3",
+ "@rolldown/binding-openharmony-arm64": "1.2.3",
+ "@rolldown/binding-win32-arm64-msvc": "1.2.3",
+ "@rolldown/binding-win32-x64-msvc": "1.2.3"
}
},
"node_modules/router": {
@@ -16236,7 +16292,6 @@
"version": "0.35.3",
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.3.tgz",
"integrity": "sha512-ej0zVHuZGHCiABXcNxeYhpRnPNPAcvbG8RMdBAhDAxLKkCRVSpK3Iyu7qbqw3JMzoj0REeM6f3tJLtVwl0023Q==",
- "dev": true,
"license": "Apache-2.0",
"dependencies": {
"@img/colour": "^1.1.0",
@@ -16306,9 +16361,9 @@
}
},
"node_modules/shell-quote": {
- "version": "1.8.4",
- "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.4.tgz",
- "integrity": "sha512-VsC6n6vz1ihYYyZZwX7YZSF5l5x36ca17OC+a69h94YqB7X6XLwf+5MOgynYir2SLFUbl8gIYvBo8K8RoNQ6bQ==",
+ "version": "1.9.0",
+ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.9.0.tgz",
+ "integrity": "sha512-Iov+JwFv/2HcTpcwNMKd8+IWNb8tboQJNQTkAY/LLVK7gGH9jy+LGkVqPxfekHl+yMmiqXszdGWXgkfml7hjqA==",
"dev": true,
"license": "MIT",
"engines": {
@@ -16410,51 +16465,6 @@
"url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/simple-concat": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
- "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT"
- },
- "node_modules/simple-get": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz",
- "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "license": "MIT",
- "dependencies": {
- "decompress-response": "^6.0.0",
- "once": "^1.3.1",
- "simple-concat": "^1.0.0"
- }
- },
"node_modules/simple-update-notifier": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
@@ -16583,6 +16593,30 @@
"node": ">= 0.10.0"
}
},
+ "node_modules/split2": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz",
+ "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
+ "license": "ISC",
+ "engines": {
+ "node": ">= 10.x"
+ }
+ },
+ "node_modules/sql-escaper": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/sql-escaper/-/sql-escaper-1.5.1.tgz",
+ "integrity": "sha512-4toX5E1fQbBrpfXidaHnF0669nkAdETeIPTs2SUjxxD7RRIs9ICG4gtpmfc68JCEKehsdwLFqBu9VlQqZ1P1gg==",
+ "license": "MIT",
+ "engines": {
+ "bun": ">=1.0.0",
+ "deno": ">=2.0.0",
+ "node": ">=12.0.0"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/mysqljs/sql-escaper?sponsor=1"
+ }
+ },
"node_modules/ssh2": {
"version": "1.17.0",
"resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.17.0.tgz",
@@ -16607,6 +16641,16 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/standardwebhooks": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/standardwebhooks/-/standardwebhooks-1.0.0.tgz",
+ "integrity": "sha512-BbHGOQK9olHPMvQNHWul6MYlrRTAOKn03rOe4A8O3CLWhNf4YHBqq2HJKKC+sfqpxiBY52pNeesD6jIiLDz8jg==",
+ "license": "MIT",
+ "dependencies": {
+ "@stablelib/base64": "^1.0.0",
+ "fast-sha256": "^1.3.0"
+ }
+ },
"node_modules/stat-mode": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-1.0.0.tgz",
@@ -16648,17 +16692,6 @@
"node": ">=10.0.0"
}
},
- "node_modules/streamx": {
- "version": "2.26.0",
- "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.26.0.tgz",
- "integrity": "sha512-VvNG1K72Po/xwJzxZFnZ++Tbrv4lwSptsbkFuzXCJAYZvCK5nnxsvXU6ajqkv7chyiI1Y0YXq2Jh8Iy8Y7NF/A==",
- "license": "MIT",
- "dependencies": {
- "events-universal": "^1.0.0",
- "fast-fifo": "^1.3.2",
- "text-decoder": "^1.1.0"
- }
- },
"node_modules/string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
@@ -16842,9 +16875,9 @@
}
},
"node_modules/tailwindcss": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.2.tgz",
- "integrity": "sha512-WtctNNSH8A9jlMIqxzuYumOHU5uGZyRv0Q5svQl+oEPy5w84YpBxdb7MdqyiSPQge5jTJ6zFQLq0PFygdccSBA==",
+ "version": "4.3.3",
+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz",
+ "integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==",
"dev": true,
"license": "MIT"
},
@@ -16863,9 +16896,9 @@
}
},
"node_modules/tar": {
- "version": "7.5.15",
- "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.15.tgz",
- "integrity": "sha512-dzGK0boVlC4W5QFuQN1EFSl3bIDYsk7Tj40U6eIBnK2k/8ml7TZ5agbI5j5+qnoVcAA+rNtBml8SEiLxZpNqRQ==",
+ "version": "7.5.22",
+ "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.22.tgz",
+ "integrity": "sha512-MFO/QzvtAOmJbkhOaCTvbGcFN9L9b+JunIsDwaKljSOdcLMea3NJ1k9Usz/rjdfSXTq4dfzfeS7W4p4YOAAHeA==",
"dev": true,
"license": "BlueOak-1.0.0",
"dependencies": {
@@ -16879,32 +16912,6 @@
"node": ">=18"
}
},
- "node_modules/tar-fs": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-3.1.2.tgz",
- "integrity": "sha512-QGxxTxxyleAdyM3kpFs14ymbYmNFrfY+pHj7Z8FgtbZ7w2//VAgLMac7sT6nRpIHjppXO2AwwEOg0bPFVRcmXw==",
- "license": "MIT",
- "dependencies": {
- "pump": "^3.0.0",
- "tar-stream": "^3.1.5"
- },
- "optionalDependencies": {
- "bare-fs": "^4.0.1",
- "bare-path": "^3.0.0"
- }
- },
- "node_modules/tar-stream": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-3.2.0.tgz",
- "integrity": "sha512-ojzvCvVaNp6aOTFmG7jaRD0meowIAuPc3cMMhSgKiVWws1GyHbGd/xvnyuRKcKlMpt3qvxx6r0hreCNITP9hIg==",
- "license": "MIT",
- "dependencies": {
- "b4a": "^1.6.4",
- "bare-fs": "^4.5.5",
- "fast-fifo": "^1.2.0",
- "streamx": "^2.15.0"
- }
- },
"node_modules/tar/node_modules/yallist": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-5.0.0.tgz",
@@ -16915,15 +16922,6 @@
"node": ">=18"
}
},
- "node_modules/teex": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz",
- "integrity": "sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==",
- "license": "MIT",
- "dependencies": {
- "streamx": "^2.12.5"
- }
- },
"node_modules/temp-file": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/temp-file/-/temp-file-3.4.0.tgz",
@@ -16935,15 +16933,6 @@
"fs-extra": "^10.0.0"
}
},
- "node_modules/text-decoder": {
- "version": "1.2.7",
- "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.7.tgz",
- "integrity": "sha512-vlLytXkeP4xvEq2otHeJfSQIRyWxo/oZGEbXrtEEF9Hnmrdly59sUbzZ/QgyWuLYHctCHxFF4tRQZNQ9k60ExQ==",
- "license": "Apache-2.0",
- "dependencies": {
- "b4a": "^1.6.4"
- }
- },
"node_modules/tiny-async-pool": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/tiny-async-pool/-/tiny-async-pool-1.3.0.tgz",
@@ -17016,22 +17005,22 @@
}
},
"node_modules/tldts": {
- "version": "7.4.2",
- "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.4.2.tgz",
- "integrity": "sha512-kCwffuaH8ntKtygnWe1b4BJKWiCUH30n5KfoTr6IchcXOwR7chAOFJxFrH3vjANafUYrIA4a7SDL+nn7SiR4Sw==",
+ "version": "7.4.10",
+ "resolved": "https://registry.npmjs.org/tldts/-/tldts-7.4.10.tgz",
+ "integrity": "sha512-GgouD1B+sWwvkaEq8vXC15DjQitxbvs12oIXELpconwm+Tg3zfcEv4jgzq3vtKverDXsg3VI8aRgNL2Nra0Iog==",
"dev": true,
"license": "MIT",
"dependencies": {
- "tldts-core": "^7.4.2"
+ "tldts-core": "^7.4.10"
},
"bin": {
"tldts": "bin/cli.js"
}
},
"node_modules/tldts-core": {
- "version": "7.4.2",
- "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.4.2.tgz",
- "integrity": "sha512-nwEyF4vl4RSJjwSjBUmOSxc3BFPoIFdlRthJ6e+5v9P3bHNsoD06UjuqMUspqp7vsEZ1beaHi1km+optiE17yA==",
+ "version": "7.4.10",
+ "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.4.10.tgz",
+ "integrity": "sha512-KnQjp53ZekKgm/r3l+u8kJGGzYgrWdP8+Mql7a4vijh2WE0IrZWspQj/TpTxDho/YxO+AnOZnIjQcCD+q6iJsw==",
"dev": true,
"license": "MIT"
},
@@ -17075,9 +17064,9 @@
}
},
"node_modules/tough-cookie": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.1.tgz",
- "integrity": "sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==",
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-6.0.2.tgz",
+ "integrity": "sha512-exgYmnmL/sJpR3upZfXG5PoatXQii55xAiXGXzY+sROLZ/Y+SLcp9PgJNI9Vz37HpQ74WvDcLT8eqm+kV3FzrA==",
"dev": true,
"license": "BSD-3-Clause",
"dependencies": {
@@ -17142,6 +17131,12 @@
"utf8-byte-length": "^1.0.1"
}
},
+ "node_modules/ts-algebra": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/ts-algebra/-/ts-algebra-2.0.0.tgz",
+ "integrity": "sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw==",
+ "license": "MIT"
+ },
"node_modules/ts-api-utils": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz",
@@ -17161,6 +17156,25 @@
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
"license": "0BSD"
},
+ "node_modules/tsx": {
+ "version": "4.23.1",
+ "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.23.1.tgz",
+ "integrity": "sha512-GQHnkIfxyx1wYCOS/wonik5MVRZU9hi1TEZmzGZSCJB1y9YgoZ8H6itNE/u4suE+yLmOzuE4E5S4TZ/ZX2wcWQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "esbuild": "~0.28.0"
+ },
+ "bin": {
+ "tsx": "dist/cli.mjs"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.3"
+ }
+ },
"node_modules/tsyringe": {
"version": "4.10.0",
"resolved": "https://registry.npmjs.org/tsyringe/-/tsyringe-4.10.0.tgz",
@@ -17179,18 +17193,6 @@
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"license": "0BSD"
},
- "node_modules/tunnel-agent": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
- "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
- "license": "Apache-2.0",
- "dependencies": {
- "safe-buffer": "^5.0.1"
- },
- "engines": {
- "node": "*"
- }
- },
"node_modules/tw-animate-css": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/tw-animate-css/-/tw-animate-css-1.4.0.tgz",
@@ -17272,16 +17274,16 @@
}
},
"node_modules/typescript-eslint": {
- "version": "8.61.1",
- "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.61.1.tgz",
- "integrity": "sha512-V7PayAfJokV3pEHgN7/v03D1SpujhRfQtYLbLIiBfDDncdg4PAiRBfoS4cnCANK4jmAPncczi59QO3afiXUlNw==",
+ "version": "8.66.0",
+ "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.66.0.tgz",
+ "integrity": "sha512-QlEbBPz/RuJ1XUHj29nm3t0F/O/cSlEnntozqPOYHnnTGAXFamnMBu5i9Vn6vhUPHGAjR+Vl+5J8vPN/BMUrJw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@typescript-eslint/eslint-plugin": "8.61.1",
- "@typescript-eslint/parser": "8.61.1",
- "@typescript-eslint/typescript-estree": "8.61.1",
- "@typescript-eslint/utils": "8.61.1"
+ "@typescript-eslint/eslint-plugin": "8.66.0",
+ "@typescript-eslint/parser": "8.66.0",
+ "@typescript-eslint/typescript-estree": "8.66.0",
+ "@typescript-eslint/utils": "8.66.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -17296,9 +17298,9 @@
}
},
"node_modules/undici": {
- "version": "8.7.0",
- "resolved": "https://registry.npmjs.org/undici/-/undici-8.7.0.tgz",
- "integrity": "sha512-N7iQtfyLhIMOFgQubvmLV26svHpO0bqKnAiWotTQCVKCmWrcGbBotPuW1x+xwYZ2VHdSTVUfPQQnlEt1/LouTQ==",
+ "version": "8.10.0",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-8.10.0.tgz",
+ "integrity": "sha512-HvltHd7avK13QIw/oLe4qoOLyoVSoafqJ2jYOrtMRBkbYT31eiBQ8O0ehRKZiEZCMEyLFQNIADpgCWC5fALvYQ==",
"license": "MIT",
"engines": {
"node": ">=22.19.0"
@@ -17652,16 +17654,16 @@
}
},
"node_modules/vite": {
- "version": "8.0.16",
- "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.16.tgz",
- "integrity": "sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw==",
+ "version": "8.2.0",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.0.tgz",
+ "integrity": "sha512-pn+CFpM0lwDeKwmOq1ZaBK/9sjorZcgqxki6MbY/jPEVd9vichIlmlD4HmQ5wdP5EgqQCFRaACBxMC7uEGc6lQ==",
"dev": true,
"license": "MIT",
"dependencies": {
- "lightningcss": "^1.32.0",
- "picomatch": "^4.0.4",
- "postcss": "^8.5.15",
- "rolldown": "1.0.3",
+ "lightningcss": "^1.33.0",
+ "picomatch": "^4.0.5",
+ "postcss": "^8.5.23",
+ "rolldown": "~1.2.0",
"tinyglobby": "^0.2.17"
},
"bin": {
@@ -17678,7 +17680,7 @@
},
"peerDependencies": {
"@types/node": "^20.19.0 || >=22.12.0",
- "@vitejs/devtools": "^0.1.18",
+ "@vitejs/devtools": "^0.4.0",
"esbuild": "^0.27.0 || ^0.28.0",
"jiti": ">=1.21.0",
"less": "^4.0.0",
@@ -17744,20 +17746,293 @@
"vite": ">=3.0.0"
}
},
+ "node_modules/vite/node_modules/lightningcss": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz",
+ "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==",
+ "dev": true,
+ "license": "MPL-2.0",
+ "dependencies": {
+ "detect-libc": "^2.0.3"
+ },
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ },
+ "optionalDependencies": {
+ "lightningcss-android-arm64": "1.33.0",
+ "lightningcss-darwin-arm64": "1.33.0",
+ "lightningcss-darwin-x64": "1.33.0",
+ "lightningcss-freebsd-x64": "1.33.0",
+ "lightningcss-linux-arm-gnueabihf": "1.33.0",
+ "lightningcss-linux-arm64-gnu": "1.33.0",
+ "lightningcss-linux-arm64-musl": "1.33.0",
+ "lightningcss-linux-x64-gnu": "1.33.0",
+ "lightningcss-linux-x64-musl": "1.33.0",
+ "lightningcss-win32-arm64-msvc": "1.33.0",
+ "lightningcss-win32-x64-msvc": "1.33.0"
+ }
+ },
+ "node_modules/vite/node_modules/lightningcss-android-arm64": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz",
+ "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/vite/node_modules/lightningcss-darwin-arm64": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz",
+ "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/vite/node_modules/lightningcss-darwin-x64": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz",
+ "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/vite/node_modules/lightningcss-freebsd-x64": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz",
+ "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/vite/node_modules/lightningcss-linux-arm-gnueabihf": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz",
+ "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/vite/node_modules/lightningcss-linux-arm64-gnu": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz",
+ "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/vite/node_modules/lightningcss-linux-arm64-musl": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz",
+ "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/vite/node_modules/lightningcss-linux-x64-gnu": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz",
+ "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "libc": [
+ "glibc"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/vite/node_modules/lightningcss-linux-x64-musl": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz",
+ "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "libc": [
+ "musl"
+ ],
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/vite/node_modules/lightningcss-win32-arm64-msvc": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz",
+ "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
+ "node_modules/vite/node_modules/lightningcss-win32-x64-msvc": {
+ "version": "1.33.0",
+ "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz",
+ "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MPL-2.0",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 12.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/parcel"
+ }
+ },
"node_modules/vitest": {
- "version": "4.1.9",
- "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.9.tgz",
- "integrity": "sha512-nE3/LEyc0z87uHYLZebqCUOaJr2hdtuPp7BQ4BosVFnfltxgAvMG08NyrSGlPpOUWvR27c5flSmYFTNr78L9GQ==",
+ "version": "4.1.10",
+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.10.tgz",
+ "integrity": "sha512-R9jUTe5S4Qb0HCd4TNqpC7oGcrMssMRGXLW80ubjWsW9VH5GF8y1Y0SFLY9AbqSk6nt0PnOx4H4WNJYZ13GUPw==",
"dev": true,
"license": "MIT",
"dependencies": {
- "@vitest/expect": "4.1.9",
- "@vitest/mocker": "4.1.9",
- "@vitest/pretty-format": "4.1.9",
- "@vitest/runner": "4.1.9",
- "@vitest/snapshot": "4.1.9",
- "@vitest/spy": "4.1.9",
- "@vitest/utils": "4.1.9",
+ "@vitest/expect": "4.1.10",
+ "@vitest/mocker": "4.1.10",
+ "@vitest/pretty-format": "4.1.10",
+ "@vitest/runner": "4.1.10",
+ "@vitest/snapshot": "4.1.10",
+ "@vitest/spy": "4.1.10",
+ "@vitest/utils": "4.1.10",
"es-module-lexer": "^2.0.0",
"expect-type": "^1.3.0",
"magic-string": "^0.30.21",
@@ -17785,12 +18060,12 @@
"@edge-runtime/vm": "*",
"@opentelemetry/api": "^1.9.0",
"@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0",
- "@vitest/browser-playwright": "4.1.9",
- "@vitest/browser-preview": "4.1.9",
- "@vitest/browser-webdriverio": "4.1.9",
- "@vitest/coverage-istanbul": "4.1.9",
- "@vitest/coverage-v8": "4.1.9",
- "@vitest/ui": "4.1.9",
+ "@vitest/browser-playwright": "4.1.10",
+ "@vitest/browser-preview": "4.1.10",
+ "@vitest/browser-webdriverio": "4.1.10",
+ "@vitest/coverage-istanbul": "4.1.10",
+ "@vitest/coverage-v8": "4.1.10",
+ "@vitest/ui": "4.1.10",
"happy-dom": "*",
"jsdom": "*",
"vite": "^6.0.0 || ^7.0.0 || ^8.0.0"
@@ -17834,16 +18109,6 @@
}
}
},
- "node_modules/void-elements": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz",
- "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/w3c-keyname": {
"version": "2.2.8",
"resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz",
@@ -17972,54 +18237,6 @@
"node": ">=0.10.0"
}
},
- "node_modules/wrap-ansi": {
- "version": "10.0.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-10.0.0.tgz",
- "integrity": "sha512-SGcvg80f0wUy2/fXES19feHMz8E0JoXv2uNgHOu4Dgi2OrCy1lqwFYEJz1BLbDI0exjPMe/ZdzZ/YpGECBG/aQ==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "ansi-styles": "^6.2.3",
- "string-width": "^8.2.0",
- "strip-ansi": "^7.1.2"
- },
- "engines": {
- "node": ">=20"
- },
- "funding": {
- "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
- }
- },
- "node_modules/wrap-ansi/node_modules/ansi-styles": {
- "version": "6.2.3",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
- "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/wrap-ansi/node_modules/string-width": {
- "version": "8.2.1",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.2.1.tgz",
- "integrity": "sha512-IIaP0g3iy9Cyy18w3M9YcaDudujEAVHKt3a3QJg1+sr/oX96TbaGUubG0hJyCjCBThFH+tFpcIyoUHUn1ogaLA==",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "get-east-asian-width": "^1.5.0",
- "strip-ansi": "^7.1.2"
- },
- "engines": {
- "node": ">=20"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
@@ -18027,9 +18244,9 @@
"license": "ISC"
},
"node_modules/ws": {
- "version": "8.21.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz",
- "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==",
+ "version": "8.21.1",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.1.tgz",
+ "integrity": "sha512-+0NTnW77fFN/DjQi6k/Sq/Yvk4Sgajw7urW8V+asjXnRgDs9gyGkdb7EzgfhA4goXsRIZKE28fzIXBHEzhuiWw==",
"license": "MIT",
"engines": {
"node": ">=10.0.0"
@@ -18074,6 +18291,15 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/xtend": {
+ "version": "4.0.2",
+ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+ "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.4"
+ }
+ },
"node_modules/y18n": {
"version": "5.0.8",
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
diff --git a/package.json b/package.json
index 7216010..b4b7b25 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "termix",
"private": true,
- "version": "2.5.1",
+ "version": "2.7.0",
"description": "Self-hosted SSH and remote desktop management.",
"author": "Karmaa",
"main": "electron/main.cjs",
@@ -12,14 +12,14 @@
"scripts": {
"format": "prettier --write .",
"format:check": "prettier --check .",
- "biome:check": "biome check biome.json package.json",
- "biome:fix": "biome check --write biome.json package.json",
- "postinstall": "node scripts/patch-app-builder-lib.cjs && node scripts/patch-guacamole-lite.cjs && node scripts/patch-better-sqlite3.cjs && node scripts/patch-nan.cjs && node scripts/patch-xterm-android-ime.cjs",
+ "postinstall": "node scripts/patch-app-builder-lib.cjs && node scripts/patch-guacamole-lite.cjs && node scripts/patch-guacamole-common-js.cjs && node scripts/patch-better-sqlite3.cjs && node scripts/patch-nan.cjs && node scripts/patch-xterm-android-ime.cjs",
+ "prepare": "husky || true",
"prebuild": "node scripts/write-electron-build-info.cjs",
- "lint": "eslint .",
+ "lint": "node scripts/generate-dialect-schema.cjs --check && eslint .",
"lint:fix": "eslint --fix .",
- "type-check": "tsc --noEmit",
+ "type-check": "tsc -b --force",
"test": "vitest run",
+ "verify:dialect": "tsx scripts/verify-dialects.mjs",
"test:watch": "vitest",
"test:ui": "vitest --ui",
"test:coverage": "vitest run --coverage",
@@ -33,156 +33,167 @@
"preview": "vite preview",
"electron:dev": "concurrently \"npm run dev\" \"powershell -c \\\"Start-Sleep -Seconds 5\\\" && electron .\"",
"electron:patch-builder": "node scripts/patch-app-builder-lib.cjs",
- "electron:rebuild": "electron-rebuild -f -w better-sqlite3 -w serialport",
+ "electron:rebuild": "electron-rebuild -f -o better-sqlite3,@serialport/bindings-cpp,node-pty",
"build:win-portable": "npm run build && npm run electron:rebuild && npm run electron:patch-builder && electron-builder --win --dir",
"build:win-installer": "npm run build && npm run electron:rebuild && npm run electron:patch-builder && electron-builder --win --publish=never",
"build:linux-portable": "npm run build && npm run electron:rebuild && npm run electron:patch-builder && electron-builder --linux --dir",
"build:linux-appimage": "npm run build && npm run electron:rebuild && npm run electron:patch-builder && electron-builder --linux AppImage",
"build:linux-targz": "npm run build && npm run electron:rebuild && npm run electron:patch-builder && electron-builder --linux tar.gz",
"build:mac": "npm run build && npm run electron:rebuild && npm run electron:patch-builder && electron-builder --mac --universal",
- "build:mac-dev": "npm run build && npm run electron:rebuild && npm run electron:patch-builder && electron-builder --mac dir --publish=never"
+ "build:mac-dev": "npm run build && npm run electron:rebuild && npm run electron:patch-builder && electron-builder --mac dir --publish=never",
+ "schema:generate": "node scripts/generate-dialect-schema.cjs",
+ "schema:check": "node scripts/generate-dialect-schema.cjs --check",
+ "schema:migrations": "drizzle-kit generate --config=drizzle.config.sqlite.ts && drizzle-kit generate --config=drizzle.config.pg.ts && drizzle-kit generate --config=drizzle.config.mysql.ts"
},
"dependencies": {
+ "@anthropic-ai/sdk": "^0.116.0",
"@simplewebauthn/browser": "^13.3.0",
"@simplewebauthn/server": "^13.3.2",
- "@tanstack/react-virtual": "^3.14.6",
+ "@tanstack/react-virtual": "^3.14.9",
+ "@types/compression": "^1.8.1",
"@types/ldapjs": "^3.0.6",
- "axios": "^1.18.1",
+ "axios": "^1.19.0",
"bcryptjs": "^3.0.3",
- "better-sqlite3": "^12.11.1",
+ "better-sqlite3": "^13.0.2",
"body-parser": "^2.3.0",
- "chalk": "^5.6.2",
+ "chalk": "^6.0.0",
+ "compression": "^1.8.1",
"cookie-parser": "^1.4.7",
"cors": "^2.8.6",
"dotenv": "^17.4.2",
"drizzle-orm": "^0.45.2",
"express": "^5.2.1",
"guacamole-lite": "^1.2.0",
- "jose": "^6.2.2",
- "js-yaml": "^5.2.1",
+ "jose": "^6.2.8",
+ "js-yaml": "^5.2.3",
"jsonwebtoken": "^9.0.3",
"jszip": "^3.10.1",
"ldapjs": "^3.0.7",
- "motion": "^12.42.2",
+ "motion": "^12.43.0",
"multer": "^2.2.0",
- "nanoid": "^5.1.16",
+ "mysql2": "^3.23.2",
+ "nanoid": "^6.0.1",
+ "node-pty": "^1.1.0",
+ "pg": "^8.22.0",
"qrcode": "^1.5.4",
"serialport": "^13.0.0",
+ "sharp": "^0.35.3",
"socks": "^2.8.7",
"speakeasy": "^2.0.0",
"ssh2": "^1.17.0",
- "undici": "^8.7.0",
- "ws": "^8.20.0"
+ "undici": "^8.10.0",
+ "ws": "^8.21.1"
},
"devDependencies": {
- "@biomejs/biome": "2.5.2",
"@codemirror/autocomplete": "^6.20.3",
"@codemirror/commands": "^6.10.4",
"@codemirror/search": "^6.7.1",
"@codemirror/theme-one-dark": "^6.1.3",
- "@codemirror/view": "^6.43.5",
- "@commitlint/cli": "^21.0.2",
- "@commitlint/config-conventional": "^21.0.2",
+ "@codemirror/view": "^6.43.7",
+ "@commitlint/cli": "^21.2.1",
+ "@commitlint/config-conventional": "^21.2.0",
"@deadendjs/swagger-jsdoc": "^8.1.2",
"@electron/notarize": "^3.1.1",
- "@electron/rebuild": "^4.0.4",
+ "@electron/rebuild": "^4.2.0",
"@eslint/js": "^10.0.1",
- "@fontsource-variable/jetbrains-mono": "^5.2.8",
- "@fontsource/fira-code": "^5.2.7",
- "@fontsource/jetbrains-mono": "^5.2.8",
- "@fontsource/source-code-pro": "^5.2.7",
+ "@fontsource-variable/jetbrains-mono": "^5.3.0",
+ "@fontsource/fira-code": "^5.3.0",
+ "@fontsource/jetbrains-mono": "^5.3.0",
+ "@fontsource/source-code-pro": "^5.3.0",
"@monaco-editor/react": "^4.7.0",
- "@radix-ui/react-accordion": "^1.2.15",
- "@radix-ui/react-alert-dialog": "^1.1.18",
- "@radix-ui/react-checkbox": "^1.3.6",
- "@radix-ui/react-dialog": "^1.1.18",
- "@radix-ui/react-dropdown-menu": "^2.1.19",
- "@radix-ui/react-label": "^2.1.11",
- "@radix-ui/react-popover": "^1.1.18",
- "@radix-ui/react-progress": "^1.1.11",
- "@radix-ui/react-scroll-area": "^1.2.13",
- "@radix-ui/react-select": "^2.3.2",
- "@radix-ui/react-separator": "^1.1.11",
- "@radix-ui/react-slider": "^1.4.2",
- "@radix-ui/react-slot": "^1.3.0",
- "@radix-ui/react-switch": "^1.3.2",
- "@radix-ui/react-tabs": "^1.1.16",
- "@radix-ui/react-tooltip": "^1.2.11",
- "@tailwindcss/vite": "^4.3.2",
+ "@radix-ui/react-accordion": "^1.2.20",
+ "@radix-ui/react-alert-dialog": "^1.1.23",
+ "@radix-ui/react-checkbox": "^1.3.11",
+ "@radix-ui/react-dialog": "^1.1.23",
+ "@radix-ui/react-dropdown-menu": "^2.1.24",
+ "@radix-ui/react-label": "^2.1.15",
+ "@radix-ui/react-popover": "^1.1.23",
+ "@radix-ui/react-progress": "^1.1.16",
+ "@radix-ui/react-scroll-area": "^1.2.18",
+ "@radix-ui/react-select": "^2.3.7",
+ "@radix-ui/react-separator": "^1.1.15",
+ "@radix-ui/react-slider": "^1.4.7",
+ "@radix-ui/react-slot": "^1.3.3",
+ "@radix-ui/react-switch": "^1.3.7",
+ "@radix-ui/react-tabs": "^1.1.21",
+ "@radix-ui/react-tooltip": "^1.2.16",
+ "@tailwindcss/vite": "^4.3.3",
"@testing-library/dom": "^10.4.1",
- "@testing-library/jest-dom": "^6.9.1",
+ "@testing-library/jest-dom": "^7.0.0",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
- "@types/better-sqlite3": "^7.6.13",
+ "@types/better-sqlite3": "^9.6.0",
"@types/cookie-parser": "^1.4.10",
"@types/cors": "^2.8.19",
"@types/express": "^5.0.6",
"@types/guacamole-common-js": "^1.5.5",
"@types/js-yaml": "^4.0.9",
"@types/jsonwebtoken": "^9.0.10",
- "@types/multer": "^2.1.0",
- "@types/node": "^26.0.0",
+ "@types/multer": "^2.2.0",
+ "@types/node": "^26.1.2",
+ "@types/pg": "^8.20.3",
"@types/qrcode": "^1.5.6",
- "@types/react": "^19.2.17",
- "@types/react-dom": "^19.2.3",
+ "@types/react": "^19.2.18",
+ "@types/react-dom": "^19.2.4",
"@types/speakeasy": "^2.0.10",
"@types/ssh2": "^1.15.5",
"@types/ws": "^8.18.1",
- "@uiw/codemirror-extensions-langs": "^4.25.9",
- "@uiw/codemirror-theme-github": "^4.25.9",
- "@uiw/react-codemirror": "^4.25.9",
- "@vitejs/plugin-react": "^6.0.3",
- "@vitest/coverage-v8": "^4.1.9",
- "@vitest/ui": "^4.1.9",
+ "@uiw/codemirror-extensions-langs": "^4.25.11",
+ "@uiw/codemirror-theme-github": "^4.25.11",
+ "@uiw/react-codemirror": "^4.25.11",
+ "@vitejs/plugin-react": "^6.0.5",
+ "@vitest/coverage-v8": "^4.1.10",
+ "@vitest/ui": "^4.1.10",
"@xterm/addon-clipboard": "^0.2.0",
"@xterm/addon-fit": "^0.11.0",
+ "@xterm/addon-search": "^0.16.0",
"@xterm/addon-unicode11": "^0.9.0",
"@xterm/addon-web-links": "^0.12.0",
"@xterm/xterm": "^6.0.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
- "concurrently": "^10.0.3",
+ "concurrently": "^10.0.4",
"cytoscape": "^3.34.0",
- "electron": "^43.0.0",
+ "drizzle-kit": "^0.31.10",
+ "electron": "^43.2.0",
"electron-builder": "^26.15.3",
- "eslint": "^10.5.0",
+ "eslint": "^10.8.0",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-refresh": "^0.5.3",
"eslint-plugin-unused-imports": "^4.4.1",
- "globals": "^17.5.0",
+ "globals": "^17.8.0",
"guacamole-common-js": "^1.5.0",
"husky": "^9.1.7",
- "i18next": "^26.3.4",
+ "i18next": "^26.3.6",
"i18next-browser-languagedetector": "^8.2.1",
- "jsdom": "^29.1.1",
- "lint-staged": "^17.0.8",
- "lucide-react": "^1.20.0",
- "prettier": "3.8.4",
- "radix-ui": "^1.6.1",
- "react": "^19.2.7",
+ "jsdom": "^30.0.1",
+ "lint-staged": "^17.2.0",
+ "lucide-react": "^1.28.0",
+ "prettier": "3.9.6",
+ "radix-ui": "^1.6.7",
+ "react": "^19.2.8",
"react-cytoscapejs": "^2.0.0",
- "react-dom": "^19.2.7",
+ "react-dom": "^19.2.8",
"react-h5-audio-player": "^3.10.2",
- "react-hook-form": "^7.79.0",
- "react-i18next": "^17.0.4",
- "react-icons": "^5.6.0",
+ "react-hook-form": "^7.84.0",
+ "react-i18next": "^17.0.11",
+ "react-icons": "^5.7.0",
"react-markdown": "^10.1.0",
"react-pdf": "^10.4.1",
"react-photo-view": "^1.2.7",
"react-syntax-highlighter": "^16.1.1",
"react-xtermjs": "^1.0.10",
"remark-gfm": "^4.0.1",
- "sharp": "^0.35.3",
"sonner": "^2.0.7",
"tailwind-merge": "^3.5.0",
"tailwindcss": "^4.2.4",
"tw-animate-css": "^1.4.0",
"typescript": "~6.0.3",
- "typescript-eslint": "^8.61.1",
- "vite": "^8.0.16",
+ "typescript-eslint": "^8.66.0",
+ "vite": "^8.2.0",
"vite-plugin-svgr": "^5.2.0",
- "vitest": "^4.1.9"
+ "vitest": "^4.1.10"
},
"lint-staged": {
"*.{ts,tsx}": [
@@ -202,6 +213,18 @@
"dompurify": "^3.4.1",
"eslint-visitor-keys": "^4.2.1",
"prebuild-install": "npm:@mmomtchev/prebuild-install@1.0.2",
- "rimraf": "file:vendor/rimraf-compat"
+ "rimraf": "file:vendor/rimraf-compat",
+ "brace-expansion@1": "^1.1.18",
+ "brace-expansion@2": "^2.1.4",
+ "brace-expansion@5": "^5.0.9",
+ "esbuild": "^0.28.1",
+ "fast-uri@3": "^3.1.5",
+ "ip-address": "^10.5.0",
+ "js-yaml@4": "^4.3.1",
+ "nanoid@3": "^3.3.18",
+ "postcss": "^8.5.26",
+ "tar": "^7.5.22",
+ "undici@6": "^6.28.0",
+ "undici@7": "^7.29.0"
}
}
diff --git a/scripts/electron-app-quit.test.ts b/scripts/electron-app-quit.test.ts
new file mode 100644
index 0000000..529a30e
--- /dev/null
+++ b/scripts/electron-app-quit.test.ts
@@ -0,0 +1,28 @@
+import { createRequire } from "node:module";
+import { describe, expect, it, vi } from "vitest";
+
+const require = createRequire(import.meta.url);
+const { quitApp } = require("../electron/app-quit.cjs") as {
+ quitApp: (
+ app: { quit: () => void },
+ window: { destroy: () => void } | null,
+ ) => void;
+};
+
+describe("Electron app quit", () => {
+ it("destroys the window before quitting so renderer unload guards cannot cancel it", () => {
+ const calls: string[] = [];
+ quitApp(
+ { quit: vi.fn(() => calls.push("quit")) },
+ { destroy: vi.fn(() => calls.push("destroy")) },
+ );
+
+ expect(calls).toEqual(["destroy", "quit"]);
+ });
+
+ it("still quits after the window has already gone", () => {
+ const quit = vi.fn();
+ quitApp({ quit }, null);
+ expect(quit).toHaveBeenCalledOnce();
+ });
+});
diff --git a/scripts/electron-keyboard-shortcuts.test.ts b/scripts/electron-keyboard-shortcuts.test.ts
new file mode 100644
index 0000000..39670d7
--- /dev/null
+++ b/scripts/electron-keyboard-shortcuts.test.ts
@@ -0,0 +1,33 @@
+import { createRequire } from "node:module";
+import { describe, expect, it } from "vitest";
+
+const require = createRequire(import.meta.url);
+const { isCloseActiveTabInput } =
+ require("../electron/keyboard-shortcuts.cjs") as {
+ isCloseActiveTabInput: (input: {
+ type: string;
+ key: string;
+ control?: boolean;
+ alt?: boolean;
+ shift?: boolean;
+ meta?: boolean;
+ }) => boolean;
+ };
+
+describe("Electron keyboard shortcuts", () => {
+ it("recognizes Ctrl+W without extra modifiers", () => {
+ expect(
+ isCloseActiveTabInput({ type: "keyDown", key: "w", control: true }),
+ ).toBe(true);
+ });
+
+ it.each([
+ { type: "keyUp", key: "w", control: true },
+ { type: "keyDown", key: "w", control: true, alt: true },
+ { type: "keyDown", key: "w", control: true, shift: true },
+ { type: "keyDown", key: "w", meta: true },
+ { type: "keyDown", key: "q", control: true },
+ ])("does not consume other input: %o", (input) => {
+ expect(isCloseActiveTabInput(input)).toBe(false);
+ });
+});
diff --git a/scripts/electron-linux-password-store.test.ts b/scripts/electron-linux-password-store.test.ts
new file mode 100644
index 0000000..57501a6
--- /dev/null
+++ b/scripts/electron-linux-password-store.test.ts
@@ -0,0 +1,65 @@
+import { createRequire } from "node:module";
+import { describe, expect, it, vi } from "vitest";
+
+const require = createRequire(import.meta.url);
+const { selectLinuxPasswordStore } =
+ require("../electron/linux-password-store.cjs") as {
+ selectLinuxPasswordStore: (
+ commandLine: {
+ hasSwitch: (name: string) => boolean;
+ appendSwitch: (name: string, value: string) => void;
+ },
+ env: NodeJS.ProcessEnv,
+ ) => string | null;
+ };
+
+function commandLine(existing: string[] = []) {
+ const appended: Array<[string, string]> = [];
+ return {
+ appended,
+ hasSwitch: (name: string) => existing.includes(name),
+ appendSwitch: vi.fn((name: string, value: string) =>
+ appended.push([name, value]),
+ ),
+ };
+}
+
+describe("Linux password store selection", () => {
+ it("names libsecret on desktops Chromium has no mapping for", () => {
+ // Without this the backend resolves to "basic_text", and safeStorage
+ // reports encryption as unavailable even though a keyring is running.
+ for (const desktop of ["Hyprland", "sway", "niri", "river", "wayfire"]) {
+ const cmd = commandLine();
+ expect(
+ selectLinuxPasswordStore(cmd, { XDG_CURRENT_DESKTOP: desktop }),
+ ).toBe("gnome-libsecret");
+ expect(cmd.appended).toEqual([["password-store", "gnome-libsecret"]]);
+ }
+ });
+
+ it("leaves KWallet desktops to auto-detection", () => {
+ for (const env of [
+ { XDG_CURRENT_DESKTOP: "KDE" },
+ { XDG_CURRENT_DESKTOP: "KDE", DESKTOP_SESSION: "plasma" },
+ { DESKTOP_SESSION: "/usr/share/xsessions/plasma" },
+ { XDG_CURRENT_DESKTOP: "LXQt" },
+ ]) {
+ const cmd = commandLine();
+ expect(selectLinuxPasswordStore(cmd, env)).toBeNull();
+ expect(cmd.appendSwitch).not.toHaveBeenCalled();
+ }
+ });
+
+ it("never overrides a password store the user asked for", () => {
+ const cmd = commandLine(["password-store"]);
+ expect(
+ selectLinuxPasswordStore(cmd, { XDG_CURRENT_DESKTOP: "Hyprland" }),
+ ).toBeNull();
+ expect(cmd.appendSwitch).not.toHaveBeenCalled();
+ });
+
+ it("selects libsecret when the desktop is unset, matching a bare session", () => {
+ const cmd = commandLine();
+ expect(selectLinuxPasswordStore(cmd, {})).toBe("gnome-libsecret");
+ });
+});
diff --git a/scripts/generate-appstore-notes.cjs b/scripts/generate-appstore-notes.cjs
new file mode 100644
index 0000000..778297c
--- /dev/null
+++ b/scripts/generate-appstore-notes.cjs
@@ -0,0 +1,135 @@
+const fs = require("fs");
+const path = require("path");
+
+// Apple caps the "What's New in This Version" field at 4000 characters.
+const MAX_LENGTH = 4000;
+
+function parseArgs(argv) {
+ const args = {};
+ for (let i = 0; i < argv.length; i++) {
+ const arg = argv[i];
+ if (!arg.startsWith("--")) continue;
+ const key = arg.slice(2);
+ const next = argv[i + 1];
+ if (next === undefined || next.startsWith("--")) {
+ args[key] = true;
+ } else {
+ args[key] = next;
+ i++;
+ }
+ }
+ return args;
+}
+
+function fail(message) {
+ console.error(`generate-appstore-notes: ${message}`);
+ process.exit(1);
+}
+
+function extractSection(notes, name, { required = true } = {}) {
+ const pattern = new RegExp(
+ `([\\s\\S]*?)`,
+ );
+ const match = notes.match(pattern);
+ if (!match) {
+ if (required) fail(`missing section in release notes`);
+ return "";
+ }
+ return match[1].trim();
+}
+
+// Strip markdown that reads badly as plain text in App Store Connect.
+function toPlainText(markdown) {
+ return markdown
+ .split("\n")
+ .map((line) => {
+ let text = line.replace(/\r$/, "");
+ const indent = text.match(/^\s*/)[0].length;
+ text = text.trim();
+ text = text.replace(/^[-*]\s+/, indent >= 2 ? " - " : "- ");
+ text = text.replace(/\[([^\]]+)\]\([^)]*\)/g, "$1");
+ text = text.replace(/`([^`]+)`/g, "$1");
+ text = text.replace(/\*\*([^*]+)\*\*/g, "$1");
+ text = text.replace(/^#+\s*/, "");
+ return text;
+ })
+ .join("\n")
+ .replace(/\n{3,}/g, "\n\n")
+ .trim();
+}
+
+// Drop whole trailing lines until the text fits, so we never cut a bullet
+// in half or leave a dangling section header.
+function truncate(text, limit) {
+ if (text.length <= limit) return text;
+
+ const lines = text.split("\n");
+ while (lines.length > 0 && lines.join("\n").length > limit) {
+ lines.pop();
+ }
+ while (lines.length > 0 && !lines[lines.length - 1].trim()) {
+ lines.pop();
+ }
+ // A section header left with no bullets under it is noise.
+ while (lines.length > 0 && /^[A-Za-z ]+:$/.test(lines[lines.length - 1])) {
+ lines.pop();
+ while (lines.length > 0 && !lines[lines.length - 1].trim()) lines.pop();
+ }
+ return lines.join("\n").trim();
+}
+
+function buildNotes(notesFile) {
+ const summary = extractSection(notesFile, "SUMMARY");
+ const updateLog = extractSection(notesFile, "UPDATE_LOG", {
+ required: false,
+ });
+ const bugFixes = extractSection(notesFile, "BUG_FIXES", { required: false });
+
+ const parts = [toPlainText(summary)];
+ if (updateLog) parts.push("", "Update Log:", toPlainText(updateLog));
+ if (bugFixes) parts.push("", "Bug Fixes:", toPlainText(bugFixes));
+
+ const body = parts
+ .join("\n")
+ .replace(/\n{3,}/g, "\n\n")
+ .trim();
+ if (!body) fail("release notes produced no text");
+ return truncate(body, MAX_LENGTH);
+}
+
+function main() {
+ const args = parseArgs(process.argv.slice(2));
+ const notesPath = args.notes || "RELEASE_NOTES.md";
+ const outDir = args["out-dir"];
+ const locales = String(args.locales || "en-US")
+ .split(",")
+ .map((locale) => locale.trim())
+ .filter(Boolean);
+
+ if (!outDir || outDir === true) fail("--out-dir is required");
+ if (locales.length === 0) fail("--locales resolved to no locales");
+
+ const resolvedNotes = path.resolve(notesPath);
+ if (!fs.existsSync(resolvedNotes)) {
+ fail(`release notes file not found: ${resolvedNotes}`);
+ }
+
+ const notes = buildNotes(fs.readFileSync(resolvedNotes, "utf8"));
+
+ for (const locale of locales) {
+ const localeDir = path.join(path.resolve(outDir), locale);
+ fs.mkdirSync(localeDir, { recursive: true });
+ fs.writeFileSync(
+ path.join(localeDir, "release_notes.txt"),
+ notes + "\n",
+ "utf8",
+ );
+ console.log(`Wrote ${locale}/release_notes.txt (${notes.length} chars)`);
+ }
+}
+
+if (require.main === module) {
+ main();
+}
+
+module.exports = { buildNotes, toPlainText, truncate, MAX_LENGTH };
diff --git a/scripts/generate-appstore-notes.test.ts b/scripts/generate-appstore-notes.test.ts
new file mode 100644
index 0000000..7e5484f
--- /dev/null
+++ b/scripts/generate-appstore-notes.test.ts
@@ -0,0 +1,126 @@
+import { describe, it, expect } from "vitest";
+import { createRequire } from "module";
+
+const require = createRequire(import.meta.url);
+const {
+ buildNotes,
+ toPlainText,
+ truncate,
+ MAX_LENGTH,
+} = require("./generate-appstore-notes.cjs");
+
+function notesFile(sections: Record) {
+ return Object.entries(sections)
+ .map(([name, body]) => `\n${body}\n`)
+ .join("\n\n");
+}
+
+describe("toPlainText", () => {
+ it("strips markdown links down to their label", () => {
+ expect(toPlainText("- See [the docs](https://example.com)")).toBe(
+ "- See the docs",
+ );
+ });
+
+ it("strips backticks and bold markers", () => {
+ expect(toPlainText("- Fixed `npm run build` and **crashes**")).toBe(
+ "- Fixed npm run build and crashes",
+ );
+ });
+
+ it("keeps nested bullets indented", () => {
+ expect(toPlainText("- Top\n - Nested")).toBe("- Top\n - Nested");
+ });
+
+ it("normalizes asterisk bullets to dashes", () => {
+ expect(toPlainText("* One\n* Two")).toBe("- One\n- Two");
+ });
+
+ it("collapses runs of blank lines", () => {
+ expect(toPlainText("- One\n\n\n\n- Two")).toBe("- One\n\n- Two");
+ });
+});
+
+describe("truncate", () => {
+ it("leaves text under the limit untouched", () => {
+ expect(truncate("- One\n- Two", 100)).toBe("- One\n- Two");
+ });
+
+ it("drops whole trailing lines rather than splitting one", () => {
+ const result = truncate("- One\n- Two\n- Three", 12);
+ expect(result).toBe("- One\n- Two");
+ });
+
+ it("drops a section header left with no bullets under it", () => {
+ const result = truncate("- One\n\nBug Fixes:\n- Two", 18);
+ expect(result).toBe("- One");
+ });
+});
+
+describe("buildNotes", () => {
+ it("includes the summary, update log, and bug fixes", () => {
+ const notes = buildNotes(
+ notesFile({
+ SUMMARY: "A big release.",
+ UPDATE_LOG: "- Added a thing",
+ BUG_FIXES: "- Fixed a thing",
+ }),
+ );
+
+ expect(notes).toContain("A big release.");
+ expect(notes).toContain("Update Log:");
+ expect(notes).toContain("- Added a thing");
+ expect(notes).toContain("Bug Fixes:");
+ expect(notes).toContain("- Fixed a thing");
+ });
+
+ it("omits optional sections that are absent", () => {
+ const notes = buildNotes(notesFile({ SUMMARY: "Small release." }));
+
+ expect(notes).toBe("Small release.");
+ expect(notes).not.toContain("Update Log:");
+ expect(notes).not.toContain("Bug Fixes:");
+ });
+
+ it("stays within the App Store character limit", () => {
+ const notes = buildNotes(
+ notesFile({
+ SUMMARY: "Big release.",
+ UPDATE_LOG: Array.from(
+ { length: 400 },
+ (_, i) => `- Added feature number ${i}`,
+ ).join("\n"),
+ BUG_FIXES: Array.from(
+ { length: 400 },
+ (_, i) => `- Fixed bug number ${i}`,
+ ).join("\n"),
+ }),
+ );
+
+ expect(notes.length).toBeLessThanOrEqual(MAX_LENGTH);
+ expect(notes.length).toBeGreaterThan(0);
+ });
+
+ it("never ends mid-bullet when truncating", () => {
+ const notes = buildNotes(
+ notesFile({
+ SUMMARY: "Big release.",
+ UPDATE_LOG: Array.from(
+ { length: 400 },
+ (_, i) => `- Added feature number ${i}`,
+ ).join("\n"),
+ }),
+ );
+
+ const lines = notes.split("\n");
+ expect(lines[lines.length - 1]).toMatch(/^- Added feature number \d+$/);
+ });
+
+ it("produces non-empty notes for the real release notes file", () => {
+ const fs = require("fs");
+ const notes = buildNotes(fs.readFileSync("RELEASE_NOTES.md", "utf8"));
+
+ expect(notes.length).toBeGreaterThan(0);
+ expect(notes.length).toBeLessThanOrEqual(MAX_LENGTH);
+ });
+});
diff --git a/scripts/generate-dialect-schema.cjs b/scripts/generate-dialect-schema.cjs
new file mode 100644
index 0000000..171279d
--- /dev/null
+++ b/scripts/generate-dialect-schema.cjs
@@ -0,0 +1,236 @@
+/**
+ * Generates the Postgres and MySQL schema modules from the SQLite one.
+ *
+ * ## These files produce DDL. They are not used at runtime.
+ *
+ * drizzle-kit reads them to emit the migrations in drizzle/postgres and
+ * drizzle/mysql. Nothing imports them to run a query.
+ *
+ * That is not an oversight. The query builder needs two things from a table
+ * object โ the identifiers to interpolate, and the encoders that turn JS values
+ * into driver values โ and the sqlite definitions supply both correctly for
+ * every engine, which is why all 44 repositories import schema.ts directly:
+ *
+ * - text and integer encode as themselves everywhere
+ * - integer({ mode: "boolean" }) writes 1/0, which Postgres and MySQL both
+ * accept for a boolean column, and reads back through `Number(v) === 1`,
+ * which is true for JS `true` as well as for 1
+ * - real is a plain number on all three
+ *
+ * What genuinely differs between the dialects is DDL โ column types, key
+ * lengths, autoincrement syntax โ and DDL is exactly what these files exist to
+ * generate. See scripts/verify-dialects.mjs, which asserts the round-trips
+ * above against real servers rather than trusting this comment.
+ *
+ * The schema is declared once, in sqlite-core, and the other two dialects are
+ * derived. Hand-maintaining three copies of 52 tables would mean a renamed
+ * table has to land in three places consistently or a foreign key silently
+ * points at the wrong one โ and the schema is regular enough that the mapping
+ * is mechanical.
+ *
+ * What varies between dialects is small and closed:
+ * - booleans are integers on sqlite, native elsewhere
+ * - autoincrement keys are `integer primary key autoincrement`, `serial`,
+ * and `int auto_increment`
+ * - MySQL cannot index unbounded TEXT, so any column that is a primary key,
+ * is unique, or participates in a foreign key must be varchar
+ * - MySQL rejects a bare DEFAULT CURRENT_TIMESTAMP on a text column, so it is
+ * written as a parenthesised expression default
+ *
+ * Usage: node scripts/generate-dialect-schema.cjs [--check]
+ * --check verifies the committed files match what would be generated,
+ * for CI to catch a schema edit that forgot to regenerate.
+ */
+
+const fs = require("fs");
+const path = require("path");
+
+const ROOT = path.join(__dirname, "..");
+const SOURCE = path.join(ROOT, "src/backend/database/db/schema.ts");
+const TARGETS = {
+ postgres: path.join(ROOT, "src/backend/database/db/schema.pg.ts"),
+ mysql: path.join(ROOT, "src/backend/database/db/schema.mysql.ts"),
+};
+
+const KEY_LENGTH = 255;
+
+/**
+ * Columns that must be varchar rather than text on MySQL. A column qualifies if
+ * it is a primary key, is unique, or is either end of a foreign key.
+ */
+function collectKeyColumns(source) {
+ const keyed = new Set();
+
+ // `name: text("col")....primaryKey()` / `.unique()` / `.references(...)`
+ const declaration =
+ /(\w+):\s*text\("([a-z0-9_]+)"\)((?:\s*\.\w+\([^)]*\))*)/g;
+ let match;
+ while ((match = declaration.exec(source)) !== null) {
+ const [, prop, column, modifiers] = match;
+ if (/\.(primaryKey|unique|references)\(/.test(modifiers)) {
+ keyed.add(column);
+ }
+ void prop;
+ }
+
+ // Multi-line form: the modifiers land on following lines.
+ const multiline =
+ /(\w+):\s*text\("([a-z0-9_]+)"\)\s*\n(\s*\.\w+\([\s\S]*?\),)/g;
+ while ((match = multiline.exec(source)) !== null) {
+ if (/\.(primaryKey|unique|references)\(/.test(match[3])) {
+ keyed.add(match[2]);
+ }
+ }
+
+ // A referenced column implies the referencing side too; both must match.
+ const reference = /\.references\(\(\)\s*=>\s*\w+\.(\w+)/g;
+ while ((match = reference.exec(source)) !== null) {
+ keyed.add(camelToSnake(match[1]));
+ }
+
+ // Table-level indexes: `(table) => [uniqueIndex("x").on(table.a, table.b)]`,
+ // and the same for the plain `index("x")` used by the performance indexes.
+ // These were invisible here at first, and MySQL rejected the migration with
+ // "BLOB/TEXT column used in key specification without a key length" โ but
+ // only on MySQL 8; MariaDB took it.
+ const tableIndex = /\b(?:unique)?[iI]ndex\("[a-z0-9_]+"\)\.on\(([^)]*)\)/g;
+ while ((match = tableIndex.exec(source)) !== null) {
+ for (const column of match[1].split(",")) {
+ const name = column.trim().replace(/^\w+\./, "");
+ if (name) keyed.add(camelToSnake(name));
+ }
+ }
+
+ return keyed;
+}
+
+function camelToSnake(value) {
+ return value.replace(/[A-Z]/g, (c) => `_${c.toLowerCase()}`);
+}
+
+function transform(source, dialect) {
+ const keyed = collectKeyColumns(source);
+ const isPg = dialect === "postgres";
+ let out = source;
+
+ // Autoincrement primary keys, before the plain integer rule below.
+ out = out.replace(
+ /integer\("([a-z0-9_]+)"\)\.primaryKey\(\{\s*autoIncrement:\s*true\s*\}\)/g,
+ (_, col) =>
+ isPg
+ ? `serial("${col}").primaryKey()`
+ : `int("${col}").autoincrement().primaryKey()`,
+ );
+
+ // Integer-backed booleans become native ones. Prettier wraps the longer
+ // declarations across lines, so this has to span newlines too.
+ out = out.replace(
+ /integer\(\s*"([a-z0-9_]+)",\s*\{\s*mode:\s*"boolean",?\s*\},?\s*\)/g,
+ (_, col) => `boolean("${col}")`,
+ );
+
+ // Remaining integers.
+ if (!isPg) {
+ out = out.replace(
+ /\binteger\("([a-z0-9_]+)"\)/g,
+ (_, col) => `int("${col}")`,
+ );
+
+ // Timestamps are stored as text (see sql-timestamp.ts). MySQL only accepts
+ // DEFAULT CURRENT_TIMESTAMP on a DATETIME or TIMESTAMP column โ on a TEXT
+ // one it is ER_INVALID_DEFAULT, "Invalid default value". Since 8.0.13 an
+ // expression default works on any type, and an expression is written
+ // parenthesised. MariaDB accepts the bare form, which is why this only
+ // surfaces against real MySQL.
+ out = out.replace(/sql`CURRENT_TIMESTAMP`/g, "sql`(CURRENT_TIMESTAMP)`");
+ }
+
+ // Floating point.
+ out = out.replace(/\breal\("([a-z0-9_]+)"\)/g, (_, col) =>
+ isPg ? `doublePrecision("${col}")` : `double("${col}")`,
+ );
+
+ // Key-bearing strings must be indexable.
+ out = out.replace(/\btext\("([a-z0-9_]+)"\)/g, (whole, col) =>
+ keyed.has(col) ? `varchar("${col}", { length: ${KEY_LENGTH} })` : whole,
+ );
+
+ // text("x", { length: n }) is sqlite-only sugar; drop the length.
+ out = out.replace(
+ /\btext\("([a-z0-9_]+)",\s*\{\s*length:\s*\d+\s*\}\)/g,
+ (_, col) => `text("${col}")`,
+ );
+
+ out = out.replace(/\bsqliteTable\(/g, isPg ? "pgTable(" : "mysqlTable(");
+
+ // Self-referencing FK callbacks are typed against the source dialect's
+ // "any column" helper so TS can resolve the circular table reference.
+ out = out.replace(
+ /\bAnySQLiteColumn\b/g,
+ isPg ? "AnyPgColumn" : "AnyMySqlColumn",
+ );
+
+ const imports = isPg
+ ? `import {\n pgTable,\n text,\n varchar,\n integer,\n serial,\n boolean,\n doublePrecision,\n index,\n uniqueIndex,\n type AnyPgColumn,\n} from "drizzle-orm/pg-core";`
+ : `import {\n mysqlTable,\n text,\n varchar,\n int,\n boolean,\n double,\n index,\n uniqueIndex,\n type AnyMySqlColumn,\n} from "drizzle-orm/mysql-core";`;
+
+ out = out.replace(
+ /import\s*\{[^}]*\}\s*from\s*"drizzle-orm\/sqlite-core";/,
+ imports,
+ );
+
+ return `${header(dialect)}\n${out}`;
+}
+
+function header(dialect) {
+ return `// GENERATED FILE โ do not edit.
+//
+// Produced from schema.ts by scripts/generate-dialect-schema.cjs.
+// Edit the sqlite schema and re-run \`node scripts/generate-dialect-schema.cjs\`.
+// Target dialect: ${dialect}.
+//
+// DDL source for drizzle-kit. NOT imported to run queries โ repositories use
+// schema.ts on every dialect. See the generator header for why that is correct.
+`;
+}
+
+function main() {
+ const check = process.argv.includes("--check");
+ const source = fs.readFileSync(SOURCE, "utf8");
+ let drift = false;
+
+ for (const [dialect, target] of Object.entries(TARGETS)) {
+ const generated = transform(source, dialect);
+
+ if (check) {
+ const current = fs.existsSync(target)
+ ? fs.readFileSync(target, "utf8")
+ : "";
+ if (current !== generated) {
+ console.error(
+ `[generate-dialect-schema] ${path.relative(ROOT, target)} is out of date`,
+ );
+ drift = true;
+ }
+ continue;
+ }
+
+ fs.writeFileSync(target, generated);
+ console.log(
+ `[generate-dialect-schema] wrote ${path.relative(ROOT, target)}`,
+ );
+ }
+
+ if (drift) {
+ console.error(
+ "[generate-dialect-schema] run `node scripts/generate-dialect-schema.cjs` and commit the result",
+ );
+ process.exit(1);
+ }
+}
+
+module.exports = { transform, collectKeyColumns };
+
+if (require.main === module) {
+ main();
+}
diff --git a/scripts/generate-dialect-schema.test.ts b/scripts/generate-dialect-schema.test.ts
new file mode 100644
index 0000000..dad931f
--- /dev/null
+++ b/scripts/generate-dialect-schema.test.ts
@@ -0,0 +1,140 @@
+import { describe, expect, it } from "vitest";
+import { createRequire } from "node:module";
+
+const require = createRequire(import.meta.url);
+const { transform, collectKeyColumns } =
+ require("./generate-dialect-schema.cjs") as {
+ transform: (source: string, dialect: "postgres" | "mysql") => string;
+ collectKeyColumns: (source: string) => Set;
+ };
+
+const SOURCE = `import { sqliteTable, text, integer, real } from "drizzle-orm/sqlite-core";
+import { sql } from "drizzle-orm";
+
+export const users = sqliteTable("users", {
+ id: text("id").primaryKey(),
+ username: text("username").notNull(),
+ isAdmin: integer("is_admin", { mode: "boolean" }).notNull().default(false),
+ wrapped: integer("wrapped", {
+ mode: "boolean",
+ })
+ .notNull()
+ .default(true),
+ score: real("score"),
+ ssoProviderId: integer("sso_provider_id"),
+});
+
+export const folders = sqliteTable("folders", {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: text("name").notNull(),
+ syncId: text("sync_id").unique(),
+ cert: text("cert", { length: 8192 }),
+});
+`;
+
+describe("collectKeyColumns", () => {
+ it("finds columns that must be indexable", () => {
+ const keyed = collectKeyColumns(SOURCE);
+
+ // primary key, unique, and both ends of the foreign key
+ expect(keyed.has("id")).toBe(true);
+ expect(keyed.has("sync_id")).toBe(true);
+ expect(keyed.has("user_id")).toBe(true);
+ });
+
+ it("leaves ordinary strings alone", () => {
+ const keyed = collectKeyColumns(SOURCE);
+
+ expect(keyed.has("username")).toBe(false);
+ expect(keyed.has("name")).toBe(false);
+ expect(keyed.has("cert")).toBe(false);
+ });
+});
+
+describe("postgres output", () => {
+ const out = transform(SOURCE, "postgres");
+
+ it("is marked generated", () => {
+ expect(out.startsWith("// GENERATED FILE")).toBe(true);
+ });
+
+ it("uses pg-core", () => {
+ expect(out).toContain('from "drizzle-orm/pg-core"');
+ expect(out).not.toContain("sqlite-core");
+ expect(out).toContain("pgTable(");
+ expect(out).not.toContain("sqliteTable(");
+ });
+
+ it("maps autoincrement keys to serial", () => {
+ expect(out).toContain('serial("id").primaryKey()');
+ expect(out).not.toContain("autoIncrement");
+ });
+
+ it("maps integer-backed booleans, including the wrapped form", () => {
+ expect(out).toContain('boolean("is_admin")');
+ // Prettier splits longer declarations across lines; both must convert.
+ expect(out).toContain('boolean("wrapped")');
+ expect(out).not.toMatch(/mode:\s*"boolean"/);
+ });
+
+ it("keeps plain integers and maps real", () => {
+ expect(out).toContain('integer("sso_provider_id")');
+ expect(out).toContain('doublePrecision("score")');
+ });
+
+ it("makes key columns varchar and leaves the rest text", () => {
+ expect(out).toContain('varchar("id", { length: 255 })');
+ expect(out).toContain('varchar("user_id", { length: 255 })');
+ expect(out).toContain('varchar("sync_id", { length: 255 })');
+ expect(out).toContain('text("username")');
+ expect(out).toContain('text("name")');
+ });
+
+ it("drops the sqlite-only text length", () => {
+ expect(out).toContain('text("cert")');
+ expect(out).not.toContain("length: 8192");
+ });
+});
+
+describe("mysql output", () => {
+ const out = transform(SOURCE, "mysql");
+
+ it("uses mysql-core", () => {
+ expect(out).toContain('from "drizzle-orm/mysql-core"');
+ expect(out).toContain("mysqlTable(");
+ });
+
+ it("maps autoincrement keys to int auto_increment", () => {
+ expect(out).toContain('int("id").autoincrement().primaryKey()');
+ });
+
+ it("renames integer to int", () => {
+ expect(out).toContain('int("sso_provider_id")');
+ expect(out).not.toMatch(/\binteger\(/);
+ });
+
+ it("maps real to double", () => {
+ expect(out).toContain('double("score")');
+ });
+
+ it("makes key columns varchar โ MySQL cannot index unbounded TEXT", () => {
+ expect(out).toContain('varchar("user_id", { length: 255 })');
+ expect(out).toContain('text("name")');
+ });
+});
+
+describe("determinism", () => {
+ it("produces identical output for identical input", () => {
+ expect(transform(SOURCE, "postgres")).toBe(transform(SOURCE, "postgres"));
+ expect(transform(SOURCE, "mysql")).toBe(transform(SOURCE, "mysql"));
+ });
+
+ it("keeps foreign key behaviour verbatim", () => {
+ for (const dialect of ["postgres", "mysql"] as const) {
+ expect(transform(SOURCE, dialect)).toContain('onDelete: "cascade"');
+ }
+ });
+});
diff --git a/scripts/patch-guacamole-common-js.cjs b/scripts/patch-guacamole-common-js.cjs
new file mode 100644
index 0000000..039071d
--- /dev/null
+++ b/scripts/patch-guacamole-common-js.cjs
@@ -0,0 +1,68 @@
+const fs = require("fs");
+const path = require("path");
+
+const packageRoot = path.join(
+ __dirname,
+ "..",
+ "node_modules",
+ "guacamole-common-js",
+);
+
+const bundlePaths = [
+ path.join(packageRoot, "dist", "esm", "guacamole-common.js"),
+ path.join(packageRoot, "dist", "cjs", "guacamole-common.js"),
+];
+
+const oldFlushBlock =
+ " if (window.requestAnimationFrame && document.hasFocus())\n" +
+ " asyncFlush();\n" +
+ " else\n" +
+ " syncFlush();";
+
+const newFlushBlock =
+ " // Electron can throttle or skip requestAnimationFrame() for inactive\n" +
+ " // windows/tabs even while guacd is still sending display frames. Flush\n" +
+ " // synchronously so Guacamole connections do not stall while waiting for\n" +
+ " // a frame callback that may never run.\n" +
+ " syncFlush();";
+
+let patched = false;
+let foundBundle = false;
+
+for (const bundlePath of bundlePaths) {
+ if (!fs.existsSync(bundlePath)) {
+ console.log(
+ `[patch-guacamole-common-js] ${bundlePath} not found, skipping`,
+ );
+ continue;
+ }
+
+ foundBundle = true;
+ let content = fs.readFileSync(bundlePath, "utf8");
+ if (content.includes(newFlushBlock)) continue;
+
+ if (!content.includes(oldFlushBlock)) {
+ console.log(
+ `[patch-guacamole-common-js] Flush target not found in ${bundlePath}, skipping`,
+ );
+ continue;
+ }
+
+ content = content.replace(oldFlushBlock, newFlushBlock);
+ fs.writeFileSync(bundlePath, content);
+ patched = true;
+}
+
+if (!foundBundle) {
+ console.log("[patch-guacamole-common-js] File not found, skipping");
+ process.exit(0);
+}
+
+if (!patched) {
+ console.log("[patch-guacamole-common-js] Already patched");
+ process.exit(0);
+}
+
+console.log(
+ "[patch-guacamole-common-js] Patched display flush to avoid Electron requestAnimationFrame stalls",
+);
diff --git a/scripts/patch-guacamole-lite.cjs b/scripts/patch-guacamole-lite.cjs
index 67cdca6..c3d37bc 100644
--- a/scripts/patch-guacamole-lite.cjs
+++ b/scripts/patch-guacamole-lite.cjs
@@ -17,14 +17,41 @@ const cryptPath = path.join(
"lib",
"Crypt.js",
);
+const clientConnectionPath = path.join(
+ __dirname,
+ "..",
+ "node_modules",
+ "guacamole-lite",
+ "lib",
+ "ClientConnection.js",
+);
-if (!fs.existsSync(guacdClientPath) || !fs.existsSync(cryptPath)) {
+if (
+ !fs.existsSync(guacdClientPath) ||
+ !fs.existsSync(cryptPath) ||
+ !fs.existsSync(clientConnectionPath)
+) {
console.log("[patch-guacamole-lite] File not found, skipping");
process.exit(0);
}
+// Every patch below is required for correctness: protocol negotiation, the
+// guacd 1.6.0 name handshake, dynamic argument answering, UTF-8 tokens and
+// read-only joins. If an upstream release moves an anchor string, silently
+// skipping would ship a Termix that looks fine and then drops VNC/RDP sessions
+// at runtime, so a missing anchor has to stop the install instead.
+function missingAnchor(patch) {
+ console.error(
+ `[patch-guacamole-lite] ${patch} anchor not found in guacamole-lite. ` +
+ "The upstream file has changed and this patch no longer applies โ " +
+ "update scripts/patch-guacamole-lite.cjs to match the new source.",
+ );
+ process.exit(1);
+}
+
let guacdClientContent = fs.readFileSync(guacdClientPath, "utf8");
let cryptContent = fs.readFileSync(cryptPath, "utf8");
+let clientConnectionContent = fs.readFileSync(clientConnectionPath, "utf8");
// Patch 1: protocol version negotiation.
// guacamole-lite originally only accepted 1.0.0/1.1.0. Support the protocol
@@ -56,20 +83,26 @@ const newVersionBlock =
const oldTimezone = "if (protocolVersion === '1_1_0') {";
const newTimezone = "if (protocolVersion !== '1_0_0') {";
-// Patch 3: send the `name` handshake instruction for protocol >= 1.3.0.
-// The Guacamole protocol added the `name` instruction in 1.3.0 (an optional
-// human-readable identifier for the joining user). guacd 1.6.0 began requiring
-// it during the VNC handshake even when negotiating older protocol versions,
-// causing connections to silently drop right after "User joined". See
+// Patch 3: send the `name` handshake instruction for all protocol versions >= 1.1.0.
+// The Guacamole protocol added `name` in 1.3.0, but guacd 1.6.0 began requiring it
+// during the VNC handshake even when negotiating VERSION_1_1_0, causing connections to
+// silently drop right after "User joined". Sending it for all non-1.0.0 sessions is
+// harmless (guacd ignores unknown handshake instructions for older versions). See
// Termix-SSH/Support#567 and #734.
const oldConnect =
" this.sendInstruction(['connect'].concat(connectArgs));";
-const newConnect =
+const oldNameConnect =
" if (protocolVersion === '1_3_0' || protocolVersion === '1_5_0') {\n" +
" this.sendInstruction(['name', this.connectionSettings.name || 'guacamole-lite']);\n" +
" }\n" +
"\n" +
" this.sendInstruction(['connect'].concat(connectArgs));";
+const newConnect =
+ " if (protocolVersion !== '1_0_0') {\n" +
+ " this.sendInstruction(['name', this.connectionSettings.name || 'guacamole-lite']);\n" +
+ " }\n" +
+ "\n" +
+ " this.sendInstruction(['connect'].concat(connectArgs));";
// Patch 4: answer guacd's dynamic argument requests locally.
// macOS Screen Sharing can request VNC username/password through the
@@ -138,40 +171,33 @@ if (!guacdClientContent.includes("} else if (/^1_\\d+_0$/.test(version)) {")) {
newVersionBlock,
);
} else {
- console.log(
- "[patch-guacamole-lite] Version check target not found, skipping",
- );
- process.exit(0);
+ missingAnchor("Version check");
}
patched = true;
}
if (!guacdClientContent.includes(newTimezone)) {
if (!guacdClientContent.includes(oldTimezone)) {
- console.log("[patch-guacamole-lite] Timezone target not found, skipping");
- process.exit(0);
+ missingAnchor("Timezone");
}
guacdClientContent = guacdClientContent.replace(oldTimezone, newTimezone);
patched = true;
}
if (!guacdClientContent.includes(newConnect)) {
- if (!guacdClientContent.includes(oldConnect)) {
- console.log(
- "[patch-guacamole-lite] Connect target not found, skipping name patch",
- );
- process.exit(0);
+ if (guacdClientContent.includes(oldNameConnect)) {
+ guacdClientContent = guacdClientContent.replace(oldNameConnect, newConnect);
+ } else if (guacdClientContent.includes(oldConnect)) {
+ guacdClientContent = guacdClientContent.replace(oldConnect, newConnect);
+ } else {
+ missingAnchor("Connect");
}
- guacdClientContent = guacdClientContent.replace(oldConnect, newConnect);
patched = true;
}
if (!guacdClientContent.includes("this.nextArgumentStreamIndex = 0;")) {
if (!guacdClientContent.includes(oldSendBuffer)) {
- console.log(
- "[patch-guacamole-lite] Argument stream index target not found, skipping",
- );
- process.exit(0);
+ missingAnchor("Argument stream index");
}
guacdClientContent = guacdClientContent.replace(oldSendBuffer, newSendBuffer);
patched = true;
@@ -179,10 +205,7 @@ if (!guacdClientContent.includes("this.nextArgumentStreamIndex = 0;")) {
if (!guacdClientContent.includes("sendRequiredArguments(params) {")) {
if (!guacdClientContent.includes(oldSendInstructionBlock)) {
- console.log(
- "[patch-guacamole-lite] Required argument helper target not found, skipping",
- );
- process.exit(0);
+ missingAnchor("Required argument helper");
}
guacdClientContent = guacdClientContent.replace(
oldSendInstructionBlock,
@@ -195,10 +218,7 @@ if (
!guacdClientContent.includes("opcode === 'required' || opcode === 'require'")
) {
if (!guacdClientContent.includes(oldReadyHandler)) {
- console.log(
- "[patch-guacamole-lite] Required opcode target not found, skipping",
- );
- process.exit(0);
+ missingAnchor("Required opcode");
}
guacdClientContent = guacdClientContent.replace(
oldReadyHandler,
@@ -251,14 +271,93 @@ if (!cryptContent.includes(newDecryptBlock)) {
newDecryptBlock,
);
} else {
- console.log(
- "[patch-guacamole-lite] UTF-8 token decrypt target not found, skipping",
- );
- process.exit(0);
+ missingAnchor("UTF-8 token decrypt");
}
patched = true;
}
+// Patch 7: drop client-to-guacd input instructions from read-only session-share
+// joins. guacd has no native read-only enforcement in the versions this project
+// targets, so Termix must gate here. Denylist (not allowlist) on purpose: an
+// unrecognized opcode is far more likely to be protocol plumbing (sync, blob,
+// clipboard streams) than a new input vector, so failing open is the safer
+// default for a client we already control.
+const oldSendMessageToGuacd =
+ " sendMessageToGuacd(message) {\n" +
+ " this.lastActivity = Date.now();\n" +
+ " this.logger.log(LOGLEVEL.DEBUG, '[ >>> # ] Received from WS: ```' + message + '```');\n" +
+ "\n" +
+ " if (this.guacdClient) {\n" +
+ " this.guacdClient.send(message, true);\n" +
+ " }\n" +
+ " }";
+const newSendMessageToGuacd =
+ " sendMessageToGuacd(message) {\n" +
+ " this.lastActivity = Date.now();\n" +
+ " this.logger.log(LOGLEVEL.DEBUG, '[ >>> # ] Received from WS: ```' + message + '```');\n" +
+ "\n" +
+ " if (this.isReadOnlyJoin() && this.isInputInstruction(message)) {\n" +
+ " return;\n" +
+ " }\n" +
+ "\n" +
+ " if (this.guacdClient) {\n" +
+ " this.guacdClient.send(message, true);\n" +
+ " }\n" +
+ " }\n" +
+ "\n" +
+ " isReadOnlyJoin() {\n" +
+ " const connection = this.connectionSettings && this.connectionSettings.connection;\n" +
+ " return !!(connection && connection.join && connection.readOnly === true);\n" +
+ " }\n" +
+ "\n" +
+ " // Termix-only read-only gate, not part of the vendored library: extracts just\n" +
+ " // the leading opcode from a raw '.,...;' instruction without the\n" +
+ " // overhead of a full stateful parse.\n" +
+ " isInputInstruction(message) {\n" +
+ " const dot = message.indexOf('.');\n" +
+ " if (dot === -1) return false;\n" +
+ " const len = parseInt(message.substring(0, dot), 10);\n" +
+ " if (isNaN(len)) return false;\n" +
+ " const opcode = message.substring(dot + 1, dot + 1 + len);\n" +
+ " return ['mouse', 'key', 'touch', 'size'].includes(opcode);\n" +
+ " }";
+
+if (!clientConnectionContent.includes("isReadOnlyJoin()")) {
+ if (!clientConnectionContent.includes(oldSendMessageToGuacd)) {
+ missingAnchor("sendMessageToGuacd");
+ }
+ clientConnectionContent = clientConnectionContent.replace(
+ oldSendMessageToGuacd,
+ newSendMessageToGuacd,
+ );
+ patched = true;
+}
+
+// Patch 8: mergeConnectionOptions only preserves `join` across the settings
+// merge, dropping Termix's `readOnly` flag before sendMessageToGuacd can see it.
+const oldPreserveJoin =
+ " // For join connections, preserve the join property\n" +
+ " if (this.connectionSettings.connection.join) {\n" +
+ " compiledSettings.join = this.connectionSettings.connection.join;\n" +
+ " }";
+const newPreserveJoin =
+ " // For join connections, preserve the join property\n" +
+ " if (this.connectionSettings.connection.join) {\n" +
+ " compiledSettings.join = this.connectionSettings.connection.join;\n" +
+ " compiledSettings.readOnly = this.connectionSettings.connection.readOnly === true;\n" +
+ " }";
+
+if (!clientConnectionContent.includes("compiledSettings.readOnly")) {
+ if (!clientConnectionContent.includes(oldPreserveJoin)) {
+ missingAnchor("join-preserve");
+ }
+ clientConnectionContent = clientConnectionContent.replace(
+ oldPreserveJoin,
+ newPreserveJoin,
+ );
+ patched = true;
+}
+
if (!patched) {
console.log("[patch-guacamole-lite] Already patched");
process.exit(0);
@@ -266,6 +365,7 @@ if (!patched) {
fs.writeFileSync(guacdClientPath, guacdClientContent);
fs.writeFileSync(cryptPath, cryptContent);
+fs.writeFileSync(clientConnectionPath, clientConnectionContent);
console.log(
- "[patch-guacamole-lite] Patched protocol VERSION_1_3_0/1_5_0 support, name handshake, required arguments, and UTF-8 token decrypt",
+ "[patch-guacamole-lite] Patched protocol VERSION_1_3_0/1_5_0 support, name handshake, required arguments, UTF-8 token decrypt, and read-only join input filtering",
);
diff --git a/scripts/patch-guacamole-lite.test.ts b/scripts/patch-guacamole-lite.test.ts
index d6b8c9e..70e3ad3 100644
--- a/scripts/patch-guacamole-lite.test.ts
+++ b/scripts/patch-guacamole-lite.test.ts
@@ -69,6 +69,31 @@ describe("patch-guacamole-lite", () => {
]);
});
+ it("sends name instruction for VERSION_1_1_0 to fix guacd 1.6.0 VNC drops", () => {
+ const client = createPatchedClient({
+ hostname: "192.0.2.10",
+ port: 5900,
+ password: "secret",
+ width: 1280,
+ height: 720,
+ dpi: 96,
+ });
+
+ client.sendHandshakeReply(["VERSION_1_1_0", "hostname", "port"]);
+
+ expect(client.sendInstruction).toHaveBeenCalledWith(["timezone"]);
+ expect(client.sendInstruction).toHaveBeenCalledWith([
+ "name",
+ "guacamole-lite",
+ ]);
+ expect(client.sendInstruction).toHaveBeenCalledWith([
+ "connect",
+ "VERSION_1_1_0",
+ "192.0.2.10",
+ 5900,
+ ]);
+ });
+
it("answers required credentials through argument value streams", () => {
const client = createPatchedClient({
username: "",
diff --git a/scripts/patch-nan.cjs b/scripts/patch-nan.cjs
index 5fec17f..43aad38 100644
--- a/scripts/patch-nan.cjs
+++ b/scripts/patch-nan.cjs
@@ -39,6 +39,19 @@ const nanHeaderPatched = patchFile(path.join(nanDir, "nan.h"), [
# define __builtin_frame_address(level) _AddressOfReturnAddress()
#endif
+// v8::External::New()/->Value() gained a mandatory ExternalPointerTypeTag
+// argument in V8 15 (Electron 43+). Plain Node (V8 <= 13.x as of Node 24)
+// still uses the old 2-arg signatures, so this must be conditional rather
+// than assumed - a build can target either header set.
+#include
+#if defined(V8_MAJOR_VERSION) && V8_MAJOR_VERSION >= 15
+# define NAN_EXTERNAL_TAG_ARG , static_cast(0)
+# define NAN_EXTERNAL_TAG_PARAM static_cast(0)
+#else
+# define NAN_EXTERNAL_TAG_ARG
+# define NAN_EXTERNAL_TAG_PARAM
+#endif
+
#define NODE_0_10_MODULE_VERSION 11`,
},
]);
@@ -63,23 +76,24 @@ const bindingPatched = patchFile(bindingPath, [
},
]);
-// 2. nan_implementation_12_inl.h: replace v8::External::New() with the 3-arg form.
-// Electron 42 / V8 13+ requires an ExternalPointerTypeTag as the third argument.
+// 2. nan_implementation_12_inl.h: replace v8::External::New() with a form that
+// passes NAN_EXTERNAL_TAG_ARG - a macro (defined in the nan.h patch above)
+// that expands to the ExternalPointerTypeTag argument only when the target
+// V8 headers actually declare it (V8 15+ / Electron 43+).
const implPath = path.join(nanDir, "nan_implementation_12_inl.h");
let implPatched = false;
if (fs.existsSync(implPath)) {
let src = fs.readFileSync(implPath, "utf8");
const before = src;
- const TAG = "static_cast(0)";
- if (!src.includes(TAG)) {
+ if (!src.includes("NAN_EXTERNAL_TAG_ARG")) {
src = src.replace(
- /v8::External::New\(v8::Isolate::GetCurrent\(\),\s*value\)/g,
- `v8::External::New(v8::Isolate::GetCurrent(), value, ${TAG})`,
+ /v8::External::New\(v8::Isolate::GetCurrent\(\),\s*value(?:,\s*static_cast\(0\))?\)/g,
+ `v8::External::New(v8::Isolate::GetCurrent(), value NAN_EXTERNAL_TAG_ARG)`,
);
src = src.replace(
- /v8::External::New\(isolate,\s*reinterpret_cast\(callback\)\)/g,
- `v8::External::New(isolate, reinterpret_cast(callback), ${TAG})`,
+ /v8::External::New\(isolate,\s*reinterpret_cast\(callback\)(?:,\s*static_cast\(0\))?\)/g,
+ `v8::External::New(isolate, reinterpret_cast(callback) NAN_EXTERNAL_TAG_ARG)`,
);
}
@@ -89,20 +103,19 @@ if (fs.existsSync(implPath)) {
}
}
-// 3. nan_callbacks_12_inl.h: replace ->Value() with ->Value(tag) on v8::External.
-// The new API requires an ExternalPointerTypeTag argument.
+// 3. nan_callbacks_12_inl.h: replace ->Value() with ->Value(NAN_EXTERNAL_TAG_PARAM)
+// on v8::External, same conditional-tag reasoning as above.
const callbacksPath = path.join(nanDir, "nan_callbacks_12_inl.h");
let callbacksPatched = false;
if (fs.existsSync(callbacksPath)) {
let src = fs.readFileSync(callbacksPath, "utf8");
const before = src;
- const TAG = "static_cast(0)";
- if (!src.includes(TAG)) {
- // Pattern: .As()->Value()) โ always followed by ))
+ if (!src.includes("NAN_EXTERNAL_TAG_PARAM")) {
+ // Pattern: .As()->Value()) or ->Value())
src = src.replace(
- /\.As\(\)->Value\(\)\)/g,
- `.As()->Value(${TAG}))`,
+ /\.As\(\)->Value\((?:static_cast\(0\))?\)\)/g,
+ `.As()->Value(NAN_EXTERNAL_TAG_PARAM))`,
);
}
diff --git a/scripts/patch-xterm-android-ime.cjs b/scripts/patch-xterm-android-ime.cjs
index e7738b3..4bbff4a 100644
--- a/scripts/patch-xterm-android-ime.cjs
+++ b/scripts/patch-xterm-android-ime.cjs
@@ -14,6 +14,17 @@ const xtermDir = path.join(
// xtermjs/xterm.js#3600 remains unresolved upstream. Android IMEs can restart
// composition on the previous word and replace it with a shorter value (for
// example, Vietnamese "Hoar" -> "Hแปa"). xterm 6.0 otherwise emits nothing.
+//
+// Also fixes _handleAnyTextareaChanges, which iOS Safari/WKWebView drives
+// for ordinary typing (it reports keyCode 229 for all software-keyboard
+// input, not just IME composition). That handler diffs the textarea value
+// via `newValue.replace(oldValue, "")`, a literal substring removal. When
+// keystrokes arrive faster than the function's setTimeout(0) callback runs,
+// several overlapping callbacks each capture a stale oldValue, so the
+// literal-substring search fails to match and the diff silently comes back
+// empty - characters are dropped instead of sent. Swap in the same
+// common-prefix diff used for composition-end above so a stale oldValue
+// still yields the correct delta.
const patches = [
{
file: "xterm.mjs",
@@ -34,6 +45,10 @@ const patches = [
"e.start+=this._dataAlreadySent.length,this._isComposing?i=this._textarea.value.substring(e.start,this._compositionPosition.start):i=this._textarea.value.substring(e.start),i.length>0&&",
"e.start+=this._dataAlreadySent.length;if(this._isComposing)i=this._textarea.value.substring(e.start,this._compositionPosition.start);else{const t=this._textarea.value;if(t.length0&&",
],
+ [
+ '_handleAnyTextareaChanges(){let t=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let e=this._textarea.value,i=e.replace(t,"");this._dataAlreadySent=i,e.length>t.length?this._coreService.triggerDataEvent(i,!0):e.length{if(!this._isComposing){let e=this._textarea.value,r=0;const n=Math.min(e.length,t.length);for(;r0&&this._coreService.triggerDataEvent(i,!0)}},0)}",
+ ],
],
},
{
@@ -55,6 +70,10 @@ const patches = [
"e.start+=this._dataAlreadySent.length,t=this._isComposing?this._textarea.value.substring(e.start,this._compositionPosition.start):this._textarea.value.substring(e.start),t.length>0&&",
"e.start+=this._dataAlreadySent.length;this._isComposing?t=this._textarea.value.substring(e.start,this._compositionPosition.start):(()=>{const s=this._textarea.value;if(s.length0&&",
],
+ [
+ '_handleAnyTextareaChanges(){const e=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const t=this._textarea.value,i=t.replace(e,"");this._dataAlreadySent=i,t.length>e.length?this._coreService.triggerDataEvent(i,!0):t.length{if(!this._isComposing){const t=this._textarea.value;let r=0;const n=Math.min(t.length,e.length);for(;r0&&this._coreService.triggerDataEvent(i,!0)}}),0)}",
+ ],
],
},
];
@@ -66,18 +85,24 @@ for (const { file, replacements } of patches) {
}
let source = fs.readFileSync(filePath, "utf8");
- if (source.includes("_preCompositionValue")) {
- console.log(`[patch-xterm-android-ime] ${file} already patched`);
- continue;
- }
+ let changed = false;
for (const [original, patched] of replacements) {
+ if (source.includes(patched)) {
+ continue;
+ }
if (!source.includes(original)) {
throw new Error(
`[patch-xterm-android-ime] Expected source not found in ${file}`,
);
}
source = source.replace(original, patched);
+ changed = true;
+ }
+
+ if (!changed) {
+ console.log(`[patch-xterm-android-ime] ${file} already patched`);
+ continue;
}
fs.writeFileSync(filePath, source);
diff --git a/scripts/verify-dialects.mjs b/scripts/verify-dialects.mjs
new file mode 100644
index 0000000..308a530
--- /dev/null
+++ b/scripts/verify-dialects.mjs
@@ -0,0 +1,140 @@
+/**
+ * Runs the repository layer against a real Postgres or MySQL server.
+ *
+ * The unit tests only ever see SQLite, so the parts of this codebase that
+ * differ per engine โ the RETURNING replacements, the read-then-write
+ * transactions, the value encoders โ have no coverage there at all. This is
+ * what covers them, and it needs a live server, which is why it is a script
+ * rather than a test.
+ *
+ * Usage:
+ * npm run verify:dialect -- postgres://user:pass@host:5432/db
+ * npm run verify:dialect -- mysql://user:pass@host:3306/db
+ *
+ * Applies the migrations first, through the same runRemoteMigrations() the
+ * application uses at startup โ so a broken migration fails here rather than in
+ * production. Writes real rows: point it at a scratch database.
+ */
+
+import { randomUUID } from "crypto";
+
+const url = process.argv[2];
+if (!url) {
+ console.error("usage: node scripts/verify-dialects.mjs ");
+ process.exit(2);
+}
+
+const scheme = url.split("://", 1)[0].toLowerCase();
+const dialect = scheme.startsWith("postgres")
+ ? "postgres"
+ : scheme === "mysql" || scheme === "mariadb"
+ ? "mysql"
+ : null;
+
+if (!dialect) {
+ console.error(`unsupported URL scheme "${scheme}://"`);
+ process.exit(2);
+}
+
+const { drizzle } = await import(
+ dialect === "postgres" ? "drizzle-orm/node-postgres" : "drizzle-orm/mysql2"
+);
+
+// No schema option on purpose โ see connect.ts.
+const db = drizzle(url);
+const context = { dialect, drizzle: db };
+
+const { runRemoteMigrations } =
+ await import("../src/backend/database/db/migrate.js");
+await runRemoteMigrations(dialect, db);
+
+const { UserRepository } =
+ await import("../src/backend/database/repositories/user-repository.js");
+const { HostRepository } =
+ await import("../src/backend/database/repositories/host-repository.js");
+const { SettingsRepository } =
+ await import("../src/backend/database/repositories/settings-repository.js");
+
+let failures = 0;
+const check = (label, got, want) => {
+ const ok = JSON.stringify(got) === JSON.stringify(want);
+ if (!ok) failures++;
+ console.log(
+ ` ${ok ? "ok " : "FAIL"} ${label}` +
+ (ok
+ ? ""
+ : `\n got ${JSON.stringify(got)}, want ${JSON.stringify(want)}`),
+ );
+};
+
+console.log(`\nverifying ${dialect} at ${url.replace(/:[^:@]*@/, ":***@")}\n`);
+
+const users = new UserRepository(context);
+const userId = `verify-${randomUUID()}`;
+
+// insertReturning: on MySQL this is an insert plus a read inside a transaction.
+const created = await users.create({
+ id: userId,
+ username: "before",
+ passwordHash: "x",
+ isAdmin: true,
+});
+check("insert returns the stored row", created?.username, "before");
+
+// The one non-identity value encoder in the schema. Booleans are integers in
+// the sqlite definitions the repositories import, so this asserts that 1/0
+// survives a round trip through a native boolean column.
+check("boolean true survives the round trip", created?.isAdmin, true);
+
+// updateReturning must report the state AFTER the write. Reading first would
+// return the value the update replaced โ silently, with no error.
+const updated = await users.update(userId, { username: "after" });
+check("update returns the new value", updated?.username, "after");
+
+const hosts = new HostRepository(context);
+const host = await hosts.create({
+ userId,
+ name: "verify",
+ ip: "127.0.0.1",
+ port: 22,
+ username: "root",
+ authType: "password",
+ enableTerminal: true,
+});
+check(
+ "autoincrement id came back",
+ typeof host?.id === "number" && host.id > 0,
+ true,
+);
+check(
+ "database-assigned createdAt came back",
+ typeof host?.createdAt === "string" && host.createdAt.length > 0,
+ true,
+);
+
+// deleteReturning must report the state BEFORE the write. Reading afterwards
+// would find nothing at all.
+const settings = new SettingsRepository(context);
+const prefix = `verify-${randomUUID()}`;
+await settings.set(`${prefix}-a`, "1");
+await settings.set(`${prefix}-b`, "2");
+check(
+ "delete reports the rows it removed",
+ await settings.deleteLike(`${prefix}-%`),
+ 2,
+);
+check(
+ "and they are actually gone",
+ (await settings.listAll()).filter((row) => row.key.startsWith(prefix)).length,
+ 0,
+);
+
+await hosts.deleteForUser(userId, host.id);
+check("host really deleted", await hosts.findById(host.id), null);
+
+console.log(
+ failures === 0
+ ? `\n${dialect}: all checks passed\n`
+ : `\n${dialect}: ${failures} FAILED\n`,
+);
+process.exit(failures === 0 ? 0 : 1);
diff --git a/src/backend/ai/context.ts b/src/backend/ai/context.ts
new file mode 100644
index 0000000..ce8fc40
--- /dev/null
+++ b/src/backend/ai/context.ts
@@ -0,0 +1,55 @@
+/**
+ * The system prompt.
+ *
+ * Deliberately small: the assistant starts with almost no context and must call
+ * a read tool to learn anything. That keeps token cost predictable, makes every
+ * data access visible in the transcript, and means nothing is sent to a
+ * third-party provider that the user did not implicitly ask for.
+ */
+export function buildSystemPrompt(options: {
+ hostCount: number;
+ activeTab?: string | null;
+ allowReadOnlyCommands: boolean;
+}): string {
+ const lines: string[] = [
+ "You are the assistant built into Termix, a self-hosted server management app.",
+ "You help the user manage their servers, snippets, automations, fleets and alerts.",
+ "",
+ "How you work:",
+ "- You start with no knowledge of this user's setup. Call a read tool to find out anything you need.",
+ "- You cannot change anything directly. To make a change, call a propose_* tool; the user sees a card and approves or rejects it.",
+ "- You have no access to passwords, SSH keys, API keys or any other credential, and you never ask the user to paste one into the chat.",
+ "",
+ "Scope:",
+ "- Do exactly what was asked, and nothing beyond it. A question is a request for an answer, not for changes.",
+ "- Questions like 'what is running on this server', 'check this host' or 'why is this slow' are answered with information. Read, then report. Do not propose anything.",
+ "- Only propose a change when the user asked for one, in words like 'add', 'create', 'set up', 'fix' or 'change'.",
+ "- Do not propose follow-up work you thought of yourself: no monitoring, no alert rules, no scripts, no snippets, no cleanup, unless that is what was requested.",
+ "- If you think something is worth doing, say so in one sentence and stop. Let the user ask.",
+ "- One request means one proposal at most. Do not bundle extras alongside it.",
+ "",
+ "How to answer:",
+ "- Lead with the answer. Keep responses short and concrete.",
+ "- When you propose something, say in one line what it does and why.",
+ "- If a request is ambiguous in a way that changes what you would propose, ask before proposing.",
+ "- Never claim you have done something. You propose; the user applies.",
+ ];
+
+ if (options.allowReadOnlyCommands) {
+ lines.push(
+ "- The user has allowed you to run read-only diagnostic commands directly. Anything that changes state still has to be proposed.",
+ );
+ }
+
+ lines.push(
+ "",
+ "Current context:",
+ `- The user has ${options.hostCount} host${options.hostCount === 1 ? "" : "s"} configured.`,
+ );
+
+ if (options.activeTab) {
+ lines.push(`- They are currently looking at: ${options.activeTab}.`);
+ }
+
+ return lines.join("\n");
+}
diff --git a/src/backend/ai/egress.ts b/src/backend/ai/egress.ts
new file mode 100644
index 0000000..700b11c
--- /dev/null
+++ b/src/backend/ai/egress.ts
@@ -0,0 +1,113 @@
+import { isIP } from "net";
+import { isBlockedAddress } from "../utils/safe-outbound-fetch.js";
+import { createCurrentSettingsRepository } from "../database/repositories/factory.js";
+
+/**
+ * Where the assistant is allowed to send requests.
+ *
+ * Cloud providers are reached through the SSRF-guarded path, which refuses to
+ * resolve to a private address. That guard is exactly what a self-hosted Ollama
+ * on localhost trips over, so private destinations are permitted only when an
+ * admin has named the host. Without that split, any logged-in user could point
+ * a "provider" at an internal service and use the backend as an authenticated
+ * probe of the server's own network.
+ */
+
+export const AI_PRIVATE_ALLOWLIST_KEY = "ai_private_endpoint_allowlist";
+
+/** Hosts a self-hoster almost certainly wants, and which reach only this machine. */
+export const DEFAULT_PRIVATE_ALLOWLIST = [
+ "localhost",
+ "127.0.0.1",
+ "::1",
+ "host.docker.internal",
+];
+
+export function parseAllowlist(raw: string | null): string[] {
+ if (!raw) return [...DEFAULT_PRIVATE_ALLOWLIST];
+ try {
+ const parsed = JSON.parse(raw);
+ if (!Array.isArray(parsed)) return [...DEFAULT_PRIVATE_ALLOWLIST];
+ return parsed
+ .filter((entry): entry is string => typeof entry === "string")
+ .map((entry) => entry.trim().toLowerCase())
+ .filter(Boolean);
+ } catch {
+ return [...DEFAULT_PRIVATE_ALLOWLIST];
+ }
+}
+
+export async function readPrivateAllowlist(): Promise {
+ const raw = await createCurrentSettingsRepository().get(
+ AI_PRIVATE_ALLOWLIST_KEY,
+ );
+ return parseAllowlist(raw);
+}
+
+function normalizeHost(hostname: string): string {
+ return hostname.replace(/^\[|\]$/g, "").toLowerCase();
+}
+
+/**
+ * True when the URL names a destination the SSRF guard would refuse. A bare
+ * hostname that is not an IP literal (e.g. "ollama.internal") is treated as
+ * private only if it is "localhost" -- anything else resolves through DNS and
+ * is caught at connect time by the guard instead.
+ */
+export function isPrivateDestination(rawUrl: string): boolean {
+ let url: URL;
+ try {
+ url = new URL(rawUrl);
+ } catch {
+ return false;
+ }
+ const host = normalizeHost(url.hostname);
+ if (host === "localhost" || host.endsWith(".localhost")) return true;
+ if (isIP(host)) return isBlockedAddress(host);
+ return false;
+}
+
+export interface EgressDecision {
+ allowed: boolean;
+ /** True when the destination needs the allowlisted-private path. */
+ isPrivate: boolean;
+ reason?: string;
+}
+
+export function evaluateEgress(
+ rawUrl: string,
+ allowlist: string[],
+): EgressDecision {
+ let url: URL;
+ try {
+ url = new URL(rawUrl);
+ } catch {
+ return { allowed: false, isPrivate: false, reason: "Invalid URL" };
+ }
+
+ if (!["http:", "https:"].includes(url.protocol)) {
+ return { allowed: false, isPrivate: false, reason: "Unsupported protocol" };
+ }
+ if (url.username || url.password) {
+ return {
+ allowed: false,
+ isPrivate: false,
+ reason: "Credentials in URL are not allowed",
+ };
+ }
+
+ const host = normalizeHost(url.hostname);
+ const isPrivate = isPrivateDestination(rawUrl);
+
+ if (!isPrivate) return { allowed: true, isPrivate: false };
+
+ const normalized = allowlist.map((entry) => entry.trim().toLowerCase());
+ if (normalized.includes(host)) return { allowed: true, isPrivate: true };
+
+ return {
+ allowed: false,
+ isPrivate: true,
+ reason:
+ "This address is on a private network. An administrator must add its host to the AI endpoint allowlist first.",
+ };
+}
diff --git a/src/backend/ai/engine.ts b/src/backend/ai/engine.ts
new file mode 100644
index 0000000..17aaed0
--- /dev/null
+++ b/src/backend/ai/engine.ts
@@ -0,0 +1,150 @@
+import { getErrorMessage } from "../utils/error-message.js";
+import { getAdapter } from "./providers/registry.js";
+import type {
+ ChatMessage,
+ ProviderConfig,
+ ToolCall,
+} from "./providers/types.js";
+import { redact, redactToJson } from "./redaction.js";
+import { getTool, toolDefinitions } from "./tools/catalog.js";
+import {
+ isProposalDraft,
+ type ProposalDraft,
+ type ToolContext,
+} from "./tools/types.js";
+
+/**
+ * The agent loop: stream a turn, run any tools the model asked for, feed the
+ * results back, repeat. Bounded so a model that keeps calling tools cannot spin
+ * forever.
+ */
+
+const MAX_TURNS = 8;
+
+export type EngineEvent =
+ | { type: "token"; text: string }
+ | { type: "tool_call"; name: string; arguments: Record }
+ | { type: "tool_result"; name: string; result: unknown }
+ | { type: "proposal"; draft: ProposalDraft }
+ | { type: "assistant_message"; content: string; toolCalls: ToolCall[] }
+ | { type: "done" }
+ | { type: "error"; message: string };
+
+export interface EngineOptions {
+ config: ProviderConfig;
+ model: string;
+ system: string;
+ history: ChatMessage[];
+ context: ToolContext;
+ signal?: AbortSignal;
+}
+
+export async function* runAgent(
+ options: EngineOptions,
+): AsyncGenerator {
+ const adapter = getAdapter(options.config.providerType);
+ const tools = toolDefinitions();
+ const messages: ChatMessage[] = [...options.history];
+
+ for (let turn = 0; turn < MAX_TURNS; turn += 1) {
+ let text = "";
+ const calls: ToolCall[] = [];
+ let failed = false;
+
+ try {
+ for await (const chunk of adapter.streamChat(options.config, {
+ model: options.model,
+ system: options.system,
+ messages,
+ tools,
+ signal: options.signal,
+ })) {
+ if (chunk.type === "text") {
+ text += chunk.text;
+ yield { type: "token", text: chunk.text };
+ } else if (chunk.type === "tool_call") {
+ calls.push(chunk.call);
+ } else if (chunk.type === "error") {
+ failed = true;
+ yield { type: "error", message: chunk.message };
+ }
+ }
+ } catch (error) {
+ const message = getErrorMessage(error, "The provider request failed");
+ yield { type: "error", message };
+ return;
+ }
+
+ if (failed) return;
+
+ yield { type: "assistant_message", content: text, toolCalls: calls };
+
+ if (!calls.length) {
+ yield { type: "done" };
+ return;
+ }
+
+ messages.push({ role: "assistant", content: text, toolCalls: calls });
+
+ for (const call of calls) {
+ yield { type: "tool_call", name: call.name, arguments: call.arguments };
+
+ const result = await runTool(call, options.context);
+
+ if (isProposalDraft(result)) {
+ // Closes the tool call before the proposal card is emitted. Without
+ // this the call has no matching result and renders as permanently
+ // running, even though the work is done and awaiting the user.
+ yield {
+ type: "tool_result",
+ name: call.name,
+ result: { status: "awaiting_user_approval" },
+ };
+ yield { type: "proposal", draft: result };
+ // The model is told the proposal is awaiting the user rather than done,
+ // so it does not go on to describe the change as applied.
+ messages.push({
+ role: "tool",
+ content: JSON.stringify({
+ status: "awaiting_user_approval",
+ summary: result.summary,
+ }),
+ toolCallId: call.id,
+ toolName: call.name,
+ });
+ continue;
+ }
+
+ yield { type: "tool_result", name: call.name, result: redact(result) };
+ messages.push({
+ role: "tool",
+ content: redactToJson(result),
+ toolCallId: call.id,
+ toolName: call.name,
+ });
+ }
+ }
+
+ // Ran out of turns with the model still calling tools.
+ yield {
+ type: "error",
+ message: "The assistant used too many steps without finishing.",
+ };
+}
+
+async function runTool(call: ToolCall, context: ToolContext): Promise {
+ const tool = getTool(call.name);
+
+ // A model can emit any name it likes; only the catalog decides what runs.
+ if (!tool) {
+ return { error: `Unknown tool: ${call.name}` };
+ }
+
+ try {
+ return await tool.handler(call.arguments ?? {}, context);
+ } catch (error) {
+ return {
+ error: getErrorMessage(error, "The tool failed"),
+ };
+ }
+}
diff --git a/src/backend/ai/gating.ts b/src/backend/ai/gating.ts
new file mode 100644
index 0000000..689363a
--- /dev/null
+++ b/src/backend/ai/gating.ts
@@ -0,0 +1,70 @@
+import type { NextFunction, Response } from "express";
+import type { AuthenticatedRequest } from "../../types/index.js";
+import {
+ createCurrentSettingsRepository,
+ createCurrentUserPreferenceRepository,
+} from "../database/repositories/factory.js";
+
+/**
+ * Three gates, all checked on the server.
+ *
+ * The admin global is a hard kill switch: when it is off the feature does not
+ * exist for anyone, regardless of what any user has enabled. It defaults to
+ * false so upgrading an existing install turns nothing on by surprise.
+ *
+ * Mirrors the shape of isSharingEnabledForHost in the session-sharing routes,
+ * where the global also wins over the per-entity setting.
+ */
+
+export const AI_GLOBAL_ENABLED_KEY = "ai_globally_enabled";
+
+export async function isAiGloballyEnabled(): Promise {
+ return createCurrentSettingsRepository().getBoolean(
+ AI_GLOBAL_ENABLED_KEY,
+ false,
+ );
+}
+
+export interface AiAccess {
+ enabled: boolean;
+ allowReadOnlyCommands: boolean;
+}
+
+export async function resolveAiAccess(userId: string): Promise {
+ const globalEnabled = await isAiGloballyEnabled();
+ if (!globalEnabled) {
+ return { enabled: false, allowReadOnlyCommands: false };
+ }
+
+ const preferences =
+ await createCurrentUserPreferenceRepository().findByUserId(userId);
+
+ return {
+ // Null means the user was never asked, which is not consent.
+ enabled: preferences?.aiAssistantEnabled === true,
+ allowReadOnlyCommands: preferences?.aiReadOnlyCommands === true,
+ };
+}
+
+/** Rejects any AI request unless both gates are open. */
+export function createAiGate() {
+ return async (
+ req: AuthenticatedRequest,
+ res: Response,
+ next: NextFunction,
+ ): Promise => {
+ if (!req.userId) {
+ res.status(401).json({ error: "Authentication required" });
+ return;
+ }
+
+ const access = await resolveAiAccess(req.userId);
+ if (!access.enabled) {
+ res.status(403).json({ error: "The AI assistant is not enabled" });
+ return;
+ }
+
+ (req as AuthenticatedRequest & { aiAccess?: AiAccess }).aiAccess = access;
+ next();
+ };
+}
diff --git a/src/backend/ai/index.ts b/src/backend/ai/index.ts
new file mode 100644
index 0000000..aa31f60
--- /dev/null
+++ b/src/backend/ai/index.ts
@@ -0,0 +1,976 @@
+import { getErrorMessage } from "../utils/error-message.js";
+import express from "express";
+import type { AuthenticatedRequest } from "../../types/index.js";
+import { AuthManager } from "../utils/auth-manager.js";
+import { databaseLogger } from "../utils/logger.js";
+import {
+ getAuditUsername,
+ getRequestMeta,
+ logAudit,
+} from "../utils/audit-logger.js";
+import {
+ createCurrentAiRepository,
+ createCurrentHostRepository,
+} from "../database/repositories/factory.js";
+import { buildSystemPrompt } from "./context.js";
+import { runAgent } from "./engine.js";
+import {
+ createAiGate,
+ isAiGloballyEnabled,
+ resolveAiAccess,
+} from "./gating.js";
+import {
+ FALLBACK_MODELS,
+ getAdapter,
+ REQUIRES_API_KEY,
+ REQUIRES_BASE_URL,
+} from "./providers/registry.js";
+import type {
+ AiProviderType,
+ ChatMessage,
+ ProviderConfig,
+} from "./providers/types.js";
+import { isAiProviderType } from "./providers/types.js";
+import { applyProposal } from "./tools/executor.js";
+
+const router = express.Router();
+
+const authManager = AuthManager.getInstance();
+const authenticateJWT = authManager.createAuthMiddleware();
+const requireDataAccess = authManager.createDataAccessMiddleware();
+const aiGate = createAiGate();
+
+function parseId(raw: unknown): number | null {
+ const id = typeof raw === "string" ? parseInt(raw, 10) : Number(raw);
+ return Number.isInteger(id) && id > 0 ? id : null;
+}
+
+/**
+ * @openapi
+ * /ai/status:
+ * get:
+ * summary: Whether the AI assistant is available to this user
+ * description: >
+ * Deliberately not behind the AI gate: the frontend calls this to decide
+ * whether to render any AI surface at all, and needs a plain answer rather
+ * than a 403 when the feature is off.
+ * tags:
+ * - AI
+ * responses:
+ * 200:
+ * description: The effective enablement state.
+ */
+router.get("/status", authenticateJWT, async (req, res) => {
+ const userId = (req as AuthenticatedRequest).userId as string;
+ try {
+ const [globalEnabled, access] = await Promise.all([
+ isAiGloballyEnabled(),
+ resolveAiAccess(userId),
+ ]);
+ res.json({
+ globallyEnabled: globalEnabled,
+ enabled: access.enabled,
+ allowReadOnlyCommands: access.allowReadOnlyCommands,
+ });
+ } catch (err) {
+ databaseLogger.error("Failed to read AI status", err, {
+ operation: "ai_status_failed",
+ userId,
+ });
+ res.status(500).json({ error: "Failed to read AI status" });
+ }
+});
+
+/**
+ * @openapi
+ * /ai/providers:
+ * get:
+ * summary: List the user's configured AI providers
+ * tags:
+ * - AI
+ * responses:
+ * 200:
+ * description: Providers, with API keys masked.
+ * 403:
+ * description: The AI assistant is not enabled.
+ */
+router.get(
+ "/providers",
+ authenticateJWT,
+ requireDataAccess,
+ aiGate,
+ async (req, res) => {
+ const userId = (req as AuthenticatedRequest).userId as string;
+ try {
+ const providers = await createCurrentAiRepository().listProviders(userId);
+ res.json({ providers });
+ } catch (err) {
+ databaseLogger.error("Failed to list AI providers", err, {
+ operation: "ai_providers_list_failed",
+ userId,
+ });
+ res.status(500).json({ error: "Failed to list providers" });
+ }
+ },
+);
+
+/**
+ * @openapi
+ * /ai/providers:
+ * post:
+ * summary: Add an AI provider
+ * tags:
+ * - AI
+ * requestBody:
+ * required: true
+ * content:
+ * application/json:
+ * schema:
+ * type: object
+ * properties:
+ * providerType:
+ * type: string
+ * label:
+ * type: string
+ * baseUrl:
+ * type: string
+ * apiKey:
+ * type: string
+ * defaultModel:
+ * type: string
+ * responses:
+ * 201:
+ * description: Provider created.
+ * 400:
+ * description: Invalid request body.
+ */
+router.post(
+ "/providers",
+ authenticateJWT,
+ requireDataAccess,
+ aiGate,
+ async (req, res) => {
+ const userId = (req as AuthenticatedRequest).userId as string;
+ const { providerType, label, baseUrl, apiKey, defaultModel } =
+ req.body ?? {};
+
+ if (!isAiProviderType(providerType)) {
+ return res.status(400).json({ error: "Unknown provider type" });
+ }
+ if (typeof label !== "string" || !label.trim()) {
+ return res.status(400).json({ error: "label is required" });
+ }
+ if (REQUIRES_BASE_URL.includes(providerType) && !baseUrl?.trim()) {
+ return res.status(400).json({ error: "This provider needs a base URL" });
+ }
+ if (REQUIRES_API_KEY.includes(providerType) && !apiKey?.trim()) {
+ return res.status(400).json({ error: "This provider needs an API key" });
+ }
+
+ try {
+ const created = await createCurrentAiRepository().createProvider({
+ userId,
+ providerType,
+ label: label.trim(),
+ baseUrl: typeof baseUrl === "string" ? baseUrl.trim() : null,
+ apiKey: typeof apiKey === "string" ? apiKey.trim() : null,
+ defaultModel:
+ typeof defaultModel === "string" ? defaultModel.trim() : null,
+ });
+
+ const { ipAddress, userAgent } = getRequestMeta(req);
+ await logAudit({
+ userId,
+ username: await getAuditUsername(userId),
+ action: "create_ai_provider",
+ resourceType: "ai_provider",
+ resourceId: String(created.id),
+ resourceName: created.label,
+ ipAddress,
+ userAgent,
+ success: true,
+ });
+
+ res.status(201).json({ provider: created });
+ } catch (err) {
+ databaseLogger.error("Failed to create AI provider", err, {
+ operation: "ai_provider_create_failed",
+ userId,
+ });
+ res.status(500).json({ error: "Failed to create provider" });
+ }
+ },
+);
+
+/**
+ * @openapi
+ * /ai/providers/{id}:
+ * patch:
+ * summary: Update an AI provider
+ * tags:
+ * - AI
+ * parameters:
+ * - in: path
+ * name: id
+ * required: true
+ * schema:
+ * type: integer
+ * responses:
+ * 200:
+ * description: Provider updated.
+ * 404:
+ * description: Provider not found.
+ */
+router.patch(
+ "/providers/:id",
+ authenticateJWT,
+ requireDataAccess,
+ aiGate,
+ async (req, res) => {
+ const userId = (req as AuthenticatedRequest).userId as string;
+ const id = parseId(req.params.id);
+ if (!id) return res.status(400).json({ error: "Invalid provider id" });
+
+ try {
+ const updated = await createCurrentAiRepository().updateProvider(
+ id,
+ userId,
+ req.body ?? {},
+ );
+ if (!updated)
+ return res.status(404).json({ error: "Provider not found" });
+
+ const { ipAddress, userAgent } = getRequestMeta(req);
+ await logAudit({
+ userId,
+ username: await getAuditUsername(userId),
+ action: "update_ai_provider",
+ resourceType: "ai_provider",
+ resourceId: String(id),
+ resourceName: updated.label,
+ ipAddress,
+ userAgent,
+ success: true,
+ });
+
+ res.json({ provider: updated });
+ } catch (err) {
+ databaseLogger.error("Failed to update AI provider", err, {
+ operation: "ai_provider_update_failed",
+ userId,
+ });
+ res.status(500).json({ error: "Failed to update provider" });
+ }
+ },
+);
+
+/**
+ * @openapi
+ * /ai/providers/{id}:
+ * delete:
+ * summary: Delete an AI provider
+ * tags:
+ * - AI
+ * parameters:
+ * - in: path
+ * name: id
+ * required: true
+ * schema:
+ * type: integer
+ * responses:
+ * 200:
+ * description: Provider deleted.
+ * 404:
+ * description: Provider not found.
+ */
+router.delete(
+ "/providers/:id",
+ authenticateJWT,
+ requireDataAccess,
+ aiGate,
+ async (req, res) => {
+ const userId = (req as AuthenticatedRequest).userId as string;
+ const id = parseId(req.params.id);
+ if (!id) return res.status(400).json({ error: "Invalid provider id" });
+
+ try {
+ const deleted = await createCurrentAiRepository().deleteProvider(
+ id,
+ userId,
+ );
+ if (!deleted)
+ return res.status(404).json({ error: "Provider not found" });
+
+ const { ipAddress, userAgent } = getRequestMeta(req);
+ await logAudit({
+ userId,
+ username: await getAuditUsername(userId),
+ action: "delete_ai_provider",
+ resourceType: "ai_provider",
+ resourceId: String(id),
+ ipAddress,
+ userAgent,
+ success: true,
+ });
+
+ res.json({ success: true });
+ } catch (err) {
+ databaseLogger.error("Failed to delete AI provider", err, {
+ operation: "ai_provider_delete_failed",
+ userId,
+ });
+ res.status(500).json({ error: "Failed to delete provider" });
+ }
+ },
+);
+
+/**
+ * @openapi
+ * /ai/probe-models:
+ * post:
+ * summary: List models for a provider that has not been saved yet
+ * description: >
+ * Lets the add-provider form fill its model picker before the provider
+ * exists, so nobody has to go and look up model names by hand.
+ * tags:
+ * - AI
+ * requestBody:
+ * required: true
+ * content:
+ * application/json:
+ * schema:
+ * type: object
+ * properties:
+ * providerType:
+ * type: string
+ * baseUrl:
+ * type: string
+ * apiKey:
+ * type: string
+ * providerId:
+ * type: integer
+ * responses:
+ * 200:
+ * description: Model ids, possibly a curated fallback list.
+ * 400:
+ * description: Unknown provider type.
+ */
+router.post(
+ "/probe-models",
+ authenticateJWT,
+ requireDataAccess,
+ aiGate,
+ async (req, res) => {
+ const userId = (req as AuthenticatedRequest).userId as string;
+ const { providerType, baseUrl, apiKey, providerId } = req.body ?? {};
+
+ if (!isAiProviderType(providerType)) {
+ return res.status(400).json({ error: "Unknown provider type" });
+ }
+
+ try {
+ // Editing an existing provider sends no key, so fall back to the stored
+ // one rather than making the user retype it just to refresh the list.
+ let resolvedKey =
+ typeof apiKey === "string" && apiKey.trim() ? apiKey.trim() : null;
+ if (!resolvedKey && parseId(providerId)) {
+ const stored = await createCurrentAiRepository().findProviderWithSecret(
+ parseId(providerId) as number,
+ userId,
+ );
+ resolvedKey = stored?.apiKey ?? null;
+ }
+
+ const models = await getAdapter(providerType).listModels({
+ providerType,
+ baseUrl: typeof baseUrl === "string" ? baseUrl.trim() : null,
+ apiKey: resolvedKey,
+ });
+
+ res.json({ models, source: "live" });
+ } catch (err) {
+ // A provider that cannot be reached yet still gets a usable list, so the
+ // form is never a blank text box the user has to guess into.
+ const fallback = FALLBACK_MODELS[providerType as AiProviderType] ?? [];
+ res.json({
+ models: fallback,
+ source: fallback.length ? "fallback" : "none",
+ warning: err instanceof Error ? err.message : undefined,
+ });
+ }
+ },
+);
+
+/**
+ * @openapi
+ * /ai/providers/{id}/models:
+ * get:
+ * summary: List models available from a provider
+ * tags:
+ * - AI
+ * parameters:
+ * - in: path
+ * name: id
+ * required: true
+ * schema:
+ * type: integer
+ * responses:
+ * 200:
+ * description: Model ids.
+ * 502:
+ * description: The provider could not be reached.
+ */
+router.get(
+ "/providers/:id/models",
+ authenticateJWT,
+ requireDataAccess,
+ aiGate,
+ async (req, res) => {
+ const userId = (req as AuthenticatedRequest).userId as string;
+ const id = parseId(req.params.id);
+ if (!id) return res.status(400).json({ error: "Invalid provider id" });
+
+ try {
+ const provider = await createCurrentAiRepository().findProviderWithSecret(
+ id,
+ userId,
+ );
+ if (!provider)
+ return res.status(404).json({ error: "Provider not found" });
+
+ const models = await getAdapter(provider.providerType).listModels({
+ providerType: provider.providerType as ProviderConfig["providerType"],
+ baseUrl: provider.baseUrl,
+ apiKey: provider.apiKey,
+ });
+ res.json({ models });
+ } catch (err) {
+ // The message can carry the allowlist hint, which the user needs to act on.
+ const message = getErrorMessage(err, "Could not reach the provider");
+ databaseLogger.warn("Failed to list provider models", {
+ operation: "ai_provider_models_failed",
+ userId,
+ });
+ res.status(502).json({ error: message });
+ }
+ },
+);
+
+/**
+ * @openapi
+ * /ai/conversations:
+ * get:
+ * summary: List the user's AI conversations
+ * tags:
+ * - AI
+ * responses:
+ * 200:
+ * description: Conversations, newest first.
+ */
+router.get(
+ "/conversations",
+ authenticateJWT,
+ requireDataAccess,
+ aiGate,
+ async (req, res) => {
+ const userId = (req as AuthenticatedRequest).userId as string;
+ try {
+ const conversations =
+ await createCurrentAiRepository().listConversations(userId);
+ res.json({ conversations });
+ } catch (err) {
+ databaseLogger.error("Failed to list AI conversations", err, {
+ operation: "ai_conversations_list_failed",
+ userId,
+ });
+ res.status(500).json({ error: "Failed to list conversations" });
+ }
+ },
+);
+
+/**
+ * @openapi
+ * /ai/conversations/{id}:
+ * get:
+ * summary: Get one conversation with its messages and proposals
+ * tags:
+ * - AI
+ * parameters:
+ * - in: path
+ * name: id
+ * required: true
+ * schema:
+ * type: integer
+ * responses:
+ * 200:
+ * description: The conversation.
+ * 404:
+ * description: Conversation not found.
+ */
+router.get(
+ "/conversations/:id",
+ authenticateJWT,
+ requireDataAccess,
+ aiGate,
+ async (req, res) => {
+ const userId = (req as AuthenticatedRequest).userId as string;
+ const id = parseId(req.params.id);
+ if (!id) return res.status(400).json({ error: "Invalid conversation id" });
+
+ try {
+ const repository = createCurrentAiRepository();
+ const conversation = await repository.findConversation(id, userId);
+ if (!conversation) {
+ return res.status(404).json({ error: "Conversation not found" });
+ }
+
+ const [messages, proposals] = await Promise.all([
+ repository.listMessages(id),
+ repository.listProposals(userId, id),
+ ]);
+
+ res.json({ conversation, messages, proposals });
+ } catch (err) {
+ databaseLogger.error("Failed to load AI conversation", err, {
+ operation: "ai_conversation_load_failed",
+ userId,
+ });
+ res.status(500).json({ error: "Failed to load conversation" });
+ }
+ },
+);
+
+/**
+ * @openapi
+ * /ai/conversations/{id}:
+ * delete:
+ * summary: Delete a conversation
+ * tags:
+ * - AI
+ * parameters:
+ * - in: path
+ * name: id
+ * required: true
+ * schema:
+ * type: integer
+ * responses:
+ * 200:
+ * description: Conversation deleted.
+ */
+router.delete(
+ "/conversations/:id",
+ authenticateJWT,
+ requireDataAccess,
+ aiGate,
+ async (req, res) => {
+ const userId = (req as AuthenticatedRequest).userId as string;
+ const id = parseId(req.params.id);
+ if (!id) return res.status(400).json({ error: "Invalid conversation id" });
+
+ try {
+ const deleted = await createCurrentAiRepository().deleteConversation(
+ id,
+ userId,
+ );
+ if (!deleted) {
+ return res.status(404).json({ error: "Conversation not found" });
+ }
+ res.json({ success: true });
+ } catch (err) {
+ databaseLogger.error("Failed to delete AI conversation", err, {
+ operation: "ai_conversation_delete_failed",
+ userId,
+ });
+ res.status(500).json({ error: "Failed to delete conversation" });
+ }
+ },
+);
+
+/**
+ * @openapi
+ * /ai/chat/stream:
+ * post:
+ * summary: Send a message and stream the assistant's reply
+ * description: >
+ * Server-sent events. Emits token, tool_call, tool_result, proposal,
+ * done and error frames.
+ * tags:
+ * - AI
+ * requestBody:
+ * required: true
+ * content:
+ * application/json:
+ * schema:
+ * type: object
+ * properties:
+ * conversationId:
+ * type: integer
+ * providerId:
+ * type: integer
+ * model:
+ * type: string
+ * message:
+ * type: string
+ * activeTab:
+ * type: string
+ * responses:
+ * 200:
+ * description: An event stream.
+ * 400:
+ * description: Invalid request body.
+ */
+router.post(
+ "/chat/stream",
+ authenticateJWT,
+ requireDataAccess,
+ aiGate,
+ async (req, res) => {
+ const userId = (req as AuthenticatedRequest).userId as string;
+ const { conversationId, providerId, model, message, activeTab } =
+ req.body ?? {};
+
+ if (typeof message !== "string" || !message.trim()) {
+ return res.status(400).json({ error: "message is required" });
+ }
+
+ const resolvedProviderId = parseId(providerId);
+ if (!resolvedProviderId) {
+ return res.status(400).json({ error: "providerId is required" });
+ }
+
+ const repository = createCurrentAiRepository();
+
+ try {
+ const provider = await repository.findProviderWithSecret(
+ resolvedProviderId,
+ userId,
+ );
+ if (!provider) {
+ return res.status(404).json({ error: "Provider not found" });
+ }
+
+ const chosenModel =
+ (typeof model === "string" && model.trim()) ||
+ provider.defaultModel ||
+ "";
+ if (!chosenModel) {
+ return res.status(400).json({ error: "No model selected" });
+ }
+
+ // Resolve or create the conversation before the stream opens, so a
+ // failure here is still a normal JSON error the client can render.
+ let conversation = conversationId
+ ? await repository.findConversation(Number(conversationId), userId)
+ : null;
+ if (!conversation) {
+ conversation = await repository.createConversation({
+ userId,
+ title: message.trim().slice(0, 60),
+ providerId: resolvedProviderId,
+ model: chosenModel,
+ });
+ }
+
+ const history = await repository.listMessages(conversation.id);
+ await repository.appendMessage({
+ conversationId: conversation.id,
+ role: "user",
+ content: message.trim(),
+ });
+
+ const access = await resolveAiAccess(userId);
+ const hosts = await createCurrentHostRepository().listByUserId(userId);
+
+ res.writeHead(200, {
+ "Content-Type": "text/event-stream",
+ "Cache-Control": "no-store, no-transform",
+ Connection: "keep-alive",
+ "X-Accel-Buffering": "no",
+ });
+ res.flushHeaders?.();
+
+ const heartbeat = setInterval(() => {
+ try {
+ res.write(": keepalive\n\n");
+ } catch {
+ clearInterval(heartbeat);
+ }
+ }, 30000);
+
+ const abort = new AbortController();
+ req.on("close", () => {
+ clearInterval(heartbeat);
+ abort.abort();
+ });
+
+ const send = (event: unknown) => {
+ res.write(`data: ${JSON.stringify(event)}\n\n`);
+ };
+
+ send({ type: "conversation", conversationId: conversation.id });
+
+ const chatHistory: ChatMessage[] = history.map((entry) => ({
+ role: entry.role as ChatMessage["role"],
+ content: entry.content,
+ ...(entry.toolCalls ? { toolCalls: JSON.parse(entry.toolCalls) } : {}),
+ }));
+ chatHistory.push({ role: "user", content: message.trim() });
+
+ let assistantText = "";
+ let assistantToolCalls: unknown[] = [];
+
+ try {
+ for await (const event of runAgent({
+ config: {
+ providerType:
+ provider.providerType as ProviderConfig["providerType"],
+ baseUrl: provider.baseUrl,
+ apiKey: provider.apiKey,
+ },
+ model: chosenModel,
+ system: buildSystemPrompt({
+ hostCount: hosts.length,
+ activeTab: typeof activeTab === "string" ? activeTab : null,
+ allowReadOnlyCommands: access.allowReadOnlyCommands,
+ }),
+ history: chatHistory,
+ context: {
+ userId,
+ conversationId: conversation.id,
+ allowReadOnlyCommands: access.allowReadOnlyCommands,
+ },
+ signal: abort.signal,
+ })) {
+ if (event.type === "assistant_message") {
+ assistantText = event.content;
+ // Kept so the next message replays them verbatim. Gemini rejects a
+ // turn whose functionCall parts lost their thoughtSignature, so
+ // dropping these breaks the second message in every conversation.
+ assistantToolCalls = event.toolCalls;
+ continue;
+ }
+
+ if (event.type === "proposal") {
+ const stored = await repository.createProposal({
+ conversationId: conversation.id,
+ userId,
+ kind: event.draft.kind,
+ summary: event.draft.summary,
+ payload: JSON.stringify(event.draft.payload),
+ });
+
+ const { ipAddress, userAgent } = getRequestMeta(req);
+ await logAudit({
+ userId,
+ username: await getAuditUsername(userId),
+ action: "ai_proposal_created",
+ resourceType: "ai_proposal",
+ resourceId: String(stored.id),
+ resourceName: event.draft.kind,
+ ipAddress,
+ userAgent,
+ success: true,
+ });
+
+ send({ type: "proposal", proposal: stored });
+ continue;
+ }
+
+ send(event);
+ }
+ } finally {
+ clearInterval(heartbeat);
+ }
+
+ if (assistantText || assistantToolCalls.length) {
+ await repository.appendMessage({
+ conversationId: conversation.id,
+ role: "assistant",
+ content: assistantText,
+ toolCalls: assistantToolCalls.length
+ ? JSON.stringify(assistantToolCalls)
+ : null,
+ });
+ }
+ await repository.touchConversation(conversation.id);
+
+ send({ type: "done" });
+ res.end();
+ } catch (err) {
+ databaseLogger.error("AI chat stream failed", err, {
+ operation: "ai_chat_stream_failed",
+ userId,
+ });
+ if (res.headersSent) {
+ res.write(
+ `data: ${JSON.stringify({ type: "error", message: "The assistant stopped unexpectedly" })}\n\n`,
+ );
+ res.end();
+ } else {
+ res.status(500).json({ error: "Failed to start the assistant" });
+ }
+ }
+ },
+);
+
+/**
+ * @openapi
+ * /ai/proposals/{id}/apply:
+ * post:
+ * summary: Apply a pending proposal
+ * description: >
+ * Re-validates the stored payload and dispatches it through the same
+ * repository logic a manual action uses.
+ * tags:
+ * - AI
+ * parameters:
+ * - in: path
+ * name: id
+ * required: true
+ * schema:
+ * type: integer
+ * responses:
+ * 200:
+ * description: Proposal applied.
+ * 400:
+ * description: The proposal could not be applied.
+ * 404:
+ * description: Proposal not found.
+ */
+router.post(
+ "/proposals/:id/apply",
+ authenticateJWT,
+ requireDataAccess,
+ aiGate,
+ async (req, res) => {
+ const userId = (req as AuthenticatedRequest).userId as string;
+ const id = parseId(req.params.id);
+ if (!id) return res.status(400).json({ error: "Invalid proposal id" });
+
+ const repository = createCurrentAiRepository();
+
+ try {
+ const stored = await repository.findProposal(id, userId);
+ if (!stored) return res.status(404).json({ error: "Proposal not found" });
+ if (stored.status !== "pending") {
+ return res
+ .status(400)
+ .json({ error: `This proposal was already ${stored.status}` });
+ }
+
+ let payload: Record;
+ try {
+ payload = JSON.parse(stored.payload) as Record;
+ } catch {
+ return res
+ .status(400)
+ .json({ error: "The proposal payload is invalid" });
+ }
+
+ const result = await applyProposal(stored.kind, payload, userId);
+ await repository.setProposalStatus(id, userId, "applied", result.summary);
+
+ const { ipAddress, userAgent } = getRequestMeta(req);
+ await logAudit({
+ userId,
+ username: await getAuditUsername(userId),
+ action: "ai_proposal_applied",
+ resourceType: "ai_proposal",
+ resourceId: String(id),
+ resourceName: stored.kind,
+ ipAddress,
+ userAgent,
+ success: true,
+ });
+
+ res.json({ success: result.ok, summary: result.summary });
+ } catch (err) {
+ const message = getErrorMessage(err, "Failed to apply the proposal");
+ databaseLogger.error("Failed to apply AI proposal", err, {
+ operation: "ai_proposal_apply_failed",
+ userId,
+ });
+
+ const { ipAddress, userAgent } = getRequestMeta(req);
+ await logAudit({
+ userId,
+ username: await getAuditUsername(userId),
+ action: "ai_proposal_applied",
+ resourceType: "ai_proposal",
+ resourceId: String(id),
+ ipAddress,
+ userAgent,
+ success: false,
+ errorMessage: message,
+ });
+
+ res.status(400).json({ error: message });
+ }
+ },
+);
+
+/**
+ * @openapi
+ * /ai/proposals/{id}/reject:
+ * post:
+ * summary: Reject a pending proposal
+ * tags:
+ * - AI
+ * parameters:
+ * - in: path
+ * name: id
+ * required: true
+ * schema:
+ * type: integer
+ * responses:
+ * 200:
+ * description: Proposal rejected.
+ * 404:
+ * description: Proposal not found.
+ */
+router.post(
+ "/proposals/:id/reject",
+ authenticateJWT,
+ requireDataAccess,
+ aiGate,
+ async (req, res) => {
+ const userId = (req as AuthenticatedRequest).userId as string;
+ const id = parseId(req.params.id);
+ if (!id) return res.status(400).json({ error: "Invalid proposal id" });
+
+ try {
+ const updated = await createCurrentAiRepository().setProposalStatus(
+ id,
+ userId,
+ "rejected",
+ );
+ if (!updated) {
+ return res
+ .status(404)
+ .json({ error: "Proposal not found or already resolved" });
+ }
+
+ const { ipAddress, userAgent } = getRequestMeta(req);
+ await logAudit({
+ userId,
+ username: await getAuditUsername(userId),
+ action: "ai_proposal_rejected",
+ resourceType: "ai_proposal",
+ resourceId: String(id),
+ ipAddress,
+ userAgent,
+ success: true,
+ });
+
+ res.json({ success: true });
+ } catch (err) {
+ databaseLogger.error("Failed to reject AI proposal", err, {
+ operation: "ai_proposal_reject_failed",
+ userId,
+ });
+ res.status(500).json({ error: "Failed to reject the proposal" });
+ }
+ },
+);
+
+export default router;
diff --git a/src/backend/ai/providers/anthropic.ts b/src/backend/ai/providers/anthropic.ts
new file mode 100644
index 0000000..d07f2ad
--- /dev/null
+++ b/src/backend/ai/providers/anthropic.ts
@@ -0,0 +1,162 @@
+import Anthropic from "@anthropic-ai/sdk";
+import { providerFetch } from "./http.js";
+import type {
+ ChatChunk,
+ ChatRequest,
+ ProviderAdapter,
+ ProviderConfig,
+} from "./types.js";
+import { AiProviderError } from "./types.js";
+
+/**
+ * Model ids offered in the picker. Users can type any other id; this is a
+ * convenience list, not a restriction.
+ */
+export const ANTHROPIC_MODELS = [
+ "claude-opus-5",
+ "claude-sonnet-5",
+ "claude-haiku-4-5",
+];
+
+function createClient(config: ProviderConfig): Anthropic {
+ if (!config.apiKey) {
+ throw new AiProviderError("This provider needs an API key");
+ }
+ return new Anthropic({
+ apiKey: config.apiKey,
+ ...(config.baseUrl?.trim() ? { baseURL: config.baseUrl.trim() } : {}),
+ // Routes the SDK's HTTP through the shared egress guard.
+ fetch: providerFetch as unknown as typeof fetch,
+ });
+}
+
+function toAnthropicMessages(request: ChatRequest): Anthropic.MessageParam[] {
+ const messages: Anthropic.MessageParam[] = [];
+
+ for (const message of request.messages) {
+ if (message.role === "tool") {
+ messages.push({
+ role: "user",
+ content: [
+ {
+ type: "tool_result",
+ tool_use_id: message.toolCallId ?? "",
+ content: message.content,
+ },
+ ],
+ });
+ continue;
+ }
+
+ if (message.role === "assistant" && message.toolCalls?.length) {
+ const content: Anthropic.ContentBlockParam[] = [];
+ if (message.content)
+ content.push({ type: "text", text: message.content });
+ for (const call of message.toolCalls) {
+ content.push({
+ type: "tool_use",
+ id: call.id,
+ name: call.name,
+ input: call.arguments,
+ });
+ }
+ messages.push({ role: "assistant", content });
+ continue;
+ }
+
+ if (message.role === "system") continue;
+ messages.push({ role: message.role, content: message.content });
+ }
+
+ return messages;
+}
+
+/**
+ * The SDK throws its own typed errors rather than going through assertOk, so
+ * they are translated here to match what every other provider reports.
+ */
+function translateSdkError(error: unknown): never {
+ const status =
+ typeof (error as { status?: unknown })?.status === "number"
+ ? (error as { status: number }).status
+ : undefined;
+ const detail = error instanceof Error ? error.message : String(error);
+
+ if (status === 429) {
+ throw new AiProviderError(
+ `Anthropic rate limit reached. Wait a moment and try again, or check your plan's quota. (${detail})`,
+ 429,
+ );
+ }
+ if (status === 401 || status === 403) {
+ throw new AiProviderError(
+ `Anthropic rejected the API key. Check that it is correct and still active. (${detail})`,
+ status,
+ );
+ }
+ throw new AiProviderError(
+ status ? `Anthropic request failed (${status}): ${detail}` : detail,
+ status,
+ );
+}
+
+export const anthropicAdapter: ProviderAdapter = {
+ async *streamChat(
+ config: ProviderConfig,
+ request: ChatRequest,
+ ): AsyncIterable {
+ const client = createClient(config);
+
+ const stream = client.messages.stream({
+ model: request.model,
+ max_tokens: 16000,
+ system: request.system,
+ messages: toAnthropicMessages(request),
+ thinking: { type: "adaptive" },
+ ...(request.tools.length
+ ? {
+ tools: request.tools.map((tool) => ({
+ name: tool.name,
+ description: tool.description,
+ input_schema: tool.parameters as Anthropic.Tool.InputSchema,
+ })),
+ }
+ : {}),
+ ...(request.signal ? { signal: request.signal } : {}),
+ });
+
+ let final: Anthropic.Message;
+ try {
+ for await (const event of stream) {
+ if (
+ event.type === "content_block_delta" &&
+ event.delta.type === "text_delta"
+ ) {
+ yield { type: "text", text: event.delta.text };
+ }
+ }
+ final = await stream.finalMessage();
+ } catch (error) {
+ translateSdkError(error);
+ }
+
+ for (const block of final.content) {
+ if (block.type === "tool_use") {
+ yield {
+ type: "tool_call",
+ call: {
+ id: block.id,
+ name: block.name,
+ arguments: (block.input ?? {}) as Record,
+ },
+ };
+ }
+ }
+
+ yield { type: "done", stopReason: final.stop_reason ?? undefined };
+ },
+
+ async listModels(): Promise {
+ return [...ANTHROPIC_MODELS];
+ },
+};
diff --git a/src/backend/ai/providers/gemini.ts b/src/backend/ai/providers/gemini.ts
new file mode 100644
index 0000000..ff974f7
--- /dev/null
+++ b/src/backend/ai/providers/gemini.ts
@@ -0,0 +1,191 @@
+import { assertOk, providerFetch, readSseLines } from "./http.js";
+import type {
+ ChatChunk,
+ ChatRequest,
+ ProviderAdapter,
+ ProviderConfig,
+} from "./types.js";
+import { AiProviderError } from "./types.js";
+
+const GEMINI_DEFAULT_BASE = "https://generativelanguage.googleapis.com/v1beta";
+
+function baseFor(config: ProviderConfig): string {
+ return config.baseUrl?.trim() || GEMINI_DEFAULT_BASE;
+}
+
+/**
+ * Gemini has no tool role: a tool result is a user-side functionResponse part,
+ * and an assistant tool request is a model-side functionCall part.
+ */
+function toGeminiContents(request: ChatRequest): unknown[] {
+ const contents: unknown[] = [];
+
+ for (const message of request.messages) {
+ if (message.role === "tool") {
+ contents.push({
+ role: "user",
+ parts: [
+ {
+ functionResponse: {
+ name: message.toolName ?? "tool",
+ response: { result: message.content },
+ },
+ },
+ ],
+ });
+ continue;
+ }
+
+ if (message.role === "assistant" && message.toolCalls?.length) {
+ const parts: unknown[] = [];
+ if (message.content) parts.push({ text: message.content });
+ for (const call of message.toolCalls) {
+ // thoughtSignature must be returned exactly as received or Gemini
+ // 2.5+ rejects the turn with a 400.
+ parts.push({
+ functionCall: { name: call.name, args: call.arguments },
+ ...(call.providerSignature
+ ? { thoughtSignature: call.providerSignature }
+ : {}),
+ });
+ }
+ contents.push({ role: "model", parts });
+ continue;
+ }
+
+ if (message.role === "system") continue;
+
+ contents.push({
+ role: message.role === "assistant" ? "model" : "user",
+ parts: [{ text: message.content }],
+ });
+ }
+
+ return contents;
+}
+
+/**
+ * Gemini rejects the JSON Schema keywords it does not implement, so the tool
+ * schemas are trimmed to the subset it accepts.
+ */
+function toGeminiSchema(schema: unknown): unknown {
+ if (!schema || typeof schema !== "object") return schema;
+ if (Array.isArray(schema)) return schema.map(toGeminiSchema);
+
+ const source = schema as Record;
+ const output: Record = {};
+
+ for (const [key, value] of Object.entries(source)) {
+ if (key === "additionalProperties" || key === "$schema") continue;
+ if (key === "properties" && value && typeof value === "object") {
+ const properties: Record = {};
+ for (const [name, child] of Object.entries(
+ value as Record,
+ )) {
+ properties[name] = toGeminiSchema(child);
+ }
+ output[key] = properties;
+ continue;
+ }
+ output[key] = toGeminiSchema(value);
+ }
+
+ return output;
+}
+
+export const geminiAdapter: ProviderAdapter = {
+ async *streamChat(
+ config: ProviderConfig,
+ request: ChatRequest,
+ ): AsyncIterable {
+ if (!config.apiKey) {
+ throw new AiProviderError("This provider needs an API key");
+ }
+
+ const url = `${baseFor(config).replace(/\/+$/, "")}/models/${encodeURIComponent(request.model)}:streamGenerateContent?alt=sse`;
+
+ const response = await providerFetch(url, {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ "x-goog-api-key": config.apiKey,
+ },
+ signal: request.signal,
+ body: JSON.stringify({
+ systemInstruction: { parts: [{ text: request.system }] },
+ contents: toGeminiContents(request),
+ ...(request.tools.length
+ ? {
+ tools: [
+ {
+ functionDeclarations: request.tools.map((tool) => ({
+ name: tool.name,
+ description: tool.description,
+ parameters: toGeminiSchema(tool.parameters),
+ })),
+ },
+ ],
+ }
+ : {}),
+ }),
+ });
+
+ await assertOk(response, "Gemini");
+
+ let index = 0;
+ let stopReason: string | undefined;
+
+ for await (const data of readSseLines(response)) {
+ let frame: any;
+ try {
+ frame = JSON.parse(data);
+ } catch {
+ continue;
+ }
+
+ const candidate = frame.candidates?.[0];
+ if (!candidate) continue;
+ if (candidate.finishReason) stopReason = candidate.finishReason;
+
+ for (const part of candidate.content?.parts ?? []) {
+ if (typeof part.text === "string" && part.text) {
+ yield { type: "text", text: part.text };
+ }
+ if (part.functionCall?.name) {
+ yield {
+ type: "tool_call",
+ call: {
+ id: `call_${part.functionCall.name}_${index++}`,
+ name: part.functionCall.name,
+ arguments: (part.functionCall.args ?? {}) as Record<
+ string,
+ unknown
+ >,
+ // Carried so the next turn can echo it back; without it Gemini
+ // 400s as soon as a tool has been used once.
+ providerSignature: part.thoughtSignature,
+ },
+ };
+ }
+ }
+ }
+
+ yield { type: "done", stopReason };
+ },
+
+ async listModels(config: ProviderConfig): Promise {
+ if (!config.apiKey) return [];
+
+ const response = await providerFetch(
+ `${baseFor(config).replace(/\/+$/, "")}/models`,
+ { method: "GET", headers: { "x-goog-api-key": config.apiKey } },
+ );
+ await assertOk(response, "Gemini");
+
+ const body: any = await response.json();
+ return (body.models ?? [])
+ .map((entry: any) => String(entry.name ?? "").replace(/^models\//, ""))
+ .filter((name: string) => name.length > 0)
+ .sort();
+ },
+};
diff --git a/src/backend/ai/providers/http.ts b/src/backend/ai/providers/http.ts
new file mode 100644
index 0000000..6195da8
--- /dev/null
+++ b/src/backend/ai/providers/http.ts
@@ -0,0 +1,177 @@
+import { getFetchDispatcher } from "../../utils/proxy-agent.js";
+import { safeOutboundFetch } from "../../utils/safe-outbound-fetch.js";
+import { evaluateEgress, readPrivateAllowlist } from "../egress.js";
+import { AiProviderError } from "./types.js";
+
+/**
+ * Every outbound provider request goes through here so the egress rules cannot
+ * be bypassed by an adapter calling fetch directly.
+ *
+ * Public hosts use safeOutboundFetch, which re-checks the resolved address at
+ * connect time. Allowlisted private hosts cannot use it (its whole job is to
+ * refuse them), so they fall back to plain fetch with the proxy dispatcher --
+ * still respecting corporate proxy configuration.
+ */
+export async function providerFetch(
+ url: string,
+ init: RequestInit,
+): Promise {
+ const allowlist = await readPrivateAllowlist();
+ const decision = evaluateEgress(url, allowlist);
+
+ if (!decision.allowed) {
+ throw new AiProviderError(decision.reason ?? "Destination not allowed");
+ }
+
+ if (decision.isPrivate) {
+ return fetch(url, {
+ ...init,
+ dispatcher: getFetchDispatcher(url),
+ } as RequestInit);
+ }
+
+ return safeOutboundFetch(url, init) as unknown as Promise;
+}
+
+export function joinUrl(base: string, path: string): string {
+ return `${base.replace(/\/+$/, "")}/${path.replace(/^\/+/, "")}`;
+}
+
+/**
+ * Yields the data payload of each SSE frame. Providers differ in what they put
+ * inside, so parsing the JSON is left to the caller.
+ */
+export async function* readSseLines(
+ response: Response,
+): AsyncGenerator {
+ const body = response.body;
+ if (!body) return;
+
+ const reader = body.getReader();
+ const decoder = new TextDecoder();
+ let buffer = "";
+
+ try {
+ while (true) {
+ const { done, value } = await reader.read();
+ if (done) break;
+ buffer += decoder.decode(value, { stream: true });
+
+ let newlineIndex = buffer.indexOf("\n");
+ while (newlineIndex !== -1) {
+ const line = buffer.slice(0, newlineIndex).trim();
+ buffer = buffer.slice(newlineIndex + 1);
+ if (line.startsWith("data:")) {
+ yield line.slice(5).trim();
+ }
+ newlineIndex = buffer.indexOf("\n");
+ }
+ }
+ } finally {
+ reader.releaseLock();
+ }
+}
+
+/** Yields one parsed JSON object per line, for newline-delimited streams. */
+export async function* readJsonLines(
+ response: Response,
+): AsyncGenerator {
+ const body = response.body;
+ if (!body) return;
+
+ const reader = body.getReader();
+ const decoder = new TextDecoder();
+ let buffer = "";
+
+ try {
+ while (true) {
+ const { done, value } = await reader.read();
+ if (done) break;
+ buffer += decoder.decode(value, { stream: true });
+
+ let newlineIndex = buffer.indexOf("\n");
+ while (newlineIndex !== -1) {
+ const line = buffer.slice(0, newlineIndex).trim();
+ buffer = buffer.slice(newlineIndex + 1);
+ if (line) {
+ try {
+ yield JSON.parse(line);
+ } catch {
+ // A partial or malformed frame is skipped rather than failing the
+ // whole stream.
+ }
+ }
+ newlineIndex = buffer.indexOf("\n");
+ }
+ }
+ } finally {
+ reader.releaseLock();
+ }
+}
+
+/**
+ * Digs the human-readable message out of an error body.
+ *
+ * Every provider nests it differently, and dumping the raw JSON produced
+ * something that got cut off mid-sentence. Falls back to a trimmed snippet
+ * when the shape is unfamiliar.
+ */
+function extractProviderMessage(body: string): string {
+ try {
+ const parsed = JSON.parse(body);
+ const message =
+ parsed?.error?.message ??
+ parsed?.error?.["message"] ??
+ parsed?.message ??
+ (typeof parsed?.error === "string" ? parsed.error : null);
+ if (typeof message === "string" && message.trim()) {
+ return message.trim();
+ }
+ } catch {
+ // Not JSON; fall through to the snippet.
+ }
+
+ const trimmed = body.trim();
+ if (!trimmed) return "";
+ return trimmed.length > 300 ? `${trimmed.slice(0, 300)}...` : trimmed;
+}
+
+export async function assertOk(
+ response: Response,
+ provider: string,
+): Promise {
+ if (response.ok) return;
+
+ let body = "";
+ try {
+ body = await response.text();
+ } catch {
+ body = "";
+ }
+
+ const detail = extractProviderMessage(body);
+
+ // Rate limits and auth failures are the two the user can actually act on,
+ // so they say what to do instead of reading like an internal failure.
+ if (response.status === 429) {
+ throw new AiProviderError(
+ `${provider} rate limit reached. Wait a moment and try again, or check your plan's quota.${
+ detail ? ` (${detail})` : ""
+ }`,
+ 429,
+ );
+ }
+ if (response.status === 401 || response.status === 403) {
+ throw new AiProviderError(
+ `${provider} rejected the API key. Check that it is correct and still active.${
+ detail ? ` (${detail})` : ""
+ }`,
+ response.status,
+ );
+ }
+
+ throw new AiProviderError(
+ `${provider} request failed (${response.status})${detail ? `: ${detail}` : ""}`,
+ response.status,
+ );
+}
diff --git a/src/backend/ai/providers/ollama.ts b/src/backend/ai/providers/ollama.ts
new file mode 100644
index 0000000..622b69c
--- /dev/null
+++ b/src/backend/ai/providers/ollama.ts
@@ -0,0 +1,131 @@
+import { assertOk, joinUrl, providerFetch, readJsonLines } from "./http.js";
+import type {
+ ChatChunk,
+ ChatRequest,
+ ProviderAdapter,
+ ProviderConfig,
+} from "./types.js";
+
+export const OLLAMA_DEFAULT_BASE = "http://localhost:11434";
+
+function baseFor(config: ProviderConfig): string {
+ return config.baseUrl?.trim() || OLLAMA_DEFAULT_BASE;
+}
+
+function toOllamaMessages(request: ChatRequest): unknown[] {
+ const messages: unknown[] = [{ role: "system", content: request.system }];
+
+ for (const message of request.messages) {
+ if (message.role === "tool") {
+ messages.push({
+ role: "tool",
+ content: message.content,
+ ...(message.toolName ? { tool_name: message.toolName } : {}),
+ });
+ continue;
+ }
+
+ if (message.role === "assistant" && message.toolCalls?.length) {
+ messages.push({
+ role: "assistant",
+ content: message.content,
+ tool_calls: message.toolCalls.map((call) => ({
+ function: { name: call.name, arguments: call.arguments },
+ })),
+ });
+ continue;
+ }
+
+ messages.push({ role: message.role, content: message.content });
+ }
+
+ return messages;
+}
+
+export const ollamaAdapter: ProviderAdapter = {
+ async *streamChat(
+ config: ProviderConfig,
+ request: ChatRequest,
+ ): AsyncIterable {
+ const response = await providerFetch(joinUrl(baseFor(config), "api/chat"), {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ signal: request.signal,
+ body: JSON.stringify({
+ model: request.model,
+ messages: toOllamaMessages(request),
+ stream: true,
+ ...(request.tools.length
+ ? {
+ tools: request.tools.map((tool) => ({
+ type: "function",
+ function: {
+ name: tool.name,
+ description: tool.description,
+ parameters: tool.parameters,
+ },
+ })),
+ }
+ : {}),
+ }),
+ });
+
+ await assertOk(response, "Ollama");
+
+ let index = 0;
+ let stopReason: string | undefined;
+
+ // Ollama streams newline-delimited JSON rather than SSE.
+ for await (const frame of readJsonLines(response)) {
+ const payload = frame as any;
+
+ if (
+ typeof payload.message?.content === "string" &&
+ payload.message.content
+ ) {
+ yield { type: "text", text: payload.message.content };
+ }
+
+ for (const call of payload.message?.tool_calls ?? []) {
+ const name = call.function?.name;
+ if (!name) continue;
+ const rawArgs = call.function?.arguments;
+ // Ollama sends an object, but some builds send a JSON string.
+ let args: Record = {};
+ if (rawArgs && typeof rawArgs === "object") {
+ args = rawArgs as Record;
+ } else if (typeof rawArgs === "string" && rawArgs.trim()) {
+ try {
+ args = JSON.parse(rawArgs);
+ } catch {
+ args = {};
+ }
+ }
+ yield {
+ type: "tool_call",
+ call: { id: `call_${name}_${index++}`, name, arguments: args },
+ };
+ }
+
+ if (payload.done) {
+ stopReason = payload.done_reason ?? "stop";
+ break;
+ }
+ }
+
+ yield { type: "done", stopReason };
+ },
+
+ async listModels(config: ProviderConfig): Promise {
+ const response = await providerFetch(joinUrl(baseFor(config), "api/tags"), {
+ method: "GET",
+ });
+ await assertOk(response, "Ollama");
+
+ const body: any = await response.json();
+ return (body.models ?? [])
+ .map((entry: any) => entry.name)
+ .filter((name: unknown): name is string => typeof name === "string")
+ .sort();
+ },
+};
diff --git a/src/backend/ai/providers/openai.ts b/src/backend/ai/providers/openai.ts
new file mode 100644
index 0000000..8ba3e53
--- /dev/null
+++ b/src/backend/ai/providers/openai.ts
@@ -0,0 +1,182 @@
+import { assertOk, joinUrl, providerFetch, readSseLines } from "./http.js";
+import type {
+ ChatChunk,
+ ChatRequest,
+ ProviderAdapter,
+ ProviderConfig,
+ ToolCall,
+} from "./types.js";
+import { AiProviderError } from "./types.js";
+
+const OPENAI_DEFAULT_BASE = "https://api.openai.com/v1";
+
+function baseFor(config: ProviderConfig): string {
+ if (config.baseUrl?.trim()) return config.baseUrl.trim();
+ if (config.providerType === "openai") return OPENAI_DEFAULT_BASE;
+ throw new AiProviderError("This provider needs a base URL");
+}
+
+function toOpenAiMessages(request: ChatRequest): unknown[] {
+ const messages: unknown[] = [{ role: "system", content: request.system }];
+
+ for (const message of request.messages) {
+ if (message.role === "tool") {
+ messages.push({
+ role: "tool",
+ tool_call_id: message.toolCallId,
+ content: message.content,
+ });
+ continue;
+ }
+
+ if (message.role === "assistant" && message.toolCalls?.length) {
+ messages.push({
+ role: "assistant",
+ content: message.content || null,
+ tool_calls: message.toolCalls.map((call) => ({
+ id: call.id,
+ type: "function",
+ function: {
+ name: call.name,
+ arguments: JSON.stringify(call.arguments),
+ },
+ })),
+ });
+ continue;
+ }
+
+ messages.push({ role: message.role, content: message.content });
+ }
+
+ return messages;
+}
+
+/**
+ * Tool call arguments arrive as JSON fragments spread across many deltas, so
+ * they are accumulated per index and only parsed once the stream ends.
+ */
+interface PartialCall {
+ id: string;
+ name: string;
+ args: string;
+}
+
+export const openAiAdapter: ProviderAdapter = {
+ async *streamChat(
+ config: ProviderConfig,
+ request: ChatRequest,
+ ): AsyncIterable {
+ const url = joinUrl(baseFor(config), "chat/completions");
+
+ const headers: Record = {
+ "Content-Type": "application/json",
+ };
+ if (config.apiKey) headers.Authorization = `Bearer ${config.apiKey}`;
+
+ const response = await providerFetch(url, {
+ method: "POST",
+ headers,
+ signal: request.signal,
+ body: JSON.stringify({
+ model: request.model,
+ messages: toOpenAiMessages(request),
+ stream: true,
+ ...(request.tools.length
+ ? {
+ tools: request.tools.map((tool) => ({
+ type: "function",
+ function: {
+ name: tool.name,
+ description: tool.description,
+ parameters: tool.parameters,
+ },
+ })),
+ }
+ : {}),
+ }),
+ });
+
+ await assertOk(response, "OpenAI");
+
+ const partial = new Map();
+ let stopReason: string | undefined;
+
+ for await (const data of readSseLines(response)) {
+ if (data === "[DONE]") break;
+
+ let frame: any;
+ try {
+ frame = JSON.parse(data);
+ } catch {
+ continue;
+ }
+
+ const choice = frame.choices?.[0];
+ if (!choice) continue;
+
+ if (choice.finish_reason) stopReason = choice.finish_reason;
+
+ const delta = choice.delta;
+ if (!delta) continue;
+
+ if (typeof delta.content === "string" && delta.content) {
+ yield { type: "text", text: delta.content };
+ }
+
+ for (const call of delta.tool_calls ?? []) {
+ const index = call.index ?? 0;
+ const existing = partial.get(index) ?? { id: "", name: "", args: "" };
+ if (call.id) existing.id = call.id;
+ if (call.function?.name) existing.name = call.function.name;
+ if (call.function?.arguments) existing.args += call.function.arguments;
+ partial.set(index, existing);
+ }
+ }
+
+ for (const call of partial.values()) {
+ if (!call.name) continue;
+ yield { type: "tool_call", call: finalizeCall(call) };
+ }
+
+ yield { type: "done", stopReason };
+ },
+
+ async listModels(config: ProviderConfig): Promise {
+ const headers: Record = {};
+ if (config.apiKey) headers.Authorization = `Bearer ${config.apiKey}`;
+
+ const response = await providerFetch(joinUrl(baseFor(config), "models"), {
+ method: "GET",
+ headers,
+ });
+ await assertOk(response, "OpenAI");
+
+ const body: any = await response.json();
+ return (body.data ?? [])
+ .map((entry: any) => entry.id)
+ .filter((id: unknown): id is string => typeof id === "string")
+ .sort();
+ },
+};
+
+export function finalizeCall(call: PartialCall): ToolCall {
+ let args: Record = {};
+ if (call.args.trim()) {
+ try {
+ const parsed = JSON.parse(call.args);
+ if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
+ args = parsed as Record;
+ }
+ } catch {
+ // A model that emitted malformed arguments gets an empty object; the
+ // tool's own schema validation reports the problem back to it.
+ args = {};
+ }
+ }
+ return {
+ id:
+ call.id || `call_${call.name}_${Math.random().toString(36).slice(2, 10)}`,
+ name: call.name,
+ arguments: args,
+ };
+}
diff --git a/src/backend/ai/providers/registry.ts b/src/backend/ai/providers/registry.ts
new file mode 100644
index 0000000..0bbc987
--- /dev/null
+++ b/src/backend/ai/providers/registry.ts
@@ -0,0 +1,64 @@
+import { anthropicAdapter } from "./anthropic.js";
+import { geminiAdapter } from "./gemini.js";
+import { ollamaAdapter } from "./ollama.js";
+import { openAiAdapter } from "./openai.js";
+import {
+ AiProviderError,
+ type AiProviderType,
+ type ProviderAdapter,
+} from "./types.js";
+
+/**
+ * openai_compatible reuses the OpenAI adapter: OpenRouter, Groq, Mistral,
+ * DeepSeek, together.ai, LM Studio and vLLM all speak the same wire format,
+ * they differ only in base URL.
+ */
+const ADAPTERS: Record = {
+ ollama: ollamaAdapter,
+ anthropic: anthropicAdapter,
+ openai: openAiAdapter,
+ gemini: geminiAdapter,
+ openai_compatible: openAiAdapter,
+};
+
+export function getAdapter(providerType: string): ProviderAdapter {
+ const adapter = ADAPTERS[providerType as AiProviderType];
+ if (!adapter) {
+ throw new AiProviderError(`Unknown provider type: ${providerType}`);
+ }
+ return adapter;
+}
+
+/** Provider types that cannot work without a base URL. */
+export const REQUIRES_BASE_URL: AiProviderType[] = [
+ "ollama",
+ "openai_compatible",
+];
+
+/** Provider types that cannot work without an API key. */
+export const REQUIRES_API_KEY: AiProviderType[] = [
+ "anthropic",
+ "openai",
+ "gemini",
+];
+
+/**
+ * Shown when a provider's model list cannot be fetched: no key entered yet,
+ * the endpoint is unreachable, or the vendor has no list endpoint. Users can
+ * always type a model id the list does not contain, so this is a starting
+ * point rather than a restriction.
+ */
+export const FALLBACK_MODELS: Record = {
+ ollama: [
+ "llama3.2",
+ "llama3.1",
+ "qwen2.5-coder",
+ "mistral",
+ "phi4",
+ "gemma2",
+ ],
+ anthropic: ["claude-opus-5", "claude-sonnet-5", "claude-haiku-4-5"],
+ openai: ["gpt-5", "gpt-5-mini", "o4-mini", "gpt-4.1"],
+ gemini: ["gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.0-flash"],
+ openai_compatible: [],
+};
diff --git a/src/backend/ai/providers/types.ts b/src/backend/ai/providers/types.ts
new file mode 100644
index 0000000..e170dfb
--- /dev/null
+++ b/src/backend/ai/providers/types.ts
@@ -0,0 +1,90 @@
+/**
+ * The shape every provider adapter normalizes to. Adding a provider means
+ * translating its wire format into these events; nothing downstream (the
+ * engine, the tool dispatcher, the SSE route) knows which vendor is in use.
+ */
+
+export type AiProviderType =
+ "ollama" | "anthropic" | "openai" | "gemini" | "openai_compatible";
+
+export const AI_PROVIDER_TYPES: AiProviderType[] = [
+ "ollama",
+ "anthropic",
+ "openai",
+ "gemini",
+ "openai_compatible",
+];
+
+export function isAiProviderType(value: unknown): value is AiProviderType {
+ return (
+ typeof value === "string" && (AI_PROVIDER_TYPES as string[]).includes(value)
+ );
+}
+
+export interface ChatMessage {
+ role: "system" | "user" | "assistant" | "tool";
+ content: string;
+ /** Set on assistant turns that requested tools. */
+ toolCalls?: ToolCall[];
+ /** Set on tool turns, matching the id of the call being answered. */
+ toolCallId?: string;
+ toolName?: string;
+}
+
+export interface ToolCall {
+ id: string;
+ name: string;
+ arguments: Record;
+ /**
+ * Opaque provider state that has to be echoed back verbatim on the next
+ * turn. Gemini 2.5+ rejects a follow-up whose functionCall parts have lost
+ * their thoughtSignature, so this rides along rather than being dropped.
+ */
+ providerSignature?: string;
+}
+
+export interface ToolDefinition {
+ name: string;
+ description: string;
+ parameters: Record;
+}
+
+export interface ChatRequest {
+ model: string;
+ system: string;
+ messages: ChatMessage[];
+ tools: ToolDefinition[];
+ signal?: AbortSignal;
+}
+
+export type ChatChunk =
+ | { type: "text"; text: string }
+ | { type: "tool_call"; call: ToolCall }
+ | { type: "done"; stopReason?: string }
+ | { type: "error"; message: string };
+
+export interface ProviderConfig {
+ providerType: AiProviderType;
+ baseUrl?: string | null;
+ apiKey?: string | null;
+}
+
+export interface ProviderAdapter {
+ /** Streams a single assistant turn. Tool execution happens in the engine. */
+ streamChat(
+ config: ProviderConfig,
+ request: ChatRequest,
+ ): AsyncIterable;
+ /** Model ids to offer in the picker, best effort. */
+ listModels(config: ProviderConfig): Promise;
+}
+
+export class AiProviderError extends Error {
+ constructor(
+ message: string,
+ readonly status?: number,
+ ) {
+ super(message);
+ this.name = "AiProviderError";
+ }
+}
diff --git a/src/backend/ai/redaction.ts b/src/backend/ai/redaction.ts
new file mode 100644
index 0000000..4876182
--- /dev/null
+++ b/src/backend/ai/redaction.ts
@@ -0,0 +1,90 @@
+/**
+ * Defense in depth for anything about to leave the server.
+ *
+ * Read tools already select explicit field allowlists rather than spreading
+ * rows, so nothing secret should reach here. This exists because "should" is
+ * not a guarantee: a future tool that forgets to project its fields would
+ * otherwise ship credentials to a third-party model provider.
+ */
+
+const SECRET_KEY_PATTERN =
+ /^(password|passwd|pass|secret|token|api_?key|apikey|private_?key|privatekey|key_?password|keypassword|passphrase|client_?secret|authorization|auth_?token|access_?token|refresh_?token|totp_?secret|backup_?codes|session_?token|cookie|credential|ssh_?cert|data_?key|dek)$/i;
+
+/** Substring markers for keys that are not exact matches but still sensitive. */
+const SECRET_KEY_SUBSTRINGS = [
+ "password",
+ "secret",
+ "privatekey",
+ "private_key",
+ "apikey",
+ "api_key",
+ "passphrase",
+];
+
+const VALUE_PATTERNS: Array<{ pattern: RegExp; label: string }> = [
+ {
+ pattern:
+ /-----BEGIN[^-]*PRIVATE KEY-----[\s\S]*?-----END[^-]*PRIVATE KEY-----/g,
+ label: "[redacted private key]",
+ },
+ { pattern: /\bsk-[A-Za-z0-9_-]{16,}\b/g, label: "[redacted api key]" },
+ { pattern: /\bsk-ant-[A-Za-z0-9_-]{16,}\b/g, label: "[redacted api key]" },
+ { pattern: /\bghp_[A-Za-z0-9]{20,}\b/g, label: "[redacted token]" },
+ { pattern: /\btmx_[A-Za-z0-9_-]{16,}\b/g, label: "[redacted token]" },
+ {
+ pattern: /\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]+\b/g,
+ label: "[redacted token]",
+ },
+ {
+ pattern: /\bBearer\s+[A-Za-z0-9._-]{16,}/gi,
+ label: "Bearer [redacted]",
+ },
+];
+
+export const REDACTED = "[redacted]";
+
+function isSecretKey(key: string): boolean {
+ if (SECRET_KEY_PATTERN.test(key)) return true;
+ const lower = key.toLowerCase();
+ return SECRET_KEY_SUBSTRINGS.some((marker) => lower.includes(marker));
+}
+
+export function redactString(value: string): string {
+ let output = value;
+ for (const { pattern, label } of VALUE_PATTERNS) {
+ output = output.replace(pattern, label);
+ }
+ return output;
+}
+
+/**
+ * Recursively drops secret-named fields and masks secret-shaped values.
+ * Depth is bounded so a cyclic or pathological structure cannot hang the loop.
+ */
+export function redact(value: unknown, depth = 0): unknown {
+ if (depth > 12) return REDACTED;
+
+ if (typeof value === "string") return redactString(value);
+ if (value === null || typeof value !== "object") return value;
+
+ if (Array.isArray(value)) {
+ return value.map((entry) => redact(entry, depth + 1));
+ }
+
+ const output: Record = {};
+ for (const [key, entry] of Object.entries(value as Record)) {
+ if (isSecretKey(key)) {
+ // Preserve the shape so the model can still reason about presence,
+ // without ever seeing the value.
+ output[key] = entry === null || entry === undefined ? null : REDACTED;
+ continue;
+ }
+ output[key] = redact(entry, depth + 1);
+ }
+ return output;
+}
+
+/** Convenience wrapper for serializing a tool result. */
+export function redactToJson(value: unknown): string {
+ return JSON.stringify(redact(value));
+}
diff --git a/src/backend/ai/tools/catalog.ts b/src/backend/ai/tools/catalog.ts
new file mode 100644
index 0000000..2edbf55
--- /dev/null
+++ b/src/backend/ai/tools/catalog.ts
@@ -0,0 +1,68 @@
+import { proposeTools } from "./propose-tools.js";
+import { readTools } from "./read-tools.js";
+import type { AiTool, ToolDefinitionShape } from "./types.js";
+
+/**
+ * The allowlist, and the security boundary for the whole feature.
+ *
+ * A model can only ever invoke what appears here. This matters more than usual
+ * in this codebase: PermissionManager.requirePermission exists but is currently
+ * mounted on zero routes, so RBAC strings are a vocabulary for the admin role
+ * editor rather than route enforcement. "The assistant cannot reach credentials
+ * or user administration" is therefore a property of this list, not of the
+ * permission system.
+ *
+ * Anything touching credentials, vaults, RBAC, users, identity, certificates,
+ * SSO or instance settings is deliberately absent and must stay absent.
+ */
+export const AI_TOOLS: AiTool[] = [...readTools, ...proposeTools];
+
+const BY_NAME = new Map(AI_TOOLS.map((tool) => [tool.name, tool]));
+
+export function getTool(name: string): AiTool | undefined {
+ return BY_NAME.get(name);
+}
+
+export function listToolNames(): string[] {
+ return AI_TOOLS.map((tool) => tool.name);
+}
+
+/**
+ * Domains the assistant must never be able to reach, in any tool, ever.
+ * The catalog test asserts no tool name references these.
+ */
+export const FORBIDDEN_DOMAINS = [
+ "credential",
+ "vault",
+ "rbac",
+ "role",
+ "permission",
+ "user_admin",
+ "password",
+ "totp",
+ "webauthn",
+ "passkey",
+ "api_key",
+ "session",
+ "oidc",
+ "sso",
+ "ldap",
+ "termix_id",
+ "identity",
+ "certificate",
+ "opkssh",
+ "acme",
+ "ssl",
+ "audit",
+ "sync",
+ "settings",
+];
+
+/** Tool definitions in the shape the provider adapters expect. */
+export function toolDefinitions(): ToolDefinitionShape[] {
+ return AI_TOOLS.map((tool) => ({
+ name: tool.name,
+ description: tool.description,
+ parameters: tool.parameters,
+ }));
+}
diff --git a/src/backend/ai/tools/command-allowlist.ts b/src/backend/ai/tools/command-allowlist.ts
new file mode 100644
index 0000000..16b15c6
--- /dev/null
+++ b/src/backend/ai/tools/command-allowlist.ts
@@ -0,0 +1,136 @@
+/**
+ * Which commands the assistant may run without a per-command approval click,
+ * for users who opted into read-only execution.
+ *
+ * The check parses the command into arguments and matches the resolved binary
+ * against the allowlist. Substring matching would be trivially defeated
+ * ("df; rm -rf /" contains "df"), so any shell metacharacter that could chain,
+ * redirect or substitute a second command rejects the whole string outright.
+ */
+
+export const READ_ONLY_COMMANDS = new Set([
+ "df",
+ "du",
+ "free",
+ "uptime",
+ "uname",
+ "whoami",
+ "hostname",
+ "id",
+ "ps",
+ "top",
+ "systemctl",
+ "journalctl",
+ "docker",
+ "ip",
+ "ss",
+ "netstat",
+ "lsblk",
+ "cat",
+ "ls",
+ "stat",
+ "which",
+ "date",
+ "lscpu",
+ "vmstat",
+ "iostat",
+]);
+
+/** Characters that let one command become several. */
+const SHELL_METACHARACTERS = /[;&|`$><\n\r\\]/;
+
+/** Subcommands that are safe for otherwise-powerful binaries. */
+const SUBCOMMAND_ALLOWLIST: Record> = {
+ systemctl: new Set([
+ "status",
+ "list-units",
+ "list-unit-files",
+ "is-active",
+ "is-enabled",
+ "show",
+ ]),
+ docker: new Set([
+ "ps",
+ "stats",
+ "images",
+ "logs",
+ "inspect",
+ "version",
+ "info",
+ ]),
+ ip: new Set(["a", "addr", "link", "route", "neigh"]),
+};
+
+/** Paths `cat` may read. Anything else could disclose credentials. */
+const CAT_ALLOWED_PREFIXES = ["/proc/", "/sys/", "/etc/os-release"];
+
+export interface CommandCheck {
+ allowed: boolean;
+ reason?: string;
+}
+
+export function isReadOnlyCommand(raw: string): CommandCheck {
+ const command = raw.trim();
+ if (!command) return { allowed: false, reason: "Empty command" };
+
+ if (SHELL_METACHARACTERS.test(command)) {
+ return {
+ allowed: false,
+ reason: "Command chaining, redirection and substitution are not allowed",
+ };
+ }
+
+ const parts = command.split(/\s+/).filter(Boolean);
+ if (!parts.length) return { allowed: false, reason: "Empty command" };
+
+ // Reject env-prefixed and privilege-escalating forms outright.
+ const head = parts[0];
+ if (head === "sudo" || head === "su" || head === "doas" || head === "env") {
+ return { allowed: false, reason: `${head} is not allowed` };
+ }
+
+ // A path like /usr/bin/df resolves to its basename.
+ const binary = head.includes("/")
+ ? head.slice(head.lastIndexOf("/") + 1)
+ : head;
+
+ if (!READ_ONLY_COMMANDS.has(binary)) {
+ return {
+ allowed: false,
+ reason: `${binary} is not on the read-only allowlist`,
+ };
+ }
+
+ const allowedSubcommands = SUBCOMMAND_ALLOWLIST[binary];
+ if (allowedSubcommands) {
+ const subcommand = parts.slice(1).find((part) => !part.startsWith("-"));
+ if (!subcommand || !allowedSubcommands.has(subcommand)) {
+ return {
+ allowed: false,
+ reason:
+ `${binary} ${subcommand ?? ""}`.trim() +
+ " is not on the read-only allowlist",
+ };
+ }
+ }
+
+ if (binary === "cat") {
+ const targets = parts.slice(1).filter((part) => !part.startsWith("-"));
+ if (!targets.length) {
+ return { allowed: false, reason: "cat needs a file path" };
+ }
+ for (const target of targets) {
+ const permitted = CAT_ALLOWED_PREFIXES.some((prefix) =>
+ prefix.endsWith("/") ? target.startsWith(prefix) : target === prefix,
+ );
+ if (!permitted) {
+ return {
+ allowed: false,
+ reason: `cat is limited to ${CAT_ALLOWED_PREFIXES.join(", ")}`,
+ };
+ }
+ }
+ }
+
+ return { allowed: true };
+}
diff --git a/src/backend/ai/tools/executor.ts b/src/backend/ai/tools/executor.ts
new file mode 100644
index 0000000..1459e0e
--- /dev/null
+++ b/src/backend/ai/tools/executor.ts
@@ -0,0 +1,332 @@
+import {
+ createCurrentAlertRepository,
+ createCurrentAutomationRepository,
+ createCurrentFleetRepository,
+ createCurrentHostRepository,
+ createCurrentSnippetRepository,
+} from "../../database/repositories/factory.js";
+import { validateDefinition } from "../../database/routes/automations.js";
+import { resolveHostById } from "../../hosts/host-resolver.js";
+import { execCommand } from "../../hosts/metrics/widgets/common-utils.js";
+import {
+ createFleetSshFactory,
+ getFleetPoolKey,
+} from "../../hosts/ssh-client-factory.js";
+import { withConnection } from "../../hosts/ssh-connection-pool.js";
+import { getTool } from "./catalog.js";
+
+/** Approved commands get a bounded window rather than hanging the request. */
+const COMMAND_TIMEOUT_MS = 60_000;
+
+/**
+ * Applies an approved proposal.
+ *
+ * The stored payload is treated as untrusted input even though the server wrote
+ * it: the proposal could have sat in the table across a release, and defending
+ * the apply path rather than the create path means one place to get right.
+ * Everything goes through the same repositories a human action uses, scoped to
+ * the approving user.
+ */
+
+export interface ApplyResult {
+ ok: boolean;
+ summary: string;
+}
+
+function requireNumber(value: unknown, field: string): number {
+ const parsed = Number(value);
+ if (!Number.isInteger(parsed) || parsed <= 0) {
+ throw new Error(`${field} must be a positive integer`);
+ }
+ return parsed;
+}
+
+function requireString(value: unknown, field: string): string {
+ if (typeof value !== "string" || !value.trim()) {
+ throw new Error(`${field} is required`);
+ }
+ return value.trim();
+}
+
+function optionalString(value: unknown): string | null {
+ if (typeof value !== "string") return null;
+ const trimmed = value.trim();
+ return trimmed ? trimmed : null;
+}
+
+export async function applyProposal(
+ kind: string,
+ payload: Record,
+ userId: string,
+): Promise {
+ // A payload whose tool no longer exists is refused rather than guessed at.
+ if (!getTool(kind)) {
+ throw new Error(`Unknown proposal kind: ${kind}`);
+ }
+
+ switch (kind) {
+ case "propose_create_host": {
+ const created = await createCurrentHostRepository().create({
+ userId,
+ name: requireString(payload.name, "name"),
+ ip: requireString(payload.ip, "ip"),
+ port: Number(payload.port) || 22,
+ username: optionalString(payload.username) ?? "",
+ folder: optionalString(payload.folder) ?? "",
+ tags: JSON.stringify(Array.isArray(payload.tags) ? payload.tags : []),
+ } as any);
+ return {
+ ok: true,
+ summary: `Created host ${(created as any).name ?? ""}`.trim(),
+ };
+ }
+
+ case "propose_update_host": {
+ const hostId = requireNumber(payload.hostId, "hostId");
+ const changes = (payload.changes ?? {}) as Record;
+
+ const existing = await createCurrentHostRepository().findByIdForUser(
+ userId,
+ hostId,
+ );
+ if (!existing) throw new Error("Host not found");
+
+ const updates: Record = {};
+ if (changes.name !== undefined)
+ updates.name = requireString(changes.name, "name");
+ if (changes.ip !== undefined)
+ updates.ip = requireString(changes.ip, "ip");
+ if (changes.port !== undefined) updates.port = Number(changes.port);
+ if (changes.username !== undefined)
+ updates.username = optionalString(changes.username) ?? "";
+ if (changes.folder !== undefined)
+ updates.folder = optionalString(changes.folder) ?? "";
+ if (changes.tags !== undefined) {
+ updates.tags = JSON.stringify(
+ Array.isArray(changes.tags) ? changes.tags : [],
+ );
+ }
+
+ if (!Object.keys(updates).length) {
+ return { ok: false, summary: "Nothing to change" };
+ }
+
+ await createCurrentHostRepository().updateForUser(
+ userId,
+ hostId,
+ updates as any,
+ );
+ return { ok: true, summary: `Updated host ${hostId}` };
+ }
+
+ case "propose_delete_host": {
+ const hostId = requireNumber(payload.hostId, "hostId");
+ const deleted = await createCurrentHostRepository().deleteForUser(
+ userId,
+ hostId,
+ );
+ if (!deleted) throw new Error("Host not found");
+ return { ok: true, summary: `Deleted host ${hostId}` };
+ }
+
+ case "propose_create_snippet": {
+ const created = await createCurrentSnippetRepository().createSnippet(
+ userId,
+ {
+ name: requireString(payload.name, "name"),
+ content: requireString(payload.content, "content"),
+ description: optionalString(payload.description),
+ folder: optionalString(payload.folder),
+ } as any,
+ );
+ return {
+ ok: true,
+ summary: `Created snippet ${(created as any)?.name ?? ""}`.trim(),
+ };
+ }
+
+ case "propose_update_snippet": {
+ const snippetId = requireNumber(payload.snippetId, "snippetId");
+ const changes = (payload.changes ?? {}) as Record;
+
+ const existing = await createCurrentSnippetRepository().findOwnedById(
+ userId,
+ snippetId,
+ );
+ if (!existing) throw new Error("Snippet not found");
+
+ const updates: Record = {};
+ if (changes.name !== undefined)
+ updates.name = requireString(changes.name, "name");
+ if (changes.content !== undefined)
+ updates.content = requireString(changes.content, "content");
+ if (changes.description !== undefined)
+ updates.description = optionalString(changes.description);
+ if (changes.folder !== undefined)
+ updates.folder = optionalString(changes.folder);
+
+ if (!Object.keys(updates).length) {
+ return { ok: false, summary: "Nothing to change" };
+ }
+
+ await createCurrentSnippetRepository().updateSnippet(
+ userId,
+ snippetId,
+ updates as any,
+ );
+ return { ok: true, summary: `Updated snippet ${snippetId}` };
+ }
+
+ case "propose_delete_snippet": {
+ const snippetId = requireNumber(payload.snippetId, "snippetId");
+ const deleted = await createCurrentSnippetRepository().deleteSnippet(
+ userId,
+ snippetId,
+ );
+ if (!deleted) throw new Error("Snippet not found");
+ return { ok: true, summary: `Deleted snippet ${snippetId}` };
+ }
+
+ case "propose_create_fleet": {
+ const fleet = await createCurrentFleetRepository().create(userId, {
+ name: requireString(payload.name, "name"),
+ description: optionalString(payload.description),
+ } as any);
+
+ const hostIds = Array.isArray(payload.hostIds) ? payload.hostIds : [];
+ let added = 0;
+ for (const raw of hostIds) {
+ const hostId = Number(raw);
+ if (!Number.isInteger(hostId) || hostId <= 0) continue;
+ // Only hosts the approving user owns can join their fleet.
+ const host = await createCurrentHostRepository().findByIdForUser(
+ userId,
+ hostId,
+ );
+ if (!host) continue;
+ await createCurrentFleetRepository().addMember(
+ (fleet as any).id,
+ hostId,
+ );
+ added += 1;
+ }
+
+ return {
+ ok: true,
+ summary: `Created fleet ${(fleet as any).name} with ${added} host${added === 1 ? "" : "s"}`,
+ };
+ }
+
+ case "propose_create_alert_rule": {
+ const created = await createCurrentAlertRepository().createAlertRule({
+ userId,
+ name: requireString(payload.name, "name"),
+ hostId:
+ payload.hostId === null || payload.hostId === undefined
+ ? null
+ : requireNumber(payload.hostId, "hostId"),
+ enabled: true,
+ triggerType: requireString(payload.triggerType, "triggerType"),
+ thresholdValue:
+ payload.thresholdValue === null ||
+ payload.thresholdValue === undefined
+ ? null
+ : Number(payload.thresholdValue),
+ thresholdDurationSeconds:
+ payload.thresholdDurationSeconds === null ||
+ payload.thresholdDurationSeconds === undefined
+ ? null
+ : Number(payload.thresholdDurationSeconds),
+ cooldownMinutes: Number(payload.cooldownMinutes) || 15,
+ channelIds: [],
+ } as any);
+ return {
+ ok: true,
+ summary: `Created alert rule ${(created as any)?.name ?? ""}`.trim(),
+ };
+ }
+
+ case "propose_create_automation": {
+ // Reuses the same validator the automations route runs, so an
+ // LLM-authored definition is held to exactly the human standard.
+ const validation = validateDefinition(payload.definition);
+ if (!validation.ok || !validation.definition) {
+ throw new Error(
+ validation.error ?? "The automation definition is invalid",
+ );
+ }
+
+ const created = await createCurrentAutomationRepository().create({
+ userId,
+ name: requireString(payload.name, "name"),
+ description: optionalString(payload.description),
+ definition: JSON.stringify(validation.definition),
+ // Starts disabled: an automation the user has not watched run once
+ // should not begin firing against their servers on approval.
+ enabled: false,
+ });
+
+ return {
+ ok: true,
+ summary: `Created automation ${(created as any).name} (disabled until you enable it)`,
+ };
+ }
+
+ case "propose_run_command": {
+ const hostId = requireNumber(payload.hostId, "hostId");
+ const command = requireString(payload.command, "command");
+
+ // resolveHostById, not the raw repository row: it runs the connect-level
+ // permission check, decrypts auth under the owner's key, and resolves the
+ // jump host chain. A plain row has none of that, so the SSH factory saw
+ // an unresolved jumpHosts field and failed the connection.
+ const host = await resolveHostById(hostId, userId);
+ if (!host) throw new Error("Host not found");
+
+ const result = await runCommandOnHost(host, command);
+ if (result.error) {
+ throw new Error(result.error);
+ }
+ return {
+ ok: true,
+ summary: result.output?.slice(0, 2000) ?? "(no output)",
+ };
+ }
+
+ default:
+ throw new Error(`Proposal kind ${kind} cannot be applied automatically`);
+ }
+}
+
+/**
+ * Runs one approved command over the shared SSH pool, mirroring how an
+ * automation run_command step executes.
+ */
+async function runCommandOnHost(
+ host: Record,
+ command: string,
+): Promise<{ output?: string; error?: string }> {
+ try {
+ const result = await withConnection(
+ getFleetPoolKey(host as any),
+ createFleetSshFactory(host as any),
+ async (client) => execCommand(client, command, COMMAND_TIMEOUT_MS),
+ );
+
+ const output = [result.stdout, result.stderr].filter(Boolean).join("\n");
+ if (result.code === 0 || result.code === null) {
+ return { output: output || "(no output)" };
+ }
+ return { error: `Exited with code ${result.code}: ${output}`.trim() };
+ } catch (error) {
+ return {
+ error: error instanceof Error ? error.message : String(error),
+ };
+ }
+}
+
+/**
+ * Kinds the route handles itself rather than through applyProposal.
+ * Empty: everything the assistant can propose can now be applied.
+ */
+export const ROUTE_APPLIED_KINDS = new Set();
diff --git a/src/backend/ai/tools/propose-tools.ts b/src/backend/ai/tools/propose-tools.ts
new file mode 100644
index 0000000..107d2aa
--- /dev/null
+++ b/src/backend/ai/tools/propose-tools.ts
@@ -0,0 +1,279 @@
+import { num, objectSchema, proposal, str, type AiTool } from "./types.js";
+
+/**
+ * Propose tools never mutate anything. They return a draft that is stored as a
+ * pending proposal and rendered as a card; the change happens only when the
+ * user approves it, and the payload is re-validated at that point.
+ */
+
+export const proposeTools: AiTool[] = [
+ {
+ name: "propose_create_host",
+ description:
+ "Propose adding a new SSH host. Never include credentials: the user attaches those themselves after approving.",
+ category: "propose",
+ parameters: objectSchema(
+ {
+ name: str("Display name for the host"),
+ ip: str("Hostname or IP address"),
+ port: num("SSH port (defaults to 22)"),
+ username: str("SSH username"),
+ folder: str("Folder to file the host under"),
+ tags: {
+ type: "array",
+ items: { type: "string" },
+ description: "Tags to apply",
+ },
+ },
+ ["name", "ip"],
+ ),
+ handler: async (args) =>
+ proposal("propose_create_host", `Add host ${String(args.name)}`, {
+ name: args.name,
+ ip: args.ip,
+ port: args.port ?? 22,
+ username: args.username ?? null,
+ folder: args.folder ?? null,
+ tags: args.tags ?? [],
+ }),
+ },
+ {
+ name: "propose_update_host",
+ description:
+ "Propose changing an existing host's non-secret settings. Only include the fields that should change.",
+ category: "propose",
+ parameters: objectSchema(
+ {
+ hostId: num("The host id to update"),
+ name: str("New display name"),
+ ip: str("New hostname or IP address"),
+ port: num("New SSH port"),
+ username: str("New SSH username"),
+ folder: str("New folder"),
+ tags: {
+ type: "array",
+ items: { type: "string" },
+ description: "Replacement tag list",
+ },
+ },
+ ["hostId"],
+ ),
+ handler: async (args) => {
+ const changes: Record = {};
+ for (const field of [
+ "name",
+ "ip",
+ "port",
+ "username",
+ "folder",
+ "tags",
+ ]) {
+ if (args[field] !== undefined) changes[field] = args[field];
+ }
+ return proposal(
+ "propose_update_host",
+ `Update host ${String(args.hostId)}`,
+ { hostId: args.hostId, changes },
+ );
+ },
+ },
+ {
+ name: "propose_delete_host",
+ description:
+ "Propose removing a host. Use sparingly and explain why in the reason.",
+ category: "propose",
+ parameters: objectSchema(
+ {
+ hostId: num("The host id to delete"),
+ reason: str("Why this host should be removed"),
+ },
+ ["hostId", "reason"],
+ ),
+ handler: async (args) =>
+ proposal("propose_delete_host", `Delete host ${String(args.hostId)}`, {
+ hostId: args.hostId,
+ reason: args.reason,
+ }),
+ },
+ {
+ name: "propose_create_snippet",
+ description:
+ "Propose saving a new command snippet the user can run against their hosts.",
+ category: "propose",
+ parameters: objectSchema(
+ {
+ name: str("Snippet name"),
+ content: str("The command text"),
+ description: str("What the snippet does"),
+ folder: str("Folder to file it under"),
+ },
+ ["name", "content"],
+ ),
+ handler: async (args) =>
+ proposal(
+ "propose_create_snippet",
+ `Create snippet ${String(args.name)}`,
+ {
+ name: args.name,
+ content: args.content,
+ description: args.description ?? null,
+ folder: args.folder ?? null,
+ },
+ ),
+ },
+ {
+ name: "propose_update_snippet",
+ description: "Propose editing an existing snippet.",
+ category: "propose",
+ parameters: objectSchema(
+ {
+ snippetId: num("The snippet id to update"),
+ name: str("New name"),
+ content: str("New command text"),
+ description: str("New description"),
+ folder: str("New folder"),
+ },
+ ["snippetId"],
+ ),
+ handler: async (args) => {
+ const changes: Record = {};
+ for (const field of ["name", "content", "description", "folder"]) {
+ if (args[field] !== undefined) changes[field] = args[field];
+ }
+ return proposal(
+ "propose_update_snippet",
+ `Update snippet ${String(args.snippetId)}`,
+ { snippetId: args.snippetId, changes },
+ );
+ },
+ },
+ {
+ name: "propose_delete_snippet",
+ description: "Propose deleting a snippet.",
+ category: "propose",
+ parameters: objectSchema(
+ {
+ snippetId: num("The snippet id to delete"),
+ reason: str("Why this snippet should be removed"),
+ },
+ ["snippetId", "reason"],
+ ),
+ handler: async (args) =>
+ proposal(
+ "propose_delete_snippet",
+ `Delete snippet ${String(args.snippetId)}`,
+ { snippetId: args.snippetId, reason: args.reason },
+ ),
+ },
+ {
+ name: "propose_create_automation",
+ description:
+ "Propose a new automation. The definition must be a valid AutomationDefinition object with a trigger and an ordered list of steps. It is validated server-side and previewed with a dry run before anything happens.",
+ category: "propose",
+ parameters: objectSchema(
+ {
+ name: str("Automation name"),
+ description: str("What the automation does"),
+ definition: {
+ type: "object",
+ description:
+ "The AutomationDefinition: { trigger: {...}, steps: [...] }",
+ },
+ },
+ ["name", "definition"],
+ ),
+ handler: async (args) =>
+ proposal(
+ "propose_create_automation",
+ `Create automation ${String(args.name)}`,
+ {
+ name: args.name,
+ description: args.description ?? null,
+ definition: args.definition,
+ },
+ ),
+ },
+ {
+ name: "propose_create_fleet",
+ description: "Propose grouping hosts into a new fleet.",
+ category: "propose",
+ parameters: objectSchema(
+ {
+ name: str("Fleet name"),
+ description: str("What this fleet is for"),
+ hostIds: {
+ type: "array",
+ items: { type: "number" },
+ description: "Host ids to add as members",
+ },
+ },
+ ["name"],
+ ),
+ handler: async (args) =>
+ proposal("propose_create_fleet", `Create fleet ${String(args.name)}`, {
+ name: args.name,
+ description: args.description ?? null,
+ hostIds: args.hostIds ?? [],
+ }),
+ },
+ {
+ name: "propose_create_alert_rule",
+ description:
+ "Propose a new alert rule that fires when a host metric crosses a threshold.",
+ category: "propose",
+ parameters: objectSchema(
+ {
+ name: str("Rule name"),
+ hostId: num("Host id to watch, or omit to watch all hosts"),
+ triggerType: str(
+ "What to watch, for example cpu, memory, disk or host_status",
+ ),
+ thresholdValue: num("Threshold to compare against"),
+ thresholdDurationSeconds: num(
+ "How long the breach must persist before firing",
+ ),
+ cooldownMinutes: num("Minimum minutes between repeat firings"),
+ },
+ ["name", "triggerType"],
+ ),
+ handler: async (args) =>
+ proposal(
+ "propose_create_alert_rule",
+ `Create alert rule ${String(args.name)}`,
+ {
+ name: args.name,
+ hostId: args.hostId ?? null,
+ triggerType: args.triggerType,
+ thresholdValue: args.thresholdValue ?? null,
+ thresholdDurationSeconds: args.thresholdDurationSeconds ?? null,
+ cooldownMinutes: args.cooldownMinutes ?? 15,
+ },
+ ),
+ },
+ {
+ name: "propose_run_command",
+ description:
+ "Propose running a command on a host. The user reviews and approves it before it runs. Use this for anything that changes state; read-only diagnostics may run directly if the user has enabled that.",
+ category: "propose",
+ parameters: objectSchema(
+ {
+ hostId: num("The host id to run on"),
+ command: str("The exact command to run"),
+ explanation: str("What the command does and why it is needed"),
+ },
+ ["hostId", "command", "explanation"],
+ ),
+ handler: async (args) =>
+ proposal(
+ "propose_run_command",
+ // Deliberately short: the card renders the command in its own block,
+ // so repeating it here made every card twice as tall as it needed.
+ `Run a command on host ${String(args.hostId)}`,
+ {
+ hostId: args.hostId,
+ command: args.command,
+ explanation: args.explanation,
+ },
+ ),
+ },
+];
diff --git a/src/backend/ai/tools/read-tools.ts b/src/backend/ai/tools/read-tools.ts
new file mode 100644
index 0000000..77ec7e3
--- /dev/null
+++ b/src/backend/ai/tools/read-tools.ts
@@ -0,0 +1,331 @@
+import {
+ createCurrentAlertRepository,
+ createCurrentAutomationRepository,
+ createCurrentCommandHistoryRepository,
+ createCurrentFleetRepository,
+ createCurrentHomepageItemRepository,
+ createCurrentHostRepository,
+ createCurrentNetworkTopologyRepository,
+ createCurrentSnippetRepository,
+ createCurrentWorkspaceRepository,
+} from "../../database/repositories/factory.js";
+import { num, objectSchema, type AiTool } from "./types.js";
+
+/**
+ * Read tools project explicit fields rather than spreading rows. Redaction runs
+ * afterwards as a second line of defense, but the projection here is the
+ * primary control: a field that is never selected cannot leak.
+ */
+
+interface HostSummary {
+ id: number;
+ name: string | null;
+ ip: string | null;
+ port: number | null;
+ username: string | null;
+ folder: string | null;
+ tags: unknown;
+ protocol: string | null;
+ enableTerminal: boolean | null;
+ enableFileManager: boolean | null;
+ enableTunnel: boolean | null;
+ enableDocker: boolean | null;
+}
+
+function toHostSummary(host: Record): HostSummary {
+ return {
+ id: host.id,
+ name: host.name ?? null,
+ ip: host.ip ?? null,
+ port: host.port ?? null,
+ username: host.username ?? null,
+ folder: host.folder ?? null,
+ tags: host.tags ?? null,
+ protocol: host.protocol ?? null,
+ enableTerminal: host.enableTerminal ?? null,
+ enableFileManager: host.enableFileManager ?? null,
+ enableTunnel: host.enableTunnel ?? null,
+ enableDocker: host.enableDocker ?? null,
+ };
+}
+
+export const readTools: AiTool[] = [
+ {
+ name: "list_hosts",
+ description:
+ "List the user's SSH hosts with their names, addresses, folders and tags. Never returns passwords or keys. Call this before proposing anything that references a host.",
+ category: "read",
+ parameters: objectSchema({}),
+ handler: async (_args, context) => {
+ const hosts = await createCurrentHostRepository().listByUserId(
+ context.userId,
+ );
+ return { hosts: hosts.map((host) => toHostSummary(host as any)) };
+ },
+ },
+ {
+ name: "get_host",
+ description:
+ "Get one host's non-secret configuration by id. Use it to inspect settings before proposing an update.",
+ category: "read",
+ parameters: objectSchema(
+ { hostId: num("The host id, as returned by list_hosts") },
+ ["hostId"],
+ ),
+ handler: async (args, context) => {
+ const hostId = Number(args.hostId);
+ const host = await createCurrentHostRepository().findByIdForUser(
+ context.userId,
+ hostId,
+ );
+ if (!host) return { error: "Host not found" };
+ return { host: toHostSummary(host as any) };
+ },
+ },
+ {
+ name: "list_fleets",
+ description:
+ "List the user's fleets. Fleets group hosts for bulk operations and inventory.",
+ category: "read",
+ parameters: objectSchema({}),
+ handler: async (_args, context) => {
+ const fleets = await createCurrentFleetRepository().listByUser(
+ context.userId,
+ );
+ return {
+ fleets: fleets.map((fleet: any) => ({
+ id: fleet.id,
+ name: fleet.name,
+ description: fleet.description ?? null,
+ })),
+ };
+ },
+ },
+ {
+ name: "list_snippets",
+ description:
+ "List the user's saved command snippets, including their folder and the command text.",
+ category: "read",
+ parameters: objectSchema({}),
+ handler: async (_args, context) => {
+ const snippets = await createCurrentSnippetRepository().listOwnedSnippets(
+ context.userId,
+ );
+ return {
+ snippets: snippets.map((snippet: any) => ({
+ id: snippet.id,
+ name: snippet.name,
+ content: snippet.content,
+ folder: snippet.folder ?? null,
+ description: snippet.description ?? null,
+ })),
+ };
+ },
+ },
+ {
+ name: "list_automations",
+ description:
+ "List the user's automations with their trigger kind and enabled state. Read this before proposing a change to an existing automation.",
+ category: "read",
+ parameters: objectSchema({}),
+ handler: async (_args, context) => {
+ const automations = await createCurrentAutomationRepository().list(
+ context.userId,
+ );
+ return {
+ automations: automations.map((automation: any) => ({
+ id: automation.id,
+ name: automation.name,
+ description: automation.description ?? null,
+ enabled: automation.enabled,
+ lastRunAt: automation.lastRunAt ?? null,
+ lastRunStatus: automation.lastRunStatus ?? null,
+ })),
+ };
+ },
+ },
+ {
+ name: "get_automation",
+ description:
+ "Get one automation's full definition (trigger and steps) by id.",
+ category: "read",
+ parameters: objectSchema(
+ {
+ automationId: num("The automation id, as returned by list_automations"),
+ },
+ ["automationId"],
+ ),
+ handler: async (args, context) => {
+ const automation = await createCurrentAutomationRepository().findForUser(
+ Number(args.automationId),
+ context.userId,
+ );
+ if (!automation) return { error: "Automation not found" };
+ return {
+ automation: {
+ id: (automation as any).id,
+ name: (automation as any).name,
+ enabled: (automation as any).enabled,
+ definition: (automation as any).definition,
+ },
+ };
+ },
+ },
+ {
+ name: "list_workspaces",
+ description:
+ "List the user's saved workspace layouts (named sets of open tabs and splits).",
+ category: "read",
+ parameters: objectSchema({}),
+ handler: async (_args, context) => {
+ const workspaces = await createCurrentWorkspaceRepository().listByUser(
+ context.userId,
+ );
+ return {
+ workspaces: workspaces.map((workspace: any) => ({
+ id: workspace.id,
+ name: workspace.name,
+ isDefault: workspace.isDefault ?? false,
+ })),
+ };
+ },
+ },
+ {
+ name: "list_alert_rules",
+ description:
+ "List the user's alert rules with their thresholds and enabled state.",
+ category: "read",
+ parameters: objectSchema({}),
+ handler: async (_args, context) => {
+ const rules = await createCurrentAlertRepository().listAlertRules(
+ context.userId,
+ );
+ return {
+ rules: rules.map((rule) => ({
+ id: rule.id,
+ name: rule.name,
+ hostId: rule.host_id,
+ enabled: rule.enabled === 1,
+ triggerType: rule.trigger_type,
+ thresholdValue: rule.threshold_value,
+ thresholdDurationSeconds: rule.threshold_duration_seconds,
+ cooldownMinutes: rule.cooldown_minutes,
+ })),
+ };
+ },
+ },
+ {
+ name: "list_notification_channels",
+ description:
+ "List the user's notification channels by id, name and type. Channel configuration is never returned because it holds tokens.",
+ category: "read",
+ parameters: objectSchema({}),
+ handler: async (_args, context) => {
+ const channels =
+ await createCurrentAlertRepository().listNotificationChannels(
+ context.userId,
+ );
+ return {
+ channels: channels.map((channel) => ({
+ id: channel.id,
+ name: channel.name,
+ type: channel.type,
+ enabled: channel.enabled === 1,
+ })),
+ };
+ },
+ },
+ {
+ name: "get_alert_firings",
+ description:
+ "Recent alert firings, newest first. Use this to answer questions about what has been alerting.",
+ category: "read",
+ parameters: objectSchema({
+ limit: num("How many firings to return (default 25, max 100)"),
+ }),
+ handler: async (args, context) => {
+ const limit = Math.min(Math.max(Number(args.limit) || 25, 1), 100);
+ const result = await createCurrentAlertRepository().listAlertFirings({
+ userId: context.userId,
+ limit,
+ offset: 0,
+ });
+ return {
+ firings: (result.firings ?? []).map((firing) => ({
+ id: firing.id,
+ ruleName: firing.rule_name,
+ hostName: firing.host_name,
+ firedAt: firing.fired_at,
+ resolvedAt: firing.resolved_at,
+ severity: firing.severity,
+ message: firing.message,
+ acknowledged: firing.acknowledged === 1,
+ })),
+ };
+ },
+ },
+ {
+ name: "list_homepage_items",
+ description: "List the user's homepage service-link tiles.",
+ category: "read",
+ parameters: objectSchema({}),
+ handler: async (_args, context) => {
+ const items = await createCurrentHomepageItemRepository().listByUserId(
+ context.userId,
+ );
+ return {
+ items: (items as any[]).map((item) => ({
+ id: item.id,
+ typeId: item.typeId,
+ title: item.title ?? null,
+ })),
+ };
+ },
+ },
+ {
+ name: "get_command_history",
+ description:
+ "Recent commands the user has run on one host, newest first. Useful for understanding what they have been working on.",
+ category: "read",
+ parameters: objectSchema(
+ {
+ hostId: num("The host id, as returned by list_hosts"),
+ limit: num("How many entries to return (default 25, max 100)"),
+ },
+ ["hostId"],
+ ),
+ handler: async (args, context) => {
+ const limit = Math.min(Math.max(Number(args.limit) || 25, 1), 100);
+ const hostId = Number(args.hostId);
+
+ // Ownership is enforced here rather than trusted from the model.
+ const host = await createCurrentHostRepository().findByIdForUser(
+ context.userId,
+ hostId,
+ );
+ if (!host) return { error: "Host not found" };
+
+ const commands =
+ await createCurrentCommandHistoryRepository().listCommandsForHost(
+ context.userId,
+ hostId,
+ limit,
+ );
+ return { commands };
+ },
+ },
+ {
+ name: "get_network_topology",
+ description: "The user's saved network topology graph, if they have one.",
+ category: "read",
+ parameters: objectSchema({}),
+ handler: async (_args, context) => {
+ const topology =
+ await createCurrentNetworkTopologyRepository().findByUserId(
+ context.userId,
+ );
+ if (!topology) return { topology: null };
+ return { topology: (topology as any).data ?? null };
+ },
+ },
+];
diff --git a/src/backend/ai/tools/types.ts b/src/backend/ai/tools/types.ts
new file mode 100644
index 0000000..34117dc
--- /dev/null
+++ b/src/backend/ai/tools/types.ts
@@ -0,0 +1,72 @@
+export type ToolCategory = "read" | "propose";
+
+export interface ToolContext {
+ /** Always taken from the verified JWT, never from model input. */
+ userId: string;
+ conversationId: number;
+ /** Per-user opt-in for running allowlisted read-only commands. */
+ allowReadOnlyCommands: boolean;
+}
+
+export interface AiTool {
+ name: string;
+ description: string;
+ category: ToolCategory;
+ /** JSON Schema for the arguments, sent to the provider verbatim. */
+ parameters: Record;
+ /**
+ * Read tools return data to feed back to the model. Propose tools return a
+ * ProposalDraft and must not mutate anything.
+ */
+ handler: (
+ args: Record,
+ context: ToolContext,
+ ) => Promise;
+}
+
+/** What a provider adapter needs to describe a tool to its model. */
+export interface ToolDefinitionShape {
+ name: string;
+ description: string;
+ parameters: Record;
+}
+
+export interface ProposalDraft {
+ __proposal: true;
+ kind: string;
+ summary: string;
+ payload: Record;
+}
+
+export function isProposalDraft(value: unknown): value is ProposalDraft {
+ return (
+ typeof value === "object" &&
+ value !== null &&
+ (value as ProposalDraft).__proposal === true
+ );
+}
+
+export function proposal(
+ kind: string,
+ summary: string,
+ payload: Record,
+): ProposalDraft {
+ return { __proposal: true, kind, summary, payload };
+}
+
+/** Small helper so tool schemas stay readable. */
+export function objectSchema(
+ properties: Record,
+ required: string[] = [],
+): Record {
+ return {
+ type: "object",
+ properties,
+ required,
+ additionalProperties: false,
+ };
+}
+
+export const str = (description: string) => ({ type: "string", description });
+export const num = (description: string) => ({ type: "number", description });
+export const bool = (description: string) => ({ type: "boolean", description });
diff --git a/src/backend/automations/actions/host-targets.ts b/src/backend/automations/actions/host-targets.ts
new file mode 100644
index 0000000..adb9366
--- /dev/null
+++ b/src/backend/automations/actions/host-targets.ts
@@ -0,0 +1,90 @@
+import type { HostSelector } from "../../../types/automations.js";
+import { resolveHostById } from "../../hosts/host-resolver.js";
+import { createCurrentFleetRepository } from "../../database/repositories/factory.js";
+import { PermissionManager } from "../../utils/permission-manager.js";
+import type { StepExecutionContext } from "./types.js";
+
+/** A host the caller is allowed to act on. `host` is always resolved. */
+export interface ResolvedTarget {
+ id: number;
+ name: string;
+ host: NonNullable>>;
+}
+
+/**
+ * Turns a selector into the hosts a step may actually act on.
+ *
+ * Access is checked here, at execution time rather than when the automation
+ * was saved, so a permission revoked after the fact takes effect on the next
+ * run. resolveHostById performs its own connect-level check and returns null
+ * when the owner can no longer reach the host.
+ */
+export async function resolveTargets(
+ selector: HostSelector,
+ context: StepExecutionContext,
+): Promise<{ targets: ResolvedTarget[]; skipped: number[] }> {
+ const ids = await selectorHostIds(selector, context);
+ const targets: ResolvedTarget[] = [];
+ const skipped: number[] = [];
+
+ for (const id of ids) {
+ const host = await resolveHostById(id, context.userId);
+ if (!host) {
+ skipped.push(id);
+ continue;
+ }
+ targets.push({ id, name: host.name || host.ip, host });
+ }
+
+ return { targets, skipped };
+}
+
+async function selectorHostIds(
+ selector: HostSelector,
+ context: StepExecutionContext,
+): Promise {
+ switch (selector.kind) {
+ case "host":
+ return [selector.hostId];
+ case "hosts":
+ return selector.hostIds;
+ case "trigger":
+ return context.triggerHostId ? [context.triggerHostId] : [];
+ case "fleet":
+ return fleetHostIds(selector.fleetId, context.userId);
+ case "all":
+ return allAccessibleHostIds(context.userId);
+ default:
+ return [];
+ }
+}
+
+async function fleetHostIds(
+ fleetId: number,
+ userId: string,
+): Promise {
+ try {
+ const repository = createCurrentFleetRepository();
+ const members = await repository.listEffectiveMembers(userId, fleetId);
+ return members.map((member) => member.id);
+ } catch {
+ return [];
+ }
+}
+
+async function allAccessibleHostIds(userId: string): Promise {
+ try {
+ const { createCurrentHostRepository } =
+ await import("../../database/repositories/factory.js");
+ const hosts = await createCurrentHostRepository().listByUserId(userId);
+ const ids = hosts.map((host) => host.id);
+ const allowed =
+ await PermissionManager.getInstance().filterAccessibleHostIds(
+ userId,
+ ids,
+ );
+ return ids.filter((id) => allowed.has(id));
+ } catch {
+ return [];
+ }
+}
diff --git a/src/backend/automations/actions/index.ts b/src/backend/automations/actions/index.ts
new file mode 100644
index 0000000..f288df4
--- /dev/null
+++ b/src/backend/automations/actions/index.ts
@@ -0,0 +1,406 @@
+import {
+ DEFAULT_STEP_TIMEOUT_MS,
+ type Step,
+} from "../../../types/automations.js";
+import { execCommand } from "../../hosts/metrics/widgets/common-utils.js";
+import {
+ execElevated,
+ shellSingleQuote,
+} from "../../hosts/metrics/managers/exec-elevated.js";
+import {
+ createFleetSshFactory,
+ getFleetPoolKey,
+} from "../../hosts/ssh-client-factory.js";
+import { withConnection } from "../../hosts/ssh-connection-pool.js";
+import { resolveSnippetCommand } from "../../database/routes/snippets-execution.js";
+import {
+ createCurrentAlertRepository,
+ createCurrentSnippetRepository,
+} from "../../database/repositories/factory.js";
+import { sendAutomationNotification } from "../notify.js";
+import { automationFetch } from "../http.js";
+import { renderRecord, renderTemplate } from "../template.js";
+import { resolveTargets, type ResolvedTarget } from "./host-targets.js";
+import {
+ fail,
+ ok,
+ stepTimeout,
+ type StepExecutionContext,
+ type StepResult,
+} from "./types.js";
+
+/**
+ * One executor per step type.
+ *
+ * Anything that leaves Termix checks context.dryRun first and reports what it
+ * would have done instead of doing it, so an automation can be exercised
+ * safely while it is being built.
+ */
+export async function executeStep(
+ step: Step,
+ context: StepExecutionContext,
+): Promise {
+ switch (step.type) {
+ case "notify":
+ return runNotify(step, context);
+ case "http":
+ return runHttp(step, context);
+ case "run_command":
+ return runCommand(step, context);
+ case "run_snippet":
+ return runSnippet(step, context);
+ case "docker":
+ return runDocker(step, context);
+ case "tunnel":
+ return runTunnel(step, context);
+ case "wol":
+ return runWol(step, context);
+ case "wait":
+ return runWait(step, context);
+ case "set_var":
+ return runSetVar(step, context);
+ case "stop":
+ return {
+ success: true,
+ halt: { status: step.status ?? "success" },
+ output: `Stopped with status ${step.status ?? "success"}`,
+ };
+ default:
+ return fail(`Unsupported step type: ${(step as Step).type}`);
+ }
+}
+
+async function runNotify(
+ step: Extract,
+ context: StepExecutionContext,
+): Promise {
+ const title = renderTemplate(step.title ?? "", context.template);
+ const body = renderTemplate(step.body ?? "", context.template);
+
+ if (step.channelIds.length === 0) {
+ return fail("No notification channels selected");
+ }
+ if (context.dryRun) {
+ return ok(
+ `Would notify ${step.channelIds.length} channel(s): ${title || body}`,
+ );
+ }
+
+ const repository = createCurrentAlertRepository();
+ const channels = await repository.listNotificationChannels(context.userId);
+ const selected = channels.filter((channel) =>
+ step.channelIds.includes(channel.id),
+ );
+
+ if (selected.length === 0) {
+ return fail("Selected notification channels no longer exist");
+ }
+
+ let delivered = 0;
+ const errors: string[] = [];
+ for (const channel of selected) {
+ if (!channel.enabled) continue;
+ try {
+ await sendAutomationNotification(
+ { id: channel.id, type: channel.type, config: channel.config },
+ {
+ title,
+ body,
+ severity: step.severity ?? "warning",
+ context: context.template,
+ },
+ );
+ delivered++;
+ } catch (error) {
+ errors.push(
+ `${channel.name}: ${error instanceof Error ? error.message : String(error)}`,
+ );
+ }
+ }
+
+ if (delivered === 0) {
+ return fail(errors.join("; ") || "No enabled channels to notify");
+ }
+ return ok(
+ `Notified ${delivered} channel(s)${errors.length ? `; ${errors.join("; ")}` : ""}`,
+ );
+}
+
+async function runHttp(
+ step: Extract,
+ context: StepExecutionContext,
+): Promise {
+ const url = renderTemplate(step.url, context.template);
+ const headers = renderRecord(step.headers, context.template);
+ const body = step.body
+ ? renderTemplate(step.body, context.template)
+ : undefined;
+
+ if (context.dryRun) {
+ return ok(`Would ${step.method} ${url}`);
+ }
+
+ try {
+ const response = await automationFetch(url, {
+ method: step.method,
+ headers,
+ body,
+ allowPrivateNetwork: step.allowPrivateNetwork,
+ timeoutMs: stepTimeout(context, step.timeoutMs, DEFAULT_STEP_TIMEOUT_MS),
+ });
+
+ const text = await response.text();
+ const summary = `HTTP ${response.status} ${response.statusText}\n${text}`;
+ return response.ok ? ok(summary) : fail(`HTTP ${response.status}`, summary);
+ } catch (error) {
+ return fail(error instanceof Error ? error.message : String(error));
+ }
+}
+
+async function runCommand(
+ step: Extract,
+ context: StepExecutionContext,
+): Promise {
+ const command = renderTemplate(step.command, context.template);
+ return runOnTargets(step.hostSelector, context, async (target) => {
+ if (context.dryRun) {
+ return { output: `Would run on ${target.name}: ${command}` };
+ }
+ return execOnHost(
+ target.host,
+ command,
+ step.elevated,
+ context,
+ step.timeoutMs,
+ );
+ });
+}
+
+async function runSnippet(
+ step: Extract,
+ context: StepExecutionContext,
+): Promise {
+ const snippet = await createCurrentSnippetRepository()
+ .findOwnedById(context.userId, step.snippetId)
+ .catch(() => null);
+
+ if (!snippet) return fail("Snippet not found");
+ if (snippet.isNote) return fail("Notes cannot be executed on a host");
+
+ // Template values only ever reach the snippet through inputValues, never by
+ // rewriting the snippet body, so automation variables cannot inject snippet
+ // syntax of their own.
+ const inputValues = renderRecord(step.inputValues, context.template) ?? {};
+
+ return runOnTargets(step.hostSelector, context, async (target) => {
+ const command = resolveSnippetCommand(
+ snippet.content,
+ {
+ ip: target.host.ip,
+ username: target.host.username,
+ port: target.host.port,
+ name: target.host.name,
+ },
+ inputValues,
+ );
+
+ if (context.dryRun) {
+ return { output: `Would run snippet on ${target.name}: ${command}` };
+ }
+ return execOnHost(
+ target.host,
+ command,
+ step.elevated,
+ context,
+ step.timeoutMs,
+ );
+ });
+}
+
+async function runDocker(
+ step: Extract,
+ context: StepExecutionContext,
+): Promise {
+ const container = renderTemplate(step.container, context.template);
+ if (!container) return fail("Container name is required");
+
+ return runOnTargets(step.hostSelector, context, async (target) => {
+ if (context.dryRun) {
+ return {
+ output: `Would ${step.action} container ${container} on ${target.name}`,
+ };
+ }
+
+ // The Docker HTTP routes are tied to an interactive session, so run the
+ // equivalent command over the same pooled SSH connection everything else
+ // uses. The container name is quoted because it comes from a template.
+ const command = `docker ${step.action} ${shellSingleQuote(container)}`;
+ return execOnHost(target.host, command, false, context, step.timeoutMs);
+ });
+}
+
+async function runTunnel(
+ step: Extract,
+ context: StepExecutionContext,
+): Promise {
+ const name = renderTemplate(step.tunnelName, context.template);
+ if (context.dryRun) return ok(`Would ${step.action} tunnel ${name}`);
+
+ try {
+ const manager = await import("../../hosts/tunnel/manager.js");
+ const config = manager.tunnelConfigs?.get(name);
+ if (!config) return fail(`Tunnel "${name}" is not configured`);
+
+ if (step.action === "connect") {
+ await manager.connectSSHTunnel(config);
+ return ok(`Tunnel ${name} connected`);
+ }
+
+ // shouldRetry false, otherwise the manager immediately reconnects the
+ // tunnel the automation just asked it to drop.
+ manager.manualDisconnects.add(name);
+ await manager.handleDisconnect(name, config, false);
+ return ok(`Tunnel ${name} disconnected`);
+ } catch (error) {
+ return fail(error instanceof Error ? error.message : String(error));
+ }
+}
+
+async function runWol(
+ step: Extract,
+ context: StepExecutionContext,
+): Promise {
+ const host = await resolveTargets(
+ { kind: "host", hostId: step.hostId },
+ context,
+ );
+ const target = host.targets[0];
+ if (!target?.host) return fail("Host not found or not accessible");
+
+ const mac = (target.host as { macAddress?: string }).macAddress;
+ if (!mac) return fail("Host has no MAC address configured");
+ if (context.dryRun) return ok(`Would wake ${target.name} (${mac})`);
+
+ try {
+ const { sendWakeOnLan, isValidMac } =
+ await import("../../utils/wake-on-lan.js");
+ if (!isValidMac(mac)) return fail(`Invalid MAC address: ${mac}`);
+ await sendWakeOnLan(mac);
+ return ok(`Sent magic packet to ${target.name}`);
+ } catch (error) {
+ return fail(error instanceof Error ? error.message : String(error));
+ }
+}
+
+async function runWait(
+ step: Extract,
+ context: StepExecutionContext,
+): Promise {
+ const requested = Math.max(step.seconds, 0) * 1000;
+ const waitMs = Math.min(
+ requested,
+ stepTimeout(context, undefined, requested),
+ );
+ if (context.dryRun) return ok(`Would wait ${step.seconds}s`);
+
+ await new Promise((resolve) => setTimeout(resolve, waitMs));
+ return ok(`Waited ${Math.round(waitMs / 1000)}s`);
+}
+
+async function runSetVar(
+ step: Extract,
+ context: StepExecutionContext,
+): Promise {
+ const value = renderTemplate(step.value, context.template);
+ return ok(`${step.name} = ${value}`, { [step.name]: value });
+}
+
+/**
+ * Runs a per-host action across a selector's targets. One host failing does
+ * not stop the others, matching how fleet execution behaves.
+ */
+async function runOnTargets(
+ selector: Extract["hostSelector"],
+ context: StepExecutionContext,
+ run: (target: ResolvedTarget) => Promise<{ output?: string; error?: string }>,
+): Promise {
+ const { targets, skipped } = await resolveTargets(selector, context);
+
+ if (targets.length === 0) {
+ return fail(
+ skipped.length > 0
+ ? `No accessible hosts (${skipped.length} skipped)`
+ : "No hosts matched the selector",
+ );
+ }
+
+ const results = await Promise.allSettled(
+ targets.map(async (target) => ({
+ target,
+ result: await run(target),
+ })),
+ );
+
+ const lines: string[] = [];
+ let failures = 0;
+
+ for (const [index, settled] of results.entries()) {
+ const name = targets[index].name;
+ if (settled.status === "rejected") {
+ failures++;
+ lines.push(`${name}: ${String(settled.reason)}`);
+ continue;
+ }
+ const { result } = settled.value;
+ if (result.error) {
+ failures++;
+ lines.push(`${name}: ${result.error}`);
+ } else {
+ lines.push(`${name}: ${result.output ?? "ok"}`);
+ }
+ }
+
+ if (skipped.length > 0) {
+ lines.push(`${skipped.length} host(s) skipped: no access`);
+ }
+
+ const output = lines.join("\n");
+ return failures > 0 && failures === targets.length
+ ? fail(`All ${failures} host(s) failed`, output)
+ : ok(output);
+}
+
+async function execOnHost(
+ host: ResolvedTarget["host"],
+ command: string,
+ elevated: boolean | undefined,
+ context: StepExecutionContext,
+ timeoutMs: number | undefined,
+): Promise<{ output?: string; error?: string }> {
+ const sshHost = host as ResolvedTarget["host"] & { sudoPassword?: string };
+ const timeout = stepTimeout(context, timeoutMs, DEFAULT_STEP_TIMEOUT_MS);
+ if (timeout <= 0) return { error: "Run deadline exceeded" };
+
+ try {
+ const result = await withConnection(
+ getFleetPoolKey(sshHost),
+ createFleetSshFactory(sshHost),
+ async (client) => {
+ if (elevated) {
+ return execElevated(client, command, sshHost.sudoPassword, {
+ timeoutMs: timeout,
+ });
+ }
+ return execCommand(client, command, timeout);
+ },
+ );
+
+ const output = [result.stdout, result.stderr].filter(Boolean).join("\n");
+ if (result.code === 0 || result.code === null) {
+ return { output: output || "(no output)" };
+ }
+ return { error: `Exited with code ${result.code}`, output };
+ } catch (error) {
+ return { error: error instanceof Error ? error.message : String(error) };
+ }
+}
diff --git a/src/backend/automations/actions/types.ts b/src/backend/automations/actions/types.ts
new file mode 100644
index 0000000..b6f325e
--- /dev/null
+++ b/src/backend/automations/actions/types.ts
@@ -0,0 +1,58 @@
+import type { Step } from "../../../types/automations.js";
+import type { TemplateContext } from "../template.js";
+
+/** What every executor returns. `output` is what later steps can read. */
+export interface StepResult {
+ success: boolean;
+ output?: string;
+ error?: string;
+ /** Merged into the run's variables, for set_var and friends. */
+ vars?: Record;
+ /** Set by the stop step to end the run early. */
+ halt?: { status: "success" | "failed" };
+}
+
+export interface StepExecutionContext {
+ userId: string;
+ automationId: number;
+ runId: number;
+ /** Nothing that leaves Termix may actually happen when this is set. */
+ dryRun: boolean;
+ template: TemplateContext;
+ /** Host the trigger fired for, when there was one. */
+ triggerHostId?: number;
+ /** Automations already on the stack, to refuse recursion. */
+ ancestry: number[];
+ depth: number;
+ /** Wall-clock deadline for the whole run. */
+ deadlineAt: number;
+ signal?: AbortSignal;
+}
+
+export type StepExecutor = (
+ step: T,
+ context: StepExecutionContext,
+) => Promise;
+
+export function ok(output?: string, vars?: Record): StepResult {
+ return { success: true, output, vars };
+}
+
+export function fail(error: string, output?: string): StepResult {
+ return { success: false, error, output };
+}
+
+/** Milliseconds left before the run's overall deadline. */
+export function remainingMs(context: StepExecutionContext): number {
+ return Math.max(context.deadlineAt - Date.now(), 0);
+}
+
+/** A step's timeout, clamped so it can never outlive the run. */
+export function stepTimeout(
+ context: StepExecutionContext,
+ requested: number | undefined,
+ fallback: number,
+): number {
+ const wanted = requested && requested > 0 ? requested : fallback;
+ return Math.max(Math.min(wanted, remainingMs(context)), 0);
+}
diff --git a/src/backend/automations/conditions.ts b/src/backend/automations/conditions.ts
new file mode 100644
index 0000000..8e1711e
--- /dev/null
+++ b/src/backend/automations/conditions.ts
@@ -0,0 +1,203 @@
+import type { MetricPath, Operator } from "../../types/automations.js";
+
+/**
+ * Operator evaluation and metric extraction.
+ *
+ * Pure: no database, no SSH, no clock. Everything here is driven by values the
+ * caller already has, which keeps the comparison rules testable on their own.
+ */
+
+/** Shape of the metrics snapshot this module reads. Mirrors collectMetrics(). */
+export interface MetricsSnapshot {
+ cpu?: {
+ percent?: number | null;
+ load?: [number, number, number] | null;
+ } | null;
+ memory?: { percent?: number | null; usedGiB?: number | null } | null;
+ disk?: {
+ percent?: number | null;
+ filesystems?: Array<{
+ mount?: string;
+ percent?: number | null;
+ availableBytes?: number | null;
+ }> | null;
+ } | null;
+ network?: {
+ interfaces?: Array<{
+ name?: string;
+ rxBytes?: string | number | null;
+ txBytes?: string | number | null;
+ rxRateBps?: number | null;
+ txRateBps?: number | null;
+ }> | null;
+ } | null;
+ temperature?: { highestCelsius?: number | null } | null;
+ uptime?: { seconds?: number | null } | null;
+ processes?: { total?: number | null } | null;
+}
+
+function toNumber(value: unknown): number | null {
+ if (value === null || value === undefined || value === "") return null;
+ const parsed = typeof value === "number" ? value : Number(value);
+ return Number.isFinite(parsed) ? parsed : null;
+}
+
+/**
+ * Pulls the value a trigger watches out of a metrics snapshot.
+ *
+ * The mount and iface selectors are what let a rule watch one filesystem or
+ * one interface. Without a selector the aggregate is used, which for disk is
+ * the primary (root) mount, matching what the metrics UI shows.
+ */
+export function extractMetricValue(
+ metrics: MetricsSnapshot | null | undefined,
+ metric: MetricPath,
+): number | null {
+ if (!metrics) return null;
+
+ switch (metric.path) {
+ case "cpu.percent":
+ return toNumber(metrics.cpu?.percent);
+ case "cpu.load1":
+ return toNumber(metrics.cpu?.load?.[0]);
+ case "cpu.load5":
+ return toNumber(metrics.cpu?.load?.[1]);
+ case "cpu.load15":
+ return toNumber(metrics.cpu?.load?.[2]);
+ case "memory.percent":
+ return toNumber(metrics.memory?.percent);
+ case "memory.usedGiB":
+ return toNumber(metrics.memory?.usedGiB);
+ case "disk.percent": {
+ if (!metric.mount) return toNumber(metrics.disk?.percent);
+ const fs = findMount(metrics, metric.mount);
+ return fs ? toNumber(fs.percent) : null;
+ }
+ case "disk.availableBytes": {
+ const fs = metric.mount ? findMount(metrics, metric.mount) : null;
+ if (metric.mount) return fs ? toNumber(fs.availableBytes) : null;
+ const first = metrics.disk?.filesystems?.[0];
+ return first ? toNumber(first.availableBytes) : null;
+ }
+ case "temperature.highestCelsius":
+ return toNumber(metrics.temperature?.highestCelsius);
+ case "uptime.seconds":
+ return toNumber(metrics.uptime?.seconds);
+ case "processes.total":
+ return toNumber(metrics.processes?.total);
+ case "network.rxBytes":
+ return toNumber(findInterface(metrics, metric.iface)?.rxBytes);
+ case "network.txBytes":
+ return toNumber(findInterface(metrics, metric.iface)?.txBytes);
+ case "network.rxRateBps":
+ return toNumber(findInterface(metrics, metric.iface)?.rxRateBps);
+ case "network.txRateBps":
+ return toNumber(findInterface(metrics, metric.iface)?.txRateBps);
+ default:
+ return null;
+ }
+}
+
+function findMount(metrics: MetricsSnapshot, mount: string) {
+ return (
+ metrics.disk?.filesystems?.find((entry) => entry.mount === mount) ?? null
+ );
+}
+
+function findInterface(metrics: MetricsSnapshot, iface?: string) {
+ const interfaces = metrics.network?.interfaces;
+ if (!interfaces || interfaces.length === 0) return null;
+ if (!iface) return interfaces[0];
+ return interfaces.find((entry) => entry.name === iface) ?? null;
+}
+
+/**
+ * The key a trigger's durable state is stored under. Including the mount or
+ * container is what allows a sustained-breach window per filesystem rather
+ * than per host.
+ */
+export function metricStateKey(hostId: number, metric: MetricPath): string {
+ if ("mount" in metric && metric.mount) return `${hostId}:${metric.mount}`;
+ if ("iface" in metric && metric.iface) return `${hostId}:${metric.iface}`;
+ return String(hostId);
+}
+
+/**
+ * Compares two values. Numeric when both sides look numeric, so "90" and 90
+ * behave the same; string comparison otherwise. `changed` is handled by the
+ * caller, which is the only place that knows the previous value.
+ */
+export function compare(
+ left: unknown,
+ operator: Operator,
+ right: unknown,
+): boolean {
+ if (operator === "contains" || operator === "not_contains") {
+ const haystack = String(left ?? "");
+ const needle = String(right ?? "");
+ const found = haystack.includes(needle);
+ return operator === "contains" ? found : !found;
+ }
+
+ const leftNumber = toNumber(left);
+ const rightNumber = toNumber(right);
+ const numeric = leftNumber !== null && rightNumber !== null;
+
+ switch (operator) {
+ case ">":
+ return numeric && leftNumber > rightNumber;
+ case "<":
+ return numeric && leftNumber < rightNumber;
+ case ">=":
+ return numeric && leftNumber >= rightNumber;
+ case "<=":
+ return numeric && leftNumber <= rightNumber;
+ case "==":
+ return numeric
+ ? leftNumber === rightNumber
+ : String(left ?? "") === String(right ?? "");
+ case "!=":
+ return numeric
+ ? leftNumber !== rightNumber
+ : String(left ?? "") !== String(right ?? "");
+ case "changed":
+ return String(left ?? "") !== String(right ?? "");
+ default:
+ return false;
+ }
+}
+
+/** Whether a cooldown window is still open. */
+export function isCoolingDown(
+ lastFiredAt: string | null | undefined,
+ cooldownMinutes: number,
+ now: number = Date.now(),
+): boolean {
+ if (!lastFiredAt) return false;
+ const last = Date.parse(lastFiredAt);
+ if (Number.isNaN(last)) return false;
+ return now - last < Math.max(cooldownMinutes, 0) * 60_000;
+}
+
+/** Whether a sustained breach has been held long enough to fire. */
+export function hasDwelled(
+ breachStartedAt: string | null | undefined,
+ forSeconds: number | undefined,
+ now: number = Date.now(),
+): boolean {
+ if (!forSeconds) return true;
+ if (!breachStartedAt) return false;
+ const started = Date.parse(breachStartedAt);
+ if (Number.isNaN(started)) return false;
+ return now - started >= forSeconds * 1000;
+}
+
+/** Severity for a threshold breach, matching the old engine's behaviour. */
+export function severityForValue(
+ value: number | null,
+ explicit?: "info" | "warning" | "critical",
+): "info" | "warning" | "critical" {
+ if (explicit) return explicit;
+ if (value !== null && value >= 95) return "critical";
+ return "warning";
+}
diff --git a/src/backend/automations/cron.ts b/src/backend/automations/cron.ts
new file mode 100644
index 0000000..7fd2a33
--- /dev/null
+++ b/src/backend/automations/cron.ts
@@ -0,0 +1,291 @@
+/**
+ * A small five field cron parser, used only to work out when a schedule is
+ * next due.
+ *
+ * Deliberately not a dependency: the engine needs "when is this next due?" and
+ * nothing else, and a pure function is far easier to test than a scheduler
+ * library. Fields are the standard minute, hour, day-of-month, month and
+ * day-of-week, supporting *, lists (1,2), ranges (1-5) and steps (a slash).
+ *
+ * Day-of-month and day-of-week follow cron's union rule: when both are
+ * restricted, a date matching either one matches.
+ */
+
+interface CronFields {
+ minutes: Set;
+ hours: Set;
+ daysOfMonth: Set;
+ months: Set;
+ daysOfWeek: Set;
+ domRestricted: boolean;
+ dowRestricted: boolean;
+}
+
+const RANGES: Record = {
+ minute: [0, 59],
+ hour: [0, 23],
+ dayOfMonth: [1, 31],
+ month: [1, 12],
+ // 7 is accepted as an alias for Sunday and folded to 0 once parsed.
+ dayOfWeek: [0, 7],
+};
+
+const NAMED_MONTHS: Record = {
+ jan: 1,
+ feb: 2,
+ mar: 3,
+ apr: 4,
+ may: 5,
+ jun: 6,
+ jul: 7,
+ aug: 8,
+ sep: 9,
+ oct: 10,
+ nov: 11,
+ dec: 12,
+};
+
+const NAMED_DAYS: Record = {
+ sun: 0,
+ mon: 1,
+ tue: 2,
+ wed: 3,
+ thu: 4,
+ fri: 5,
+ sat: 6,
+};
+
+function normalize(token: string, kind: string): string {
+ const lower = token.toLowerCase();
+ if (kind === "month" && lower in NAMED_MONTHS) {
+ return String(NAMED_MONTHS[lower]);
+ }
+ if (kind === "dayOfWeek" && lower in NAMED_DAYS) {
+ return String(NAMED_DAYS[lower]);
+ }
+ return token;
+}
+
+function parseField(field: string, kind: keyof typeof RANGES): Set {
+ const [min, max] = RANGES[kind];
+ const values = new Set();
+
+ for (const part of field.split(",")) {
+ const trimmed = part.trim();
+ if (!trimmed) throw new Error(`Empty value in ${kind} field`);
+
+ const [rangePart, stepPart] = trimmed.split("/");
+ const step = stepPart === undefined ? 1 : Number(stepPart);
+ if (!Number.isInteger(step) || step < 1) {
+ throw new Error(`Invalid step in ${kind} field`);
+ }
+
+ let start: number;
+ let end: number;
+
+ if (rangePart === "*" || rangePart === "") {
+ start = min;
+ end = max;
+ } else if (rangePart.includes("-")) {
+ const [from, to] = rangePart.split("-");
+ start = Number(normalize(from, kind));
+ end = Number(normalize(to, kind));
+ } else {
+ start = Number(normalize(rangePart, kind));
+ end = stepPart === undefined ? start : max;
+ }
+
+ if (!Number.isInteger(start) || !Number.isInteger(end)) {
+ throw new Error(`Invalid value in ${kind} field`);
+ }
+ if (start < min || end > max || start > end) {
+ throw new Error(`Value out of range in ${kind} field`);
+ }
+
+ for (let value = start; value <= end; value += step) {
+ // Sunday can be written as 7; cron treats it as 0.
+ values.add(kind === "dayOfWeek" && value === 7 ? 0 : value);
+ }
+ }
+
+ return values;
+}
+
+export function parseCron(expression: string): CronFields {
+ const fields = expression.trim().split(/\s+/);
+ if (fields.length !== 5) {
+ throw new Error("A cron expression needs five fields");
+ }
+
+ const [minute, hour, dayOfMonth, month, dayOfWeek] = fields;
+ return {
+ minutes: parseField(minute, "minute"),
+ hours: parseField(hour, "hour"),
+ daysOfMonth: parseField(dayOfMonth, "dayOfMonth"),
+ months: parseField(month, "month"),
+ daysOfWeek: parseField(dayOfWeek, "dayOfWeek"),
+ domRestricted: dayOfMonth.trim() !== "*",
+ dowRestricted: dayOfWeek.trim() !== "*",
+ };
+}
+
+export function isValidCron(expression: string): boolean {
+ try {
+ parseCron(expression);
+ return true;
+ } catch {
+ return false;
+ }
+}
+
+/** Wall-clock fields for a moment, in a given zone or server local time. */
+interface WallClock {
+ minute: number;
+ hour: number;
+ dayOfMonth: number;
+ month: number;
+ dayOfWeek: number;
+}
+
+const WEEKDAYS: Record = {
+ Sun: 0,
+ Mon: 1,
+ Tue: 2,
+ Wed: 3,
+ Thu: 4,
+ Fri: 5,
+ Sat: 6,
+};
+
+const formatterCache = new Map();
+
+/**
+ * Whether a zone name is one this runtime actually knows. An unknown zone
+ * falls back to server local time rather than throwing, so a bad value saved
+ * against a schedule cannot stop it from ever running.
+ */
+export function isValidTimezone(timezone: string): boolean {
+ try {
+ new Intl.DateTimeFormat("en-US", { timeZone: timezone });
+ return true;
+ } catch {
+ return false;
+ }
+}
+
+function formatterFor(timezone: string): Intl.DateTimeFormat | null {
+ const cached = formatterCache.get(timezone);
+ if (cached) return cached;
+
+ try {
+ const formatter = new Intl.DateTimeFormat("en-US", {
+ timeZone: timezone,
+ hour12: false,
+ weekday: "short",
+ month: "numeric",
+ day: "numeric",
+ hour: "numeric",
+ minute: "numeric",
+ });
+ formatterCache.set(timezone, formatter);
+ return formatter;
+ } catch {
+ return null;
+ }
+}
+
+function wallClock(date: Date, timezone?: string | null): WallClock {
+ const formatter = timezone ? formatterFor(timezone) : null;
+ if (!formatter) {
+ return {
+ minute: date.getMinutes(),
+ hour: date.getHours(),
+ dayOfMonth: date.getDate(),
+ month: date.getMonth() + 1,
+ dayOfWeek: date.getDay(),
+ };
+ }
+
+ const parts: Record = {};
+ for (const part of formatter.formatToParts(date)) {
+ parts[part.type] = part.value;
+ }
+
+ return {
+ // Midnight formats as 24 in some locales' hour-cycle handling.
+ minute: Number(parts.minute),
+ hour: Number(parts.hour) % 24,
+ dayOfMonth: Number(parts.day),
+ month: Number(parts.month),
+ dayOfWeek: WEEKDAYS[parts.weekday] ?? date.getDay(),
+ };
+}
+
+function matches(
+ fields: CronFields,
+ date: Date,
+ timezone?: string | null,
+): boolean {
+ const clock = wallClock(date, timezone);
+ if (!fields.months.has(clock.month)) return false;
+ if (!fields.minutes.has(clock.minute)) return false;
+ if (!fields.hours.has(clock.hour)) return false;
+
+ const domMatch = fields.daysOfMonth.has(clock.dayOfMonth);
+ const dowMatch = fields.daysOfWeek.has(clock.dayOfWeek);
+
+ // Both restricted means either may match, which is how cron behaves.
+ if (fields.domRestricted && fields.dowRestricted) return domMatch || dowMatch;
+ if (fields.domRestricted) return domMatch;
+ if (fields.dowRestricted) return dowMatch;
+ return true;
+}
+
+/**
+ * The next time on or after `from` that the expression matches, or null when
+ * nothing matches within a four year window (e.g. Feb 30).
+ */
+export function nextCronRun(
+ expression: string,
+ from: Date = new Date(),
+ timezone?: string | null,
+): Date | null {
+ const fields = parseCron(expression);
+
+ const candidate = new Date(from.getTime());
+ candidate.setSeconds(0, 0);
+ candidate.setMinutes(candidate.getMinutes() + 1);
+
+ // Four years covers every leap year cycle, so a date that never matches
+ // gives up rather than looping.
+ const limit = 366 * 4 * 24 * 60;
+ for (let i = 0; i < limit; i++) {
+ if (matches(fields, candidate, timezone)) return candidate;
+ candidate.setMinutes(candidate.getMinutes() + 1);
+ }
+ return null;
+}
+
+/**
+ * Next due time for a schedule trigger, as an ISO string. Interval wins over
+ * cron when both are set, matching the editor which offers one or the other.
+ */
+export function computeNextDueAt(
+ schedule: {
+ cron?: string | null;
+ intervalSeconds?: number | null;
+ timezone?: string | null;
+ },
+ from: Date = new Date(),
+): string | null {
+ if (schedule.intervalSeconds && schedule.intervalSeconds > 0) {
+ return new Date(
+ from.getTime() + schedule.intervalSeconds * 1000,
+ ).toISOString();
+ }
+ if (schedule.cron) {
+ const next = nextCronRun(schedule.cron, from, schedule.timezone);
+ return next ? next.toISOString() : null;
+ }
+ return null;
+}
diff --git a/src/backend/automations/docker-watcher.ts b/src/backend/automations/docker-watcher.ts
new file mode 100644
index 0000000..1626faa
--- /dev/null
+++ b/src/backend/automations/docker-watcher.ts
@@ -0,0 +1,238 @@
+import type { AutomationDefinition } from "../../types/automations.js";
+import { createCurrentAutomationRepository } from "../database/repositories/factory.js";
+import { resolveHostById } from "../hosts/host-resolver.js";
+import { DataCrypto } from "../utils/data-crypto.js";
+import { execCommand } from "../hosts/metrics/widgets/common-utils.js";
+import {
+ createFleetSshFactory,
+ getFleetPoolKey,
+} from "../hosts/ssh-client-factory.js";
+import { withConnection } from "../hosts/ssh-connection-pool.js";
+import { statsLogger } from "../utils/logger.js";
+import { onDockerEvent } from "./triggers.js";
+
+/**
+ * Container state polling for docker_event triggers.
+ *
+ * Everything else Docker-related in the backend hangs off an interactive
+ * session that only exists while somebody has the UI open, so a trigger built
+ * on it would only ever fire while being watched. This polls over the same
+ * pooled SSH connection the other automation steps use, and only for hosts a
+ * docker_event trigger actually names, so an install with no such automation
+ * does no extra work at all.
+ *
+ * Events are derived by diffing successive snapshots: the poll interval is the
+ * resolution, so a container that stops and starts between two polls is not
+ * reported. That is the tradeoff for not holding a `docker events` stream open
+ * against every host.
+ */
+
+const POLL_INTERVAL_MS = 60_000;
+const EXEC_TIMEOUT_MS = 15_000;
+
+interface ContainerState {
+ /** Docker's own state word: running, exited, restarting, ... */
+ state: string;
+ /** Health from the status text, when the image declares a healthcheck. */
+ unhealthy: boolean;
+}
+
+/** Last snapshot per host, so transitions can be spotted. */
+const snapshots = new Map>();
+const lastPolledAt = new Map();
+
+/** Hosts named by an enabled docker_event trigger, with the owning user. */
+export async function listDockerWatchedHosts(): Promise> {
+ const watched = new Map();
+
+ try {
+ const rows = await createCurrentAutomationRepository().listAllEnabled();
+ for (const row of rows) {
+ let definition: AutomationDefinition;
+ try {
+ definition = JSON.parse(row.definition) as AutomationDefinition;
+ } catch {
+ continue;
+ }
+
+ const trigger = definition.trigger;
+ if (trigger?.kind !== "docker_event") continue;
+
+ const selector = trigger.hostSelector;
+ if (selector?.kind === "host") {
+ watched.set(selector.hostId, row.userId);
+ } else if (selector?.kind === "hosts") {
+ for (const hostId of selector.hostIds) watched.set(hostId, row.userId);
+ }
+ // Fleet and "all" selectors are deliberately not expanded: polling every
+ // host a user owns for container state is far too costly to do blindly.
+ }
+ } catch {
+ return watched;
+ }
+
+ return watched;
+}
+
+/**
+ * Parses `docker ps -a` output. One JSON object per line, matching the format
+ * string the container routes use.
+ */
+export function parseContainerStates(
+ output: string,
+): Map {
+ const states = new Map();
+
+ for (const line of output.split("\n")) {
+ const trimmed = line.trim();
+ if (!trimmed) continue;
+
+ try {
+ const parsed = JSON.parse(trimmed) as {
+ name?: string;
+ state?: string;
+ status?: string;
+ };
+ if (!parsed.name) continue;
+
+ states.set(parsed.name, {
+ state: (parsed.state ?? "").toLowerCase(),
+ unhealthy: /\(unhealthy\)/i.test(parsed.status ?? ""),
+ });
+ } catch {
+ // A partial line is not worth failing the whole poll over.
+ }
+ }
+
+ return states;
+}
+
+/**
+ * Works out which events a pair of snapshots implies.
+ *
+ * A container missing from the previous snapshot is treated as newly seen
+ * rather than started, so the first poll after a restart does not replay every
+ * running container as a fresh start event.
+ */
+export function diffContainerStates(
+ previous: Map,
+ current: Map,
+): Array<{ container: string; event: DockerEventName }> {
+ const events: Array<{ container: string; event: DockerEventName }> = [];
+
+ for (const [name, now] of current) {
+ const before = previous.get(name);
+ if (!before) continue;
+
+ if (before.state !== now.state) {
+ if (now.state === "exited")
+ events.push({ container: name, event: "exited" });
+ else if (now.state === "running")
+ events.push({ container: name, event: "started" });
+ else if (now.state === "restarting")
+ events.push({ container: name, event: "restarting" });
+ }
+
+ // Health is independent of state: a container can go unhealthy while it
+ // stays up, which is exactly the case worth alerting on.
+ if (!before.unhealthy && now.unhealthy) {
+ events.push({ container: name, event: "unhealthy" });
+ }
+ }
+
+ return events;
+}
+
+export type DockerEventName = "exited" | "started" | "unhealthy" | "restarting";
+
+const PS_FORMAT = `'{"name":"{{.Names}}","state":"{{.State}}","status":"{{.Status}}"}'`;
+
+async function pollHost(hostId: number, userId: string): Promise {
+ const host = await resolveHostById(hostId, userId);
+ if (!host) {
+ snapshots.delete(hostId);
+ return;
+ }
+
+ const result = await withConnection(
+ getFleetPoolKey(host as never),
+ createFleetSshFactory(host as never),
+ (client) =>
+ execCommand(
+ client,
+ `docker ps -a --format ${PS_FORMAT}`,
+ EXEC_TIMEOUT_MS,
+ ),
+ );
+
+ if (result.code !== 0 && result.code !== null) {
+ // Docker missing or not permitted on this host. Drop the snapshot so a
+ // later success is treated as a first observation rather than a diff.
+ snapshots.delete(hostId);
+ return;
+ }
+
+ const current = parseContainerStates(result.stdout);
+ const previous = snapshots.get(hostId);
+ snapshots.set(hostId, current);
+
+ if (!previous) return;
+
+ for (const { container, event } of diffContainerStates(previous, current)) {
+ await onDockerEvent({
+ hostId,
+ ownerUserId: userId,
+ container,
+ event,
+ }).catch(() => undefined);
+ }
+}
+
+/**
+ * Polls every watched host whose interval has elapsed. Called from the
+ * automation scheduler tick rather than owning a timer of its own.
+ */
+export async function pollDockerEvents(
+ now: number = Date.now(),
+): Promise {
+ const watched = await listDockerWatchedHosts();
+
+ for (const hostId of [...snapshots.keys()]) {
+ if (!watched.has(hostId)) {
+ snapshots.delete(hostId);
+ lastPolledAt.delete(hostId);
+ }
+ }
+
+ for (const [hostId, userId] of watched) {
+ const last = lastPolledAt.get(hostId) ?? 0;
+ if (now - last < POLL_INTERVAL_MS) continue;
+ // Host credentials cannot be decrypted while the owner's key is locked.
+ if (!canAccess(userId)) continue;
+ lastPolledAt.set(hostId, now);
+
+ try {
+ await pollHost(hostId, userId);
+ } catch (error) {
+ statsLogger.warn("Docker event poll failed", {
+ operation: "automation_docker_poll_error",
+ hostId,
+ error: error instanceof Error ? error.message : String(error),
+ });
+ }
+ }
+}
+
+function canAccess(userId: string): boolean {
+ try {
+ return DataCrypto.canUserAccessData(userId);
+ } catch {
+ return false;
+ }
+}
+
+/** Clears cached state, for shutdown and tests. */
+export function resetDockerWatcher(): void {
+ snapshots.clear();
+ lastPolledAt.clear();
+}
diff --git a/src/backend/automations/engine.ts b/src/backend/automations/engine.ts
new file mode 100644
index 0000000..813a2cf
--- /dev/null
+++ b/src/backend/automations/engine.ts
@@ -0,0 +1,422 @@
+import type {
+ AutomationDefinition,
+ RunStatus,
+ Step,
+} from "../../types/automations.js";
+import {
+ DEFAULT_MAX_RUN_SECONDS,
+ MAX_AUTOMATION_DEPTH,
+ MAX_STEP_OUTPUT_BYTES,
+} from "../../types/automations.js";
+import { createCurrentAutomationRepository } from "../database/repositories/factory.js";
+import { statsLogger } from "../utils/logger.js";
+import { executeStep } from "./actions/index.js";
+import type { StepExecutionContext, StepResult } from "./actions/types.js";
+import { compare } from "./conditions.js";
+import { renderTemplate, type TemplateContext } from "./template.js";
+
+export interface RunRequest {
+ automationId: number;
+ triggerType: string;
+ triggerContext?: Record;
+ triggerHostId?: number;
+ /** Overrides the automation's own dry-run flag, for "test run". */
+ dryRun?: boolean;
+ parentRunId?: number;
+ ancestry?: number[];
+ depth?: number;
+}
+
+export interface RunOutcome {
+ runId: number | null;
+ status: RunStatus;
+ error?: string;
+}
+
+/**
+ * Executes automations.
+ *
+ * Both HTTP handlers and the metrics hooks live in this same process, so this
+ * is a plain singleton rather than anything cross-process. State that has to
+ * survive a restart (cooldowns, dwell windows) lives in the database; the only
+ * thing held in memory is the set of runs currently in flight, which is
+ * meaningless after a restart anyway.
+ */
+export class AutomationEngine {
+ private static instance: AutomationEngine;
+
+ private readonly running = new Set();
+ private readonly queued = new Map();
+
+ static getInstance(): AutomationEngine {
+ if (!AutomationEngine.instance) {
+ AutomationEngine.instance = new AutomationEngine();
+ }
+ return AutomationEngine.instance;
+ }
+
+ isRunning(automationId: number): boolean {
+ return this.running.has(automationId);
+ }
+
+ async run(request: RunRequest): Promise {
+ const repository = createCurrentAutomationRepository();
+ const automation = await repository.findById(request.automationId);
+
+ if (!automation) {
+ return { runId: null, status: "failed", error: "Automation not found" };
+ }
+
+ const depth = request.depth ?? 0;
+ const ancestry = request.ancestry ?? [];
+
+ // Refuse recursion before anything is recorded, so a cycle cannot spin.
+ if (depth > MAX_AUTOMATION_DEPTH) {
+ return {
+ runId: null,
+ status: "failed",
+ error: `Maximum automation depth of ${MAX_AUTOMATION_DEPTH} exceeded`,
+ };
+ }
+ if (ancestry.includes(automation.id)) {
+ return {
+ runId: null,
+ status: "failed",
+ error: `Automation ${automation.id} is already running in this chain`,
+ };
+ }
+
+ let definition: AutomationDefinition;
+ try {
+ definition = JSON.parse(automation.definition) as AutomationDefinition;
+ } catch {
+ return {
+ runId: null,
+ status: "failed",
+ error: "Automation definition is not valid JSON",
+ };
+ }
+
+ // A second trigger while a run is in flight is recorded as skipped rather
+ // than dropped silently, so the history explains what happened.
+ //
+ // The slot has to be claimed in the same tick as the check. It used to be
+ // claimed several awaits later, so two triggers arriving together both
+ // passed this test and both ran.
+ let claimed = false;
+ if (this.running.has(automation.id)) {
+ const policy = automation.concurrencyPolicy;
+ if (policy === "skip") {
+ const run = await repository.createRun({
+ automationId: automation.id,
+ userId: automation.userId,
+ triggerType: request.triggerType,
+ triggerContext: JSON.stringify(request.triggerContext ?? {}),
+ status: "skipped",
+ });
+ await repository.finishRun(run.id, {
+ status: "skipped",
+ error: "A previous run was still in progress",
+ durationMs: 0,
+ });
+ return { runId: run.id, status: "skipped" };
+ }
+ if (policy === "queue") {
+ const depthNow = this.queued.get(automation.id) ?? 0;
+ if (depthNow >= 5) {
+ return { runId: null, status: "skipped", error: "Queue is full" };
+ }
+ this.queued.set(automation.id, depthNow + 1);
+ try {
+ await this.waitUntilFree(automation.id);
+ } finally {
+ this.queued.set(
+ automation.id,
+ (this.queued.get(automation.id) ?? 1) - 1,
+ );
+ }
+ // waitUntilFree gives up on its own deadline, so the slot may still be
+ // taken. Only claim it when it is genuinely free.
+ if (!this.running.has(automation.id)) {
+ this.running.add(automation.id);
+ claimed = true;
+ }
+ }
+ } else {
+ this.running.add(automation.id);
+ claimed = true;
+ }
+
+ const dryRun = request.dryRun ?? automation.dryRun;
+ const maxRunSeconds = automation.maxRunSeconds || DEFAULT_MAX_RUN_SECONDS;
+ const startedAt = Date.now();
+
+ let run: { id: number };
+ try {
+ run = await repository.createRun({
+ automationId: automation.id,
+ userId: automation.userId,
+ triggerType: request.triggerType,
+ triggerContext: JSON.stringify(request.triggerContext ?? {}),
+ status: "running",
+ dryRun,
+ parentRunId: request.parentRunId ?? null,
+ });
+ } catch (err) {
+ // The slot is already claimed at this point, so it has to be given back
+ // here; the finally below is only reached once a run row exists.
+ if (claimed) this.running.delete(automation.id);
+ return {
+ runId: null,
+ status: "failed",
+ error: err instanceof Error ? err.message : String(err),
+ };
+ }
+
+ if (!claimed) this.running.add(automation.id);
+
+ const template: TemplateContext = {
+ trigger: request.triggerContext ?? {},
+ steps: {},
+ vars: {},
+ run: {
+ id: run.id,
+ automationId: automation.id,
+ startedAt: new Date(startedAt).toISOString(),
+ },
+ };
+
+ const context: StepExecutionContext = {
+ userId: automation.userId,
+ automationId: automation.id,
+ runId: run.id,
+ dryRun,
+ template,
+ triggerHostId: request.triggerHostId,
+ ancestry: [...ancestry, automation.id],
+ depth,
+ deadlineAt: startedAt + maxRunSeconds * 1000,
+ };
+
+ let status: RunStatus = "success";
+ let error: string | undefined;
+
+ try {
+ const result = await this.runSteps(definition.steps ?? [], context, {
+ index: 0,
+ });
+ if (result.halted?.status === "failed") {
+ status = "failed";
+ error = "Stopped by a stop step";
+ } else if (result.failed) {
+ status = "failed";
+ error = result.error;
+ }
+ if (Date.now() >= context.deadlineAt) {
+ status = "timeout";
+ error = `Run exceeded ${maxRunSeconds}s`;
+ }
+ } catch (err) {
+ status = "failed";
+ error = err instanceof Error ? err.message : String(err);
+ } finally {
+ this.running.delete(automation.id);
+ }
+
+ await repository.finishRun(run.id, {
+ status,
+ error: error ?? null,
+ durationMs: Date.now() - startedAt,
+ });
+
+ if (status === "failed") {
+ statsLogger.warn(`Automation "${automation.name}" failed`, {
+ operation: "automation_run_failed",
+ automationId: automation.id,
+ runId: run.id,
+ error,
+ });
+
+ // An automation_failed handler that itself fails must not re-announce
+ // its own failure, so the event is not emitted for runs that this event
+ // already started.
+ if (request.triggerType !== "internal_event") {
+ import("../hosts/metrics/automation-bridge.js")
+ .then(({ notifyAutomationInternalEvent }) =>
+ notifyAutomationInternalEvent(
+ "automation_failed",
+ automation.userId,
+ undefined,
+ {
+ automationId: automation.id,
+ automationName: automation.name,
+ runId: run.id,
+ error: error ?? null,
+ },
+ ),
+ )
+ .catch(() => undefined);
+ }
+ }
+
+ return { runId: run.id, status, error };
+ }
+
+ /**
+ * Runs a list of steps in order, descending into if/else. Returns as soon as
+ * a stop step halts the run or a failing step's policy says to stop.
+ */
+ private async runSteps(
+ steps: Step[],
+ context: StepExecutionContext,
+ cursor: { index: number },
+ ): Promise<{
+ failed: boolean;
+ error?: string;
+ halted?: { status: "success" | "failed" };
+ }> {
+ const repository = createCurrentAutomationRepository();
+
+ for (const step of steps) {
+ if (step.enabled === false) continue;
+
+ if (Date.now() >= context.deadlineAt) {
+ return { failed: true, error: "Run deadline exceeded" };
+ }
+
+ const stepIndex = cursor.index++;
+
+ if (step.type === "if") {
+ const left = renderTemplate(step.condition.left, context.template);
+ const right = renderTemplate(
+ step.condition.right ?? "",
+ context.template,
+ );
+ const matched = compare(left, step.condition.operator, right);
+
+ const rowId = await repository.createRunStep({
+ runId: context.runId,
+ stepIndex,
+ stepId: step.id,
+ stepType: "if",
+ status: "running",
+ });
+ await repository.finishRunStep(rowId, {
+ status: "success",
+ output: `Condition ${matched ? "matched" : "did not match"}: ${left} ${step.condition.operator} ${right}`,
+ });
+
+ const branch = matched ? step.then : (step.else ?? []);
+ const result = await this.runSteps(branch, context, cursor);
+ if (result.halted) return result;
+ if (result.failed) return result;
+ continue;
+ }
+
+ if (step.type === "run_automation") {
+ const rowId = await repository.createRunStep({
+ runId: context.runId,
+ stepIndex,
+ stepId: step.id,
+ stepType: step.type,
+ status: "running",
+ });
+
+ const nested = await this.run({
+ automationId: step.automationId,
+ triggerType: "run_automation",
+ triggerContext: { parentAutomationId: context.automationId },
+ triggerHostId: context.triggerHostId,
+ dryRun: context.dryRun,
+ parentRunId: context.runId,
+ ancestry: context.ancestry,
+ depth: context.depth + 1,
+ });
+
+ const nestedOk = nested.status === "success";
+ await repository.finishRunStep(rowId, {
+ status: nestedOk ? "success" : "failed",
+ output: `Nested run ${nested.runId ?? "not started"}: ${nested.status}`,
+ error: nested.error ?? null,
+ });
+
+ if (!nestedOk && (step.onError ?? "stop") === "stop") {
+ return { failed: true, error: nested.error ?? "Nested run failed" };
+ }
+ continue;
+ }
+
+ const rowId = await repository.createRunStep({
+ runId: context.runId,
+ stepIndex,
+ stepId: step.id,
+ stepType: step.type,
+ status: "running",
+ });
+
+ let result: StepResult;
+ try {
+ result = await executeStep(step, context);
+ } catch (err) {
+ result = {
+ success: false,
+ error: err instanceof Error ? err.message : String(err),
+ };
+ }
+
+ const { text, truncated } = truncate(result.output);
+ await repository.finishRunStep(rowId, {
+ status: result.success ? "success" : "failed",
+ output: text,
+ error: result.error ?? null,
+ truncated,
+ });
+
+ // Later steps read earlier output through {{steps..stdout}}.
+ context.template.steps = {
+ ...context.template.steps,
+ [step.id]: {
+ stdout: result.output ?? "",
+ code: result.success ? 0 : 1,
+ },
+ };
+ if (result.vars) {
+ context.template.vars = { ...context.template.vars, ...result.vars };
+ }
+
+ if (result.halt) return { failed: false, halted: result.halt };
+
+ if (!result.success) {
+ const policy = step.onError ?? "stop";
+ if (policy === "stop") {
+ return { failed: true, error: result.error };
+ }
+ }
+ }
+
+ return { failed: false };
+ }
+
+ private async waitUntilFree(automationId: number): Promise {
+ const started = Date.now();
+ while (this.running.has(automationId)) {
+ if (Date.now() - started > 60_000) return;
+ await new Promise((resolve) => setTimeout(resolve, 250));
+ }
+ }
+}
+
+/** Keeps a single step's output from bloating the database. */
+function truncate(output: string | undefined): {
+ text: string | null;
+ truncated: boolean;
+} {
+ if (!output) return { text: null, truncated: false };
+ if (Buffer.byteLength(output, "utf8") <= MAX_STEP_OUTPUT_BYTES) {
+ return { text: output, truncated: false };
+ }
+ return {
+ text: output.slice(0, MAX_STEP_OUTPUT_BYTES) + "\n... (truncated)",
+ truncated: true,
+ };
+}
diff --git a/src/backend/automations/headless-viewer.ts b/src/backend/automations/headless-viewer.ts
new file mode 100644
index 0000000..8123aff
--- /dev/null
+++ b/src/backend/automations/headless-viewer.ts
@@ -0,0 +1,105 @@
+import { statsLogger } from "../utils/logger.js";
+import { listAutomationWatchedHosts } from "./triggers.js";
+
+/**
+ * Keeps metric collection running for hosts an automation watches.
+ *
+ * Heavy metric collection is normally started by a UI viewer and stops when
+ * the last one leaves, which means threshold rules only ever evaluated while
+ * somebody had the host open. Automations register a synthetic viewer instead
+ * of bypassing that mechanism, so a real viewer arriving or leaving still
+ * behaves exactly as before.
+ *
+ * The catch is `cleanupInactiveViewers`, which drops any viewer whose
+ * heartbeat is older than 120s. Without the heartbeat below, headless polling
+ * would quietly stop two minutes after it started.
+ */
+
+export interface ViewerRegistry {
+ registerViewer(hostId: number, sessionId: string, userId: string): void;
+ unregisterViewer(hostId: number, sessionId: string): void;
+ updateHeartbeat(sessionId: string): boolean;
+}
+
+const SESSION_PREFIX = "automation:";
+
+let registry: ViewerRegistry | null = null;
+const registered = new Map();
+
+export function setViewerRegistry(next: ViewerRegistry | null): void {
+ registry = next;
+}
+
+export function automationSessionId(hostId: number): string {
+ return `${SESSION_PREFIX}${hostId}`;
+}
+
+/**
+ * Brings the set of synthetic viewers in line with what the enabled
+ * automations currently watch, and heartbeats the ones that stay.
+ */
+export async function reconcileHeadlessViewers(): Promise<{
+ added: number;
+ removed: number;
+ active: number;
+}> {
+ if (!registry) return { added: 0, removed: 0, active: 0 };
+
+ let watched: Map;
+ try {
+ watched = await listAutomationWatchedHosts();
+ } catch {
+ return { added: 0, removed: 0, active: registered.size };
+ }
+
+ let added = 0;
+ let removed = 0;
+
+ for (const [hostId, userId] of watched) {
+ const sessionId = automationSessionId(hostId);
+ if (registered.has(hostId)) {
+ // Refresh before the 120s reaper would take it.
+ registry.updateHeartbeat(sessionId);
+ continue;
+ }
+
+ try {
+ registry.registerViewer(hostId, sessionId, userId);
+ registered.set(hostId, userId);
+ added++;
+ } catch (error) {
+ statsLogger.warn("Could not start headless metrics for a host", {
+ operation: "automation_headless_register_error",
+ hostId,
+ error: error instanceof Error ? error.message : String(error),
+ });
+ }
+ }
+
+ for (const hostId of [...registered.keys()]) {
+ if (watched.has(hostId)) continue;
+ try {
+ registry.unregisterViewer(hostId, automationSessionId(hostId));
+ } catch {
+ // Already gone; drop it either way.
+ }
+ registered.delete(hostId);
+ removed++;
+ }
+
+ return { added, removed, active: registered.size };
+}
+
+/** Drops every synthetic viewer, for shutdown and tests. */
+export function releaseHeadlessViewers(): void {
+ if (registry) {
+ for (const hostId of registered.keys()) {
+ try {
+ registry.unregisterViewer(hostId, automationSessionId(hostId));
+ } catch {
+ // Nothing useful to do during teardown.
+ }
+ }
+ }
+ registered.clear();
+}
diff --git a/src/backend/automations/http.ts b/src/backend/automations/http.ts
new file mode 100644
index 0000000..db06951
--- /dev/null
+++ b/src/backend/automations/http.ts
@@ -0,0 +1,77 @@
+import { safeOutboundFetch } from "../utils/safe-outbound-fetch.js";
+
+/**
+ * Outbound HTTP for automation steps and notification channels.
+ *
+ * safeOutboundFetch refuses private and loopback addresses, which is the right
+ * default against SSRF but also blocks the self-hosted ntfy or Gotify sitting
+ * on a LAN that many installs actually use. Rather than weaken the guard
+ * globally, a destination can opt in explicitly; everything else about the
+ * guard (scheme, embedded credentials, no redirects) still applies.
+ */
+export interface AutomationFetchOptions {
+ method?: string;
+ headers?: Record;
+ body?: string;
+ allowPrivateNetwork?: boolean;
+ timeoutMs?: number;
+}
+
+export async function automationFetch(
+ url: string,
+ options: AutomationFetchOptions = {},
+): Promise {
+ const {
+ method = "GET",
+ headers,
+ body,
+ allowPrivateNetwork,
+ timeoutMs = 30_000,
+ } = options;
+
+ const controller = new AbortController();
+ const timer = setTimeout(() => controller.abort(), Math.max(timeoutMs, 1));
+
+ const init: RequestInit = {
+ method,
+ headers: body
+ ? { "Content-Type": "application/json", ...(headers ?? {}) }
+ : headers,
+ body,
+ signal: controller.signal,
+ };
+
+ try {
+ if (allowPrivateNetwork) {
+ return await privateNetworkFetch(url, init);
+ }
+ return await safeOutboundFetch(url, init);
+ } finally {
+ clearTimeout(timer);
+ }
+}
+
+/**
+ * The opt-in path. Keeps the parts of the guard that are always right and
+ * drops only the address blocklist.
+ */
+async function privateNetworkFetch(
+ rawUrl: string,
+ init: RequestInit,
+): Promise {
+ let parsed: URL;
+ try {
+ parsed = new URL(rawUrl);
+ } catch {
+ throw new Error("Invalid URL");
+ }
+
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
+ throw new Error("Only http and https URLs are allowed");
+ }
+ if (parsed.username || parsed.password) {
+ throw new Error("URLs with embedded credentials are not allowed");
+ }
+
+ return fetch(rawUrl, { ...init, redirect: "error" });
+}
diff --git a/src/backend/automations/notify.ts b/src/backend/automations/notify.ts
new file mode 100644
index 0000000..ce44625
--- /dev/null
+++ b/src/backend/automations/notify.ts
@@ -0,0 +1,183 @@
+import { statsLogger } from "../utils/logger.js";
+import { automationFetch } from "./http.js";
+import type { TemplateContext } from "./template.js";
+
+/**
+ * Notification delivery for automations.
+ *
+ * The alert engine special-cased Discord because its dispatcher only knew
+ * webhook and ntfy; here every transport goes through one switch, so adding a
+ * channel type is a single edit.
+ */
+export interface AutomationChannel {
+ id: number;
+ type: string;
+ config: string;
+}
+
+export interface AutomationNotification {
+ title: string;
+ body: string;
+ severity: "info" | "warning" | "critical";
+ context?: TemplateContext;
+}
+
+const NTFY_PRIORITY: Record = {
+ info: 2,
+ warning: 3,
+ critical: 5,
+};
+
+const NTFY_TAGS: Record = {
+ info: "information_source",
+ warning: "warning",
+ critical: "rotating_light",
+};
+
+const DISCORD_COLORS: Record = {
+ info: 3066993,
+ warning: 16753920,
+ critical: 15158332,
+};
+
+export async function sendAutomationNotification(
+ channel: AutomationChannel,
+ notification: AutomationNotification,
+): Promise {
+ let config: Record;
+ try {
+ config = JSON.parse(channel.config) as Record;
+ } catch {
+ throw new Error("Channel configuration is not valid JSON");
+ }
+
+ const allowPrivateNetwork = config.allowPrivateNetwork === true;
+
+ switch (channel.type) {
+ case "webhook":
+ return sendWebhook(config, notification, allowPrivateNetwork);
+ case "ntfy":
+ return sendNtfy(config, notification, allowPrivateNetwork);
+ case "discord":
+ return sendDiscord(config, notification, allowPrivateNetwork);
+ default:
+ throw new Error(`Unsupported channel type: ${channel.type}`);
+ }
+}
+
+function requireUrl(config: Record): string {
+ const url = typeof config.url === "string" ? config.url.trim() : "";
+ if (!url) throw new Error("Channel is missing a URL");
+ return url;
+}
+
+async function sendWebhook(
+ config: Record,
+ notification: AutomationNotification,
+ allowPrivateNetwork: boolean,
+): Promise {
+ const url = requireUrl(config);
+ const method = config.method === "PUT" ? "PUT" : "POST";
+ const headers =
+ config.headers && typeof config.headers === "object"
+ ? (config.headers as Record)
+ : {};
+
+ const response = await automationFetch(url, {
+ method,
+ headers,
+ body: JSON.stringify({
+ title: notification.title,
+ message: notification.body,
+ severity: notification.severity,
+ timestamp: new Date().toISOString(),
+ }),
+ allowPrivateNetwork,
+ });
+
+ if (!response.ok) {
+ throw new Error(`HTTP ${response.status} ${response.statusText}`);
+ }
+}
+
+async function sendNtfy(
+ config: Record,
+ notification: AutomationNotification,
+ allowPrivateNetwork: boolean,
+): Promise {
+ const base = requireUrl(config).replace(/\/$/, "");
+ const topic = typeof config.topic === "string" ? config.topic.trim() : "";
+ if (!topic) throw new Error("ntfy channel is missing a topic");
+
+ const headers: Record = {
+ Title: notification.title || "Termix automation",
+ Priority: String(NTFY_PRIORITY[notification.severity] ?? 3),
+ Tags: NTFY_TAGS[notification.severity] ?? "information_source",
+ };
+ if (typeof config.token === "string" && config.token) {
+ headers.Authorization = `Bearer ${config.token}`;
+ }
+
+ const response = await automationFetch(`${base}/${topic}`, {
+ method: "POST",
+ headers,
+ body: notification.body || notification.title,
+ allowPrivateNetwork,
+ });
+
+ if (!response.ok) {
+ throw new Error(`HTTP ${response.status} ${response.statusText}`);
+ }
+}
+
+async function sendDiscord(
+ config: Record,
+ notification: AutomationNotification,
+ allowPrivateNetwork: boolean,
+): Promise {
+ const url = requireUrl(config);
+ const payload: Record = {
+ embeds: [
+ {
+ title: notification.title || "Termix automation",
+ description: notification.body || undefined,
+ color: DISCORD_COLORS[notification.severity] ?? 3447003,
+ timestamp: new Date().toISOString(),
+ },
+ ],
+ };
+ if (typeof config.username === "string" && config.username) {
+ payload.username = config.username;
+ }
+ if (typeof config.avatar_url === "string" && config.avatar_url) {
+ payload.avatar_url = config.avatar_url;
+ }
+
+ const response = await automationFetch(url, {
+ method: "POST",
+ body: JSON.stringify(payload),
+ allowPrivateNetwork,
+ });
+
+ if (!response.ok) {
+ const detail = await response.text().catch(() => "");
+ throw new Error(
+ `HTTP ${response.status} ${response.statusText}${detail ? `: ${detail}` : ""}`,
+ );
+ }
+}
+
+/** Fire-and-forget wrapper for callers that must not block on delivery. */
+export function sendAutomationNotificationSafely(
+ channel: AutomationChannel,
+ notification: AutomationNotification,
+): void {
+ sendAutomationNotification(channel, notification).catch((error) => {
+ statsLogger.warn("Automation notification failed", {
+ operation: "automation_notification_error",
+ channelId: channel.id,
+ type: channel.type,
+ error: error instanceof Error ? error.message : String(error),
+ });
+ });
+}
diff --git a/src/backend/automations/scheduler.ts b/src/backend/automations/scheduler.ts
new file mode 100644
index 0000000..2b2cc94
--- /dev/null
+++ b/src/backend/automations/scheduler.ts
@@ -0,0 +1,207 @@
+import type { AutomationDefinition } from "../../types/automations.js";
+import { createCurrentAutomationRepository } from "../database/repositories/factory.js";
+import { DataCrypto } from "../utils/data-crypto.js";
+import { statsLogger } from "../utils/logger.js";
+import { computeNextDueAt } from "./cron.js";
+import { hasDwelled, isCoolingDown } from "./conditions.js";
+import { pollDockerEvents } from "./docker-watcher.js";
+import { AutomationEngine } from "./engine.js";
+import { reconcileHeadlessViewers } from "./headless-viewer.js";
+
+/**
+ * The one timer the automations feature owns.
+ *
+ * Every other periodic job in the backend is its own module-level setInterval;
+ * this deliberately is not one per automation. A single tick handles due
+ * schedules, dwell windows that need re-checking without a fresh sample, the
+ * synthetic viewer heartbeat, and history pruning.
+ */
+
+const TICK_MS = 15_000;
+const STARTUP_DELAY_MS = 30_000;
+const PRUNE_INTERVAL_MS = 24 * 60 * 60 * 1000;
+const RUN_RETENTION_DAYS = 30;
+/** A "running" row older than this belongs to a process that is gone. */
+const STALE_RUN_MS = 6 * 60 * 60 * 1000;
+
+let tickTimer: NodeJS.Timeout | null = null;
+let startupTimer: NodeJS.Timeout | null = null;
+let lastPruneAt = 0;
+let ticking = false;
+
+export function startAutomationScheduler(): void {
+ if (tickTimer) return;
+
+ startupTimer = setTimeout(() => {
+ void tick();
+ }, STARTUP_DELAY_MS);
+ startupTimer.unref?.();
+
+ tickTimer = setInterval(() => {
+ void tick();
+ }, TICK_MS);
+ tickTimer.unref?.();
+}
+
+export function stopAutomationScheduler(): void {
+ if (tickTimer) clearInterval(tickTimer);
+ if (startupTimer) clearTimeout(startupTimer);
+ tickTimer = null;
+ startupTimer = null;
+}
+
+/** Exposed for tests; the interval calls this. */
+export async function tick(now: Date = new Date()): Promise {
+ // A slow tick must not overlap the next one.
+ if (ticking) return;
+ ticking = true;
+
+ try {
+ await reconcileHeadlessViewers().catch(() => undefined);
+ await runDueSchedules(now);
+ await recheckOpenBreaches(now);
+ await pollDockerEvents(now.getTime()).catch(() => undefined);
+ await pruneIfDue(now);
+ } catch (error) {
+ statsLogger.warn("Automation scheduler tick failed", {
+ operation: "automation_scheduler_tick_error",
+ error: error instanceof Error ? error.message : String(error),
+ });
+ } finally {
+ ticking = false;
+ }
+}
+
+async function runDueSchedules(now: Date): Promise {
+ const repository = createCurrentAutomationRepository();
+ const due = await repository.listDueSchedules(now.toISOString());
+
+ for (const schedule of due) {
+ const automation = await repository.findById(schedule.automationId);
+ if (!automation) continue;
+
+ // Background work can only touch a user's data while their key resolves.
+ if (!canAccess(automation.userId)) {
+ statsLogger.warn("Skipping scheduled automation: data key unavailable", {
+ operation: "automation_schedule_locked",
+ automationId: automation.id,
+ });
+ continue;
+ }
+
+ const nextDueAt = computeNextDueAt(
+ {
+ cron: schedule.cron,
+ intervalSeconds: schedule.intervalSeconds,
+ timezone: schedule.timezone,
+ },
+ now,
+ );
+ await repository.markScheduleTicked(
+ schedule.automationId,
+ nextDueAt,
+ now.toISOString(),
+ );
+
+ AutomationEngine.getInstance()
+ .run({
+ automationId: schedule.automationId,
+ triggerType: "schedule",
+ triggerContext: { scheduledFor: now.toISOString() },
+ })
+ .catch((error) => {
+ statsLogger.warn("Scheduled automation failed to start", {
+ operation: "automation_schedule_error",
+ automationId: schedule.automationId,
+ error: error instanceof Error ? error.message : String(error),
+ });
+ });
+ }
+}
+
+/**
+ * Fires sustained breaches whose window has elapsed.
+ *
+ * Without this a dwell window only completes when another sample happens to
+ * arrive, so a breach that starts just before polling stops would never fire.
+ */
+async function recheckOpenBreaches(now: Date): Promise {
+ const repository = createCurrentAutomationRepository();
+ const open = await repository.listOpenBreaches();
+ const nowMs = now.getTime();
+
+ for (const state of open) {
+ const automation = await repository.findById(state.automationId);
+ if (!automation || !automation.enabled) continue;
+ if (!canAccess(automation.userId)) continue;
+
+ let definition: AutomationDefinition;
+ try {
+ definition = JSON.parse(automation.definition) as AutomationDefinition;
+ } catch {
+ continue;
+ }
+
+ const trigger = definition.trigger;
+ if (trigger?.kind !== "metric_threshold") continue;
+ if (!trigger.forSeconds) continue;
+ if (!hasDwelled(state.breachStartedAt, trigger.forSeconds, nowMs)) continue;
+ if (isCoolingDown(state.lastFiredAt, trigger.cooldownMinutes, nowMs)) {
+ continue;
+ }
+
+ const hostId = Number(state.stateKey.split(":")[0]);
+ await repository.upsertTriggerState({
+ automationId: automation.id,
+ stateKey: state.stateKey,
+ lastFiredAt: now.toISOString(),
+ });
+
+ AutomationEngine.getInstance()
+ .run({
+ automationId: automation.id,
+ triggerType: "metric_threshold",
+ triggerContext: {
+ hostId,
+ value: state.lastValue,
+ threshold: trigger.value,
+ metric: trigger.metric.path,
+ sustained: true,
+ },
+ triggerHostId: Number.isFinite(hostId) ? hostId : undefined,
+ })
+ .catch(() => undefined);
+ }
+}
+
+async function pruneIfDue(now: Date): Promise {
+ if (now.getTime() - lastPruneAt < PRUNE_INTERVAL_MS) return;
+ lastPruneAt = now.getTime();
+
+ const repository = createCurrentAutomationRepository();
+ try {
+ await repository.failStaleRunningRuns(
+ new Date(now.getTime() - STALE_RUN_MS).toISOString(),
+ );
+ const deleted = await repository.pruneRunsOlderThan(RUN_RETENTION_DAYS);
+ if (deleted > 0) {
+ statsLogger.info(`Pruned ${deleted} old automation run(s)`, {
+ operation: "automation_run_prune",
+ deleted,
+ });
+ }
+ } catch (error) {
+ statsLogger.warn("Automation run pruning failed", {
+ operation: "automation_run_prune_error",
+ error: error instanceof Error ? error.message : String(error),
+ });
+ }
+}
+
+function canAccess(userId: string): boolean {
+ try {
+ return DataCrypto.canUserAccessData(userId);
+ } catch {
+ return false;
+ }
+}
diff --git a/src/backend/automations/template.ts b/src/backend/automations/template.ts
new file mode 100644
index 0000000..9efc86a
--- /dev/null
+++ b/src/backend/automations/template.ts
@@ -0,0 +1,101 @@
+/**
+ * Variable substitution for automation steps.
+ *
+ * Templates read from the run context: {{host.name}}, {{trigger.value}},
+ * {{steps..stdout}}, {{vars.myVar}}. Resolution always produces a
+ * plain string and never shell syntax; callers that build a command are
+ * responsible for quoting the result (see shellSingleQuote in
+ * hosts/metrics/managers/exec-elevated.ts). Nothing here escapes anything,
+ * precisely so there is one obvious place where quoting happens.
+ */
+
+export interface TemplateContext {
+ host?: {
+ id?: number;
+ name?: string;
+ ip?: string;
+ username?: string;
+ port?: number;
+ };
+ trigger?: Record;
+ steps?: Record;
+ vars?: Record;
+ run?: { id?: number; automationId?: number; startedAt?: string };
+}
+
+const TOKEN = /\{\{\s*([a-zA-Z0-9_.-]+)\s*\}\}/g;
+
+function readPath(context: TemplateContext, path: string): unknown {
+ const parts = path.split(".");
+ let current: unknown = context;
+
+ for (const part of parts) {
+ if (current === null || current === undefined) return undefined;
+ if (typeof current !== "object") return undefined;
+ current = (current as Record)[part];
+ }
+ return current;
+}
+
+function stringify(value: unknown): string {
+ if (value === null || value === undefined) return "";
+ if (typeof value === "string") return value;
+ if (typeof value === "number" || typeof value === "boolean") {
+ return String(value);
+ }
+ return JSON.stringify(value);
+}
+
+/**
+ * Replaces every {{token}} it can resolve. An unresolvable token is left
+ * as-is so a typo shows up in the run output rather than silently becoming an
+ * empty string, which is the difference between a visible mistake and a
+ * command that quietly does the wrong thing.
+ */
+export function renderTemplate(
+ input: string,
+ context: TemplateContext,
+): string {
+ if (!input || !input.includes("{{")) return input;
+
+ return input.replace(TOKEN, (match, path: string) => {
+ const value = readPath(context, path);
+ return value === undefined ? match : stringify(value);
+ });
+}
+
+/** Renders every string in a flat record, leaving keys untouched. */
+export function renderRecord(
+ input: Record | undefined,
+ context: TemplateContext,
+): Record | undefined {
+ if (!input) return undefined;
+ const output: Record = {};
+ for (const [key, value] of Object.entries(input)) {
+ output[key] = renderTemplate(value, context);
+ }
+ return output;
+}
+
+/** True when a template still has unresolved tokens after rendering. */
+export function hasUnresolvedTokens(rendered: string): boolean {
+ TOKEN.lastIndex = 0;
+ return TOKEN.test(rendered);
+}
+
+const SECRET_KEY = /(authorization|token|password|secret|api[-_]?key|cookie)/i;
+
+/**
+ * Masks values whose key looks like a credential, for anything written to run
+ * history or returned by the API.
+ */
+export function redactSecrets(
+ input: Record | undefined,
+): Record | undefined {
+ if (!input) return undefined;
+ const output: Record = {};
+ for (const [key, value] of Object.entries(input)) {
+ output[key] = SECRET_KEY.test(key) ? "***" : value;
+ }
+ return output;
+}
diff --git a/src/backend/automations/triggers.ts b/src/backend/automations/triggers.ts
new file mode 100644
index 0000000..ed88f55
--- /dev/null
+++ b/src/backend/automations/triggers.ts
@@ -0,0 +1,387 @@
+import type {
+ AutomationDefinition,
+ HostSelector,
+ Trigger,
+} from "../../types/automations.js";
+import { createCurrentAutomationRepository } from "../database/repositories/factory.js";
+import type { AutomationEngineRow } from "../database/repositories/automation-repository.js";
+import { statsLogger } from "../utils/logger.js";
+import {
+ compare,
+ extractMetricValue,
+ hasDwelled,
+ isCoolingDown,
+ metricStateKey,
+ severityForValue,
+ type MetricsSnapshot,
+} from "./conditions.js";
+import { AutomationEngine } from "./engine.js";
+
+/**
+ * Matches events against automation triggers and decides what fires.
+ *
+ * Dwell windows and cooldowns live in automation_trigger_state rather than in
+ * memory, so a restart mid-breach neither loses the window nor re-fires an
+ * alert that already went out.
+ */
+
+export interface MetricEvent {
+ hostId: number;
+ ownerUserId: string;
+ metrics: MetricsSnapshot;
+}
+
+export interface StatusEvent {
+ hostId: number;
+ ownerUserId: string;
+ online: boolean;
+}
+
+export interface HealthEvent {
+ hostId: number;
+ userId: string;
+ checkId: string;
+ ok: boolean;
+ detail?: string;
+}
+
+export interface DockerEvent {
+ hostId: number;
+ ownerUserId: string;
+ container: string;
+ event: "exited" | "started" | "unhealthy" | "restarting";
+}
+
+export interface InternalEvent {
+ event: string;
+ userId: string;
+ hostId?: number;
+ details?: Record;
+}
+
+interface LoadedAutomation {
+ row: AutomationEngineRow;
+ definition: AutomationDefinition;
+}
+
+async function loadEnabledFor(userId: string): Promise {
+ try {
+ const rows =
+ await createCurrentAutomationRepository().listEnabledForUser(userId);
+ const loaded: LoadedAutomation[] = [];
+ for (const row of rows) {
+ try {
+ loaded.push({
+ row,
+ definition: JSON.parse(row.definition) as AutomationDefinition,
+ });
+ } catch {
+ // A malformed definition should not stop the others from evaluating.
+ }
+ }
+ return loaded;
+ } catch {
+ return [];
+ }
+}
+
+/** Whether a selector covers a host. Ownership is checked by the caller. */
+function selectorCoversHost(
+ selector: HostSelector | undefined,
+ hostId: number,
+): boolean {
+ if (!selector) return true;
+ switch (selector.kind) {
+ case "all":
+ case "trigger":
+ return true;
+ case "host":
+ return selector.hostId === hostId;
+ case "hosts":
+ return selector.hostIds.includes(hostId);
+ case "fleet":
+ // Fleet membership is resolved at execution time; evaluate optimistically
+ // so a fleet-scoped trigger still reaches the engine.
+ return true;
+ default:
+ return false;
+ }
+}
+
+async function fire(
+ automation: AutomationEngineRow,
+ stateKey: string,
+ triggerType: string,
+ triggerContext: Record,
+ hostId?: number,
+): Promise {
+ const repository = createCurrentAutomationRepository();
+ await repository.upsertTriggerState({
+ automationId: automation.id,
+ stateKey,
+ lastFiredAt: new Date().toISOString(),
+ });
+
+ AutomationEngine.getInstance()
+ .run({
+ automationId: automation.id,
+ triggerType,
+ triggerContext,
+ triggerHostId: hostId,
+ })
+ .catch((error) => {
+ statsLogger.warn("Automation run failed to start", {
+ operation: "automation_trigger_error",
+ automationId: automation.id,
+ error: error instanceof Error ? error.message : String(error),
+ });
+ });
+}
+
+/**
+ * Metric samples. Called for every polled host, including hosts polled only
+ * because an automation asked for them.
+ */
+export async function onMetrics(event: MetricEvent): Promise {
+ const automations = await loadEnabledFor(event.ownerUserId);
+ const repository = createCurrentAutomationRepository();
+ const now = Date.now();
+
+ for (const { row, definition } of automations) {
+ const trigger = definition.trigger;
+ if (trigger?.kind !== "metric_threshold") continue;
+ if (!selectorCoversHost(trigger.hostSelector, event.hostId)) continue;
+
+ const value = extractMetricValue(event.metrics, trigger.metric);
+ if (value === null) continue;
+
+ const stateKey = metricStateKey(event.hostId, trigger.metric);
+ const state = await repository.getTriggerState(row.id, stateKey);
+ const breaching = compare(value, trigger.operator, trigger.value);
+
+ if (!breaching) {
+ if (state?.breachStartedAt) {
+ await repository.clearBreach(row.id, stateKey);
+ }
+ continue;
+ }
+
+ // Open the dwell window on the first breaching sample.
+ if (!state?.breachStartedAt) {
+ await repository.upsertTriggerState({
+ automationId: row.id,
+ stateKey,
+ breachStartedAt: new Date(now).toISOString(),
+ lastValue: value,
+ });
+ if (trigger.forSeconds) continue;
+ }
+
+ const breachStartedAt =
+ state?.breachStartedAt ?? new Date(now).toISOString();
+ if (!hasDwelled(breachStartedAt, trigger.forSeconds, now)) continue;
+ if (isCoolingDown(state?.lastFiredAt, trigger.cooldownMinutes, now))
+ continue;
+
+ await fire(
+ row,
+ stateKey,
+ "metric_threshold",
+ {
+ hostId: event.hostId,
+ value,
+ threshold: trigger.value,
+ operator: trigger.operator,
+ metric: trigger.metric.path,
+ mount: "mount" in trigger.metric ? trigger.metric.mount : undefined,
+ severity: severityForValue(value, trigger.severity),
+ },
+ event.hostId,
+ );
+ }
+}
+
+/** Host reachability transitions. Only edges fire, never steady state. */
+export async function onStatus(event: StatusEvent): Promise {
+ const automations = await loadEnabledFor(event.ownerUserId);
+ const repository = createCurrentAutomationRepository();
+ const now = Date.now();
+ const observed = event.online ? "online" : "offline";
+
+ for (const { row, definition } of automations) {
+ const trigger = definition.trigger;
+ if (trigger?.kind !== "host_status") continue;
+ if (!selectorCoversHost(trigger.hostSelector, event.hostId)) continue;
+
+ const stateKey = String(event.hostId);
+ const state = await repository.getTriggerState(row.id, stateKey);
+
+ if (state?.lastObservedState === observed) continue;
+
+ await repository.upsertTriggerState({
+ automationId: row.id,
+ stateKey,
+ lastObservedState: observed,
+ });
+
+ // The first observation establishes a baseline rather than firing, so a
+ // restart does not announce every host as though it just changed.
+ if (!state?.lastObservedState) continue;
+ if (trigger.to !== observed) continue;
+ if (isCoolingDown(state?.lastFiredAt, trigger.cooldownMinutes, now))
+ continue;
+
+ await fire(
+ row,
+ stateKey,
+ "host_status",
+ { hostId: event.hostId, status: observed },
+ event.hostId,
+ );
+ }
+}
+
+export async function onHealthCheck(event: HealthEvent): Promise {
+ const automations = await loadEnabledFor(event.userId);
+ const repository = createCurrentAutomationRepository();
+ const now = Date.now();
+ const observed = event.ok ? "recovered" : "failing";
+
+ for (const { row, definition } of automations) {
+ const trigger = definition.trigger;
+ if (trigger?.kind !== "health_check") continue;
+ if (!selectorCoversHost(trigger.hostSelector, event.hostId)) continue;
+ if (trigger.checkId && trigger.checkId !== event.checkId) continue;
+
+ const stateKey = `${event.hostId}:${event.checkId}`;
+ const state = await repository.getTriggerState(row.id, stateKey);
+
+ if (state?.lastObservedState === observed) continue;
+
+ await repository.upsertTriggerState({
+ automationId: row.id,
+ stateKey,
+ lastObservedState: observed,
+ });
+
+ if (!state?.lastObservedState) continue;
+ if (trigger.to !== observed) continue;
+ if (isCoolingDown(state?.lastFiredAt, trigger.cooldownMinutes, now))
+ continue;
+
+ await fire(
+ row,
+ stateKey,
+ "health_check",
+ {
+ hostId: event.hostId,
+ checkId: event.checkId,
+ state: observed,
+ detail: event.detail,
+ },
+ event.hostId,
+ );
+ }
+}
+
+export async function onDockerEvent(event: DockerEvent): Promise {
+ const automations = await loadEnabledFor(event.ownerUserId);
+ const repository = createCurrentAutomationRepository();
+ const now = Date.now();
+
+ for (const { row, definition } of automations) {
+ const trigger = definition.trigger;
+ if (trigger?.kind !== "docker_event") continue;
+ if (!selectorCoversHost(trigger.hostSelector, event.hostId)) continue;
+ if (trigger.container && trigger.container !== event.container) continue;
+ if (trigger.event !== event.event) continue;
+
+ const stateKey = `${event.hostId}:${event.container}`;
+ const state = await repository.getTriggerState(row.id, stateKey);
+ if (isCoolingDown(state?.lastFiredAt, trigger.cooldownMinutes, now))
+ continue;
+
+ await fire(
+ row,
+ stateKey,
+ "docker_event",
+ {
+ hostId: event.hostId,
+ container: event.container,
+ event: event.event,
+ },
+ event.hostId,
+ );
+ }
+}
+
+export async function onInternalEvent(event: InternalEvent): Promise {
+ const automations = await loadEnabledFor(event.userId);
+ const repository = createCurrentAutomationRepository();
+ const now = Date.now();
+
+ for (const { row, definition } of automations) {
+ const trigger = definition.trigger;
+ if (trigger?.kind !== "internal_event") continue;
+ if (trigger.event !== event.event) continue;
+ if (
+ event.hostId !== undefined &&
+ !selectorCoversHost(trigger.hostSelector, event.hostId)
+ ) {
+ continue;
+ }
+
+ const stateKey = event.hostId ? String(event.hostId) : "global";
+ const state = await repository.getTriggerState(row.id, stateKey);
+ if (isCoolingDown(state?.lastFiredAt, trigger.cooldownMinutes, now))
+ continue;
+
+ await fire(
+ row,
+ stateKey,
+ "internal_event",
+ { event: event.event, hostId: event.hostId, ...(event.details ?? {}) },
+ event.hostId,
+ );
+ }
+}
+
+/**
+ * Hosts that an enabled automation watches, so the poller knows to collect
+ * metrics for them even when nobody is looking.
+ */
+export async function listAutomationWatchedHosts(): Promise<
+ Map
+> {
+ const watched = new Map();
+
+ try {
+ const rows = await createCurrentAutomationRepository().listAllEnabled();
+ for (const row of rows) {
+ let definition: AutomationDefinition;
+ try {
+ definition = JSON.parse(row.definition) as AutomationDefinition;
+ } catch {
+ continue;
+ }
+
+ const trigger: Trigger | undefined = definition.trigger;
+ // Only metric thresholds need heavy collection; status triggers are
+ // already served by the cheap reachability probe.
+ if (trigger?.kind !== "metric_threshold") continue;
+
+ const selector = trigger.hostSelector;
+ if (selector?.kind === "host") {
+ watched.set(selector.hostId, row.userId);
+ } else if (selector?.kind === "hosts") {
+ for (const hostId of selector.hostIds) watched.set(hostId, row.userId);
+ }
+ // Fleet and "all" selectors are resolved by the scheduler, which can
+ // expand them without blocking this call.
+ }
+ } catch {
+ return watched;
+ }
+
+ return watched;
+}
diff --git a/src/backend/database/database.ts b/src/backend/database/database.ts
index 66914a1..efec183 100644
--- a/src/backend/database/database.ts
+++ b/src/backend/database/database.ts
@@ -1,5 +1,7 @@
+import { getErrorMessage } from "../utils/error-message.js";
import express from "express";
import http from "http";
+import https from "https";
import bodyParser from "body-parser";
import multer from "multer";
import cookieParser from "cookie-parser";
@@ -8,21 +10,31 @@ import hostRoutes from "./routes/host.js";
import alertRoutes from "./routes/alerts.js";
import credentialsRoutes from "./routes/credentials.js";
import snippetsRoutes from "./routes/snippets.js";
+import fleetRoutes from "./routes/fleet-routes.js";
+import workspaceRoutes from "./routes/workspaces.js";
import c2sTunnelPresetRoutes from "./routes/c2s-tunnel-presets.js";
import terminalRoutes from "./routes/terminal.js";
import sessionLogRoutes from "./routes/session-log-routes.js";
import guacamoleRoutes from "../hosts/guacamole/routes.js";
+import sessionSharingRoutes from "../hosts/session-sharing/routes.js";
import networkTopologyRoutes from "./routes/network-topology.js";
import rbacRoutes from "./routes/rbac.js";
import openTabsRoutes from "./routes/open-tabs.js";
import userPreferencesRoutes from "./routes/user-preferences.js";
+import hostSidebarPreferencesRoutes from "./routes/host-sidebar-preferences.js";
+import credentialSidebarPreferencesRoutes from "./routes/credential-sidebar-preferences.js";
+import uiPreferencesRoutes from "./routes/ui-preferences.js";
import proxmoxRoutes from "./routes/proxmox.js";
import termixIdRoutes from "./routes/termix-id.js";
import { registerAuditLogRoutes } from "./routes/audit-log-routes.js";
import { registerTailscaleRoutes } from "./routes/tailscale-routes.js";
import vaultRoutes from "./routes/vault.js";
import alertRulesRoutes from "./routes/alert-rules-routes.js";
+import aiRoutes from "../ai/index.js";
+import automationsRoutes from "./routes/automations.js";
+import syncRoutes from "./routes/sync.js";
import { createCorsMiddleware } from "../utils/cors-config.js";
+import { createCompressionMiddleware } from "../utils/compression-config.js";
import fs from "fs";
import path from "path";
import os from "os";
@@ -66,6 +78,7 @@ app.set("trust proxy", true);
const authManager = AuthManager.getInstance();
const authenticateJWT = authManager.createAuthMiddleware();
const requireAdmin = authManager.createAdminMiddleware();
+app.use(createCompressionMiddleware());
app.use(createCorsMiddleware());
type SettingData = {
@@ -480,7 +493,7 @@ app.get("/releases/rss", authenticateJWT, async (req, res) => {
});
res.status(500).json({
error: "Failed to generate RSS format",
- details: error instanceof Error ? error.message : "Unknown error",
+ details: getErrorMessage(error),
});
}
});
@@ -711,7 +724,7 @@ app.post("/database/export", authenticateJWT, async (req, res) => {
}
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
- const filename = `termix-export-${user[0].username}-${timestamp}.sqlite`;
+ const filename = `termix-export-${user.username}-${timestamp}.sqlite`;
const tempPath = path.join(tempDir, filename);
apiLogger.info("Creating export database", {
@@ -880,7 +893,7 @@ app.post("/database/export", authenticateJWT, async (req, res) => {
);
`);
- const userRecord = user[0];
+ const userRecord = user;
const insertUser = exportDb.prepare(`
INSERT INTO users (id, username, password_hash, is_admin, is_oidc, oidc_identifier, client_id, client_secret, issuer_url, authorization_url, token_url, identifier_path, name_path, scopes, totp_secret, totp_enabled, totp_backup_codes)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
@@ -1135,7 +1148,7 @@ app.post("/database/export", authenticateJWT, async (req, res) => {
});
res.status(500).json({
error: "Failed to export user data",
- details: error instanceof Error ? error.message : "Unknown error",
+ details: getErrorMessage(error),
});
}
});
@@ -1601,7 +1614,7 @@ app.post(
});
res.status(500).json({
error: "Failed to import SQLite data",
- details: error instanceof Error ? error.message : "Unknown error",
+ details: getErrorMessage(error),
});
}
},
@@ -1662,7 +1675,7 @@ app.post("/database/export/preview", authenticateJWT, async (req, res) => {
});
res.status(500).json({
error: "Failed to generate export preview",
- details: error instanceof Error ? error.message : "Unknown error",
+ details: getErrorMessage(error),
});
}
});
@@ -1723,7 +1736,7 @@ app.post("/database/restore", requireAdmin, async (req, res) => {
});
res.status(500).json({
error: "Database restore failed",
- details: error instanceof Error ? error.message : "Unknown error",
+ details: getErrorMessage(error),
});
}
});
@@ -1733,20 +1746,31 @@ app.use("/host", hostRoutes);
app.use("/alerts", alertRoutes);
app.use("/credentials", credentialsRoutes);
app.use("/snippets", snippetsRoutes);
+app.use("/fleets", fleetRoutes);
+app.use("/workspaces", workspaceRoutes);
app.use("/c2s-tunnel-presets", c2sTunnelPresetRoutes);
app.use("/terminal", terminalRoutes);
app.use("/session_logs", sessionLogRoutes);
app.use("/guacamole", guacamoleRoutes);
+app.use("/session-sharing", sessionSharingRoutes);
app.use("/network-topology", networkTopologyRoutes);
app.use("/rbac", rbacRoutes);
app.use("/open-tabs", openTabsRoutes);
app.use("/user-preferences", userPreferencesRoutes);
+app.use("/host-sidebar/preferences", hostSidebarPreferencesRoutes);
+app.use("/credential-sidebar/preferences", credentialSidebarPreferencesRoutes);
+app.use("/ui-preferences", uiPreferencesRoutes);
app.use("/proxmox", proxmoxRoutes);
app.use("/termix-id", termixIdRoutes);
registerAuditLogRoutes(app, authenticateJWT);
registerTailscaleRoutes(app, authenticateJWT);
app.use("/vault", vaultRoutes);
+// Before the alert routes, which are mounted at the root and would otherwise
+// have first claim on the path.
+app.use("/automations", automationsRoutes);
+app.use("/ai", aiRoutes);
app.use("/", alertRulesRoutes);
+app.use("/sync", syncRoutes);
const frontendDistPaths = [
path.join(__dirname, "../../../dist"),
@@ -1909,7 +1933,7 @@ app.get(
});
res.status(500).json({
error: "Failed to get migration status",
- details: error instanceof Error ? error.message : "Unknown error",
+ details: getErrorMessage(error),
});
}
},
@@ -1987,7 +2011,7 @@ app.get(
});
res.status(500).json({
error: "Failed to get migration history",
- details: error instanceof Error ? error.message : "Unknown error",
+ details: getErrorMessage(error),
});
}
},
@@ -2025,7 +2049,54 @@ const sslConfig = AutoSSLSetup.getSSLConfig();
if (sslConfig.enabled) {
databaseLogger.info(`SSL is enabled`, {
operation: "ssl_info",
- nginx_https_port: sslConfig.port,
+ ssl_port: sslConfig.port,
backend_http_port: HTTP_PORT,
});
+
+ try {
+ const httpsServer = https.createServer(
+ {
+ cert: fs.readFileSync(sslConfig.certPath),
+ key: fs.readFileSync(sslConfig.keyPath),
+ },
+ app,
+ );
+
+ httpsServer.on("error", (err: NodeJS.ErrnoException) => {
+ if (err.code === "EADDRINUSE") {
+ databaseLogger.error(
+ `SSL port ${sslConfig.port} is already in use. Kill the existing process and retry.`,
+ err,
+ {
+ operation: "https_server_port_conflict",
+ port: sslConfig.port,
+ },
+ );
+ return;
+ }
+ databaseLogger.error("HTTPS server error", err, {
+ operation: "https_server_error",
+ });
+ });
+
+ httpsServer.listen(sslConfig.port, () => {
+ databaseLogger.success(
+ `Backend is now also listening for HTTPS directly`,
+ {
+ operation: "https_server_started",
+ port: sslConfig.port,
+ },
+ );
+ });
+ } catch (error) {
+ databaseLogger.error(
+ "Failed to start HTTPS server with configured SSL certificate",
+ error,
+ {
+ operation: "https_server_start_failed",
+ cert_path: sslConfig.certPath,
+ key_path: sslConfig.keyPath,
+ },
+ );
+ }
}
diff --git a/src/backend/database/db/connect.ts b/src/backend/database/db/connect.ts
new file mode 100644
index 0000000..4507040
--- /dev/null
+++ b/src/backend/database/db/connect.ts
@@ -0,0 +1,131 @@
+import type { DatabaseDialect } from "./dialect.js";
+import type { PortableDatabase } from "../repositories/database-context.js";
+
+export const DATABASE_URL_ENV = "DATABASE_URL";
+export const DATABASE_POOL_MAX_ENV = "DATABASE_POOL_MAX";
+export const DATABASE_SSL_ENV = "DATABASE_SSL";
+
+const DEFAULT_POOL_MAX = 10;
+
+/**
+ * Pool size. Both drivers default to 10; this exists so an install that runs
+ * several replicas against one server can keep the total connection count under
+ * the server's own limit, which is the usual thing to hit first.
+ */
+export function poolMax(env: NodeJS.ProcessEnv = process.env): number {
+ const raw = env[DATABASE_POOL_MAX_ENV]?.trim();
+ if (!raw) return DEFAULT_POOL_MAX;
+
+ const parsed = Number(raw);
+ if (!Number.isInteger(parsed) || parsed < 1) {
+ throw new Error(
+ `${DATABASE_POOL_MAX_ENV} must be a positive integer, got "${raw}".`,
+ );
+ }
+ return parsed;
+}
+
+/**
+ * TLS mode.
+ *
+ * "require" verifies the server certificate; "no-verify" encrypts without
+ * checking it, which is what a self-signed certificate on a private network
+ * needs. Unset means no TLS, preserving the behaviour of every install that
+ * predates this setting.
+ */
+export function sslOption(
+ env: NodeJS.ProcessEnv = process.env,
+): false | { rejectUnauthorized: boolean } {
+ const raw = env[DATABASE_SSL_ENV]?.trim().toLowerCase();
+ if (!raw || raw === "false" || raw === "disable") return false;
+
+ if (raw === "true" || raw === "require") return { rejectUnauthorized: true };
+ if (raw === "no-verify") return { rejectUnauthorized: false };
+
+ throw new Error(
+ `Unsupported ${DATABASE_SSL_ENV}: "${raw}". Expected require, no-verify, or disable.`,
+ );
+}
+
+/**
+ * Opens a connection to a client-server engine.
+ *
+ * SQLite is not handled here โ it has its own lifecycle in db/index.ts, where
+ * the database is decrypted into memory and serialised back to a file. This
+ * covers the engines that connect to something already running.
+ *
+ * The returned handle is typed as PortableDatabase; see the note there on why
+ * that is an approximation and what guarantees it.
+ */
+export function databaseUrl(env: NodeJS.ProcessEnv = process.env): string | null {
+ const url = env[DATABASE_URL_ENV]?.trim();
+ return url ? url : null;
+}
+
+/**
+ * Checks the connection string suits the configured engine before trying to
+ * open it, so a mismatch fails with something readable rather than a driver
+ * error thirty frames down.
+ */
+export function assertUrlMatchesDialect(
+ url: string,
+ dialect: DatabaseDialect,
+): void {
+ const scheme = url.split("://", 1)[0].toLowerCase();
+
+ const expected: Record = {
+ postgres: ["postgres", "postgresql"],
+ mysql: ["mysql", "mariadb"],
+ };
+
+ const allowed = expected[dialect];
+ if (!allowed) {
+ throw new Error(`${dialect} does not use ${DATABASE_URL_ENV}`);
+ }
+
+ if (!allowed.includes(scheme)) {
+ throw new Error(
+ `${DATABASE_URL_ENV} is a "${scheme}://" URL but DATABASE_DIALECT is "${dialect}". ` +
+ `Expected one of ${allowed.map((s) => `${s}://`).join(", ")}.`,
+ );
+ }
+}
+
+export async function connectRemoteDatabase(
+ dialect: DatabaseDialect,
+ env: NodeJS.ProcessEnv = process.env,
+): Promise {
+ const url = databaseUrl(env);
+ if (!url) {
+ throw new Error(
+ `${DATABASE_URL_ENV} must be set when DATABASE_DIALECT is "${dialect}".`,
+ );
+ }
+
+ assertUrlMatchesDialect(url, dialect);
+
+ const max = poolMax(env);
+ const ssl = sslOption(env);
+
+ // No `schema` option: it only feeds drizzle's relational query API
+ // (`db.query.*`), which nothing here uses. The query builder takes its table
+ // names and value encoders from the table objects the repositories import โ
+ // see the note in schema.pg.ts on why the generated schemas are DDL-only.
+ if (dialect === "postgres") {
+ const { drizzle } = await import("drizzle-orm/node-postgres");
+ return drizzle({
+ connection: { connectionString: url, max, ...(ssl ? { ssl } : {}) },
+ }) as unknown as PortableDatabase;
+ }
+
+ // mysql2 names the pool limit differently and wants no `ssl` key at all when
+ // TLS is off โ passing false is not the same as omitting it.
+ const { drizzle } = await import("drizzle-orm/mysql2");
+ return drizzle({
+ connection: {
+ uri: url,
+ connectionLimit: max,
+ ...(ssl ? { ssl } : {}),
+ },
+ }) as unknown as PortableDatabase;
+}
diff --git a/src/backend/database/db/dialect.ts b/src/backend/database/db/dialect.ts
new file mode 100644
index 0000000..171017b
--- /dev/null
+++ b/src/backend/database/db/dialect.ts
@@ -0,0 +1,50 @@
+/**
+ * Which engine the schema and repositories are built against.
+ *
+ * SQLite is not going away: the desktop app embeds its backend and cannot ship
+ * a database server, so it will always run on SQLite. Postgres and MySQL are
+ * for self-hosted deployments that need more than one process to reach the
+ * data. This is a multi-backend story, not a migration off SQLite.
+ */
+export type DatabaseDialect = "sqlite" | "postgres" | "mysql";
+
+export const DATABASE_DIALECT_ENV = "DATABASE_DIALECT";
+
+const SUPPORTED: readonly DatabaseDialect[] = ["sqlite", "postgres", "mysql"];
+
+export function isDatabaseDialect(value: unknown): value is DatabaseDialect {
+ return (
+ typeof value === "string" &&
+ (SUPPORTED as readonly string[]).includes(value)
+ );
+}
+
+/**
+ * Resolves the configured dialect, defaulting to SQLite so existing
+ * deployments and the desktop build are unaffected by this being added.
+ */
+export function resolveDatabaseDialect(
+ env: NodeJS.ProcessEnv = process.env,
+): DatabaseDialect {
+ const raw = env[DATABASE_DIALECT_ENV]?.trim().toLowerCase();
+ if (!raw) return "sqlite";
+
+ if (!isDatabaseDialect(raw)) {
+ throw new Error(
+ `Unsupported ${DATABASE_DIALECT_ENV}: "${raw}". Expected one of ${SUPPORTED.join(", ")}.`,
+ );
+ }
+ return raw;
+}
+
+/**
+ * Whether a write has to be explicitly persisted after it commits.
+ *
+ * SQLite here is an in-memory database serialised back to an encrypted file, so
+ * every write needs a trigger to flush it. Client-server engines have already
+ * durably committed by the time the query returns โ there is no file to write
+ * and nothing to schedule.
+ */
+export function needsExplicitPersist(dialect: DatabaseDialect): boolean {
+ return dialect === "sqlite";
+}
diff --git a/src/backend/database/db/index.ts b/src/backend/database/db/index.ts
index f9f519c..f015182 100644
--- a/src/backend/database/db/index.ts
+++ b/src/backend/database/db/index.ts
@@ -1,3 +1,4 @@
+import { getErrorMessage } from "../../utils/error-message.js";
import { drizzle } from "drizzle-orm/better-sqlite3";
import Database from "better-sqlite3";
import * as schema from "./schema.js";
@@ -7,8 +8,22 @@ import { databaseLogger } from "../../utils/logger.js";
import { DatabaseFileEncryption } from "../../utils/database-file-encryption.js";
import { SystemCrypto } from "../../utils/system-crypto.js";
import { DatabaseMigration } from "../../utils/database-migration.js";
+import {
+ ensureSharedHostAuthOverrideProtocolSchema,
+ migrateLegacySharedHostAuthOverrides,
+} from "../../utils/shared-host-auth-override-migration.js";
import { DatabaseSaveTrigger } from "../../utils/database-save-trigger.js";
+import { migrateAuditRetention } from "../../utils/audit-retention-migration.js";
+import { createPerformanceIndexes } from "./performance-indexes.js";
+import {
+ assertDataDirIsNotMisconfigured,
+ DataDirMisconfiguredError,
+} from "../../utils/data-dir-guard.js";
import { getDefaultGuacdUrl } from "../../utils/guacd-config.js";
+import { resolveDatabaseDialect, type DatabaseDialect } from "./dialect.js";
+import { connectRemoteDatabase } from "./connect.js";
+import { runRemoteMigrations } from "./migrate.js";
+import type { PortableDatabase } from "../repositories/database-context.js";
const dataDir = process.env.DATA_DIR || "./db/data";
const dbDir = path.resolve(dataDir);
@@ -168,18 +183,25 @@ async function initializeDatabaseAsync(): Promise {
);
}
} else {
+ assertDataDirIsNotMisconfigured(dataDir);
memoryDatabase = new Database(":memory:");
isNewDatabase = true;
}
}
} catch (error) {
+ // Already a precise diagnosis of an intact-but-unusable file. The
+ // generic decryption error below would only obscure it.
if (error instanceof UnreadableDatabaseFileError) {
throw error;
}
+ // Not a decryption problem: the database is fine, we are pointed at the
+ // wrong directory. Surface that message as-is.
+ if (error instanceof DataDirMisconfiguredError) throw error;
+
databaseLogger.error("Failed to initialize memory database", error, {
operation: "db_memory_init_failed",
- errorMessage: error instanceof Error ? error.message : "Unknown error",
+ errorMessage: getErrorMessage(error),
errorStack: error instanceof Error ? error.stack : undefined,
encryptedDbExists:
DatabaseFileEncryption.isEncryptedDatabaseFile(encryptedDbPath),
@@ -203,18 +225,45 @@ async function initializeDatabaseAsync(): Promise {
databaseLogger.warn("Failed to generate diagnostic information", {
operation: "db_diagnostic_failed",
error:
- diagError instanceof Error ? diagError.message : "Unknown error",
+ getErrorMessage(diagError),
});
}
throw new Error(
- `Database decryption failed: ${error instanceof Error ? error.message : "Unknown error"}. This prevents data loss.`,
+ `Database decryption failed: ${getErrorMessage(error)}. This prevents data loss.`,
{ cause: error },
);
}
} else {
- memoryDatabase = new Database(":memory:");
- isNewDatabase = true;
+ assertDataDirIsNotMisconfigured(dataDir);
+
+ // The database still lives in memory and is serialised out on every write;
+ // turning encryption off only changes whether that file is ciphertext. It
+ // has to be read back, or each restart starts empty and silently discards
+ // everything the previous run saved.
+ const existing = readPlainDatabaseFile();
+ if (existing) {
+ memoryDatabase = new Database(existing);
+ databaseLogger.info("Loaded unencrypted database from disk", {
+ operation: "db_load_plain",
+ path: dbPath,
+ bytes: existing.length,
+ });
+ } else {
+ memoryDatabase = new Database(":memory:");
+ isNewDatabase = true;
+ }
+ }
+}
+
+/** The plain database file, or null when there is nothing to restore. */
+function readPlainDatabaseFile(): Buffer | null {
+ try {
+ const contents = fs.readFileSync(dbPath);
+ return contents.length > 0 ? contents : null;
+ } catch (error) {
+ if ((error as NodeJS.ErrnoException).code === "ENOENT") return null;
+ throw error;
}
}
@@ -315,6 +364,7 @@ async function initializeCompleteDatabase(): Promise {
folder TEXT,
tags TEXT,
pin INTEGER NOT NULL DEFAULT 0,
+ sort_order INTEGER,
auth_type TEXT NOT NULL,
password TEXT,
key TEXT,
@@ -458,9 +508,12 @@ async function initializeCompleteDatabase(): Promise {
name TEXT NOT NULL,
color TEXT,
icon TEXT,
+ credential_id INTEGER,
+ sort_order INTEGER,
created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
- FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE
+ FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE,
+ FOREIGN KEY (credential_id) REFERENCES ssh_credentials (id) ON DELETE SET NULL
);
CREATE TABLE IF NOT EXISTS recent_activity (
@@ -526,7 +579,7 @@ async function initializeCompleteDatabase(): Promise {
CREATE TABLE IF NOT EXISTS audit_logs (
id INTEGER PRIMARY KEY AUTOINCREMENT,
- user_id TEXT NOT NULL,
+ user_id TEXT,
username TEXT NOT NULL,
action TEXT NOT NULL,
resource_type TEXT NOT NULL,
@@ -538,13 +591,14 @@ async function initializeCompleteDatabase(): Promise {
success INTEGER NOT NULL,
error_message TEXT,
timestamp TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
- FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE
+ FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE SET NULL
);
CREATE TABLE IF NOT EXISTS session_recordings (
id INTEGER PRIMARY KEY AUTOINCREMENT,
host_id INTEGER NOT NULL,
- user_id TEXT NOT NULL,
+ user_id TEXT,
+ username TEXT,
access_id INTEGER,
started_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
ended_at TEXT,
@@ -557,10 +611,42 @@ async function initializeCompleteDatabase(): Promise {
terminated_by_owner INTEGER DEFAULT 0,
termination_reason TEXT,
FOREIGN KEY (host_id) REFERENCES ssh_data (id) ON DELETE CASCADE,
- FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE,
+ FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE SET NULL,
FOREIGN KEY (access_id) REFERENCES host_access (id) ON DELETE SET NULL
);
+ CREATE TABLE IF NOT EXISTS session_shares (
+ id TEXT PRIMARY KEY,
+ host_id INTEGER NOT NULL,
+ owner_user_id TEXT NOT NULL,
+ protocol TEXT NOT NULL,
+ session_id TEXT NOT NULL,
+ tab_instance_id TEXT,
+ share_type TEXT NOT NULL,
+ target_user_id TEXT,
+ link_token TEXT UNIQUE,
+ permission_level TEXT NOT NULL DEFAULT 'read-only',
+ created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ expires_at TEXT NOT NULL,
+ revoked_at TEXT,
+ last_joined_at TEXT,
+ join_count INTEGER NOT NULL DEFAULT 0,
+ FOREIGN KEY (host_id) REFERENCES ssh_data (id) ON DELETE CASCADE,
+ FOREIGN KEY (owner_user_id) REFERENCES users (id) ON DELETE CASCADE,
+ FOREIGN KEY (target_user_id) REFERENCES users (id) ON DELETE CASCADE
+ );
+
+ CREATE TABLE IF NOT EXISTS session_share_participants (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ share_id TEXT NOT NULL,
+ user_id TEXT,
+ guest_label TEXT,
+ joined_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ left_at TEXT,
+ FOREIGN KEY (share_id) REFERENCES session_shares (id) ON DELETE CASCADE,
+ FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE
+ );
+
CREATE TABLE IF NOT EXISTS api_keys (
id TEXT PRIMARY KEY,
user_id TEXT NOT NULL,
@@ -613,6 +699,41 @@ async function initializeCompleteDatabase(): Promise {
CREATE UNIQUE INDEX IF NOT EXISTS idx_host_metrics_prefs_user_host
ON host_metrics_preferences (user_id, host_id);
+ CREATE TABLE IF NOT EXISTS proxmox_stats_preferences (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ user_id TEXT NOT NULL,
+ host_id INTEGER NOT NULL,
+ layout TEXT NOT NULL,
+ created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE,
+ FOREIGN KEY (host_id) REFERENCES ssh_data (id) ON DELETE CASCADE
+ );
+
+ CREATE UNIQUE INDEX IF NOT EXISTS idx_proxmox_stats_prefs_user_host
+ ON proxmox_stats_preferences (user_id, host_id);
+
+ CREATE TABLE IF NOT EXISTS host_sidebar_preferences (
+ user_id TEXT PRIMARY KEY,
+ data TEXT NOT NULL,
+ updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE
+ );
+
+ CREATE TABLE IF NOT EXISTS credential_sidebar_preferences (
+ user_id TEXT PRIMARY KEY,
+ data TEXT NOT NULL,
+ updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE
+ );
+
+ CREATE TABLE IF NOT EXISTS ui_preferences (
+ user_id TEXT PRIMARY KEY,
+ data TEXT NOT NULL,
+ updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE
+ );
+
CREATE TABLE IF NOT EXISTS host_health_checks (
id INTEGER PRIMARY KEY AUTOINCREMENT,
user_id TEXT NOT NULL,
@@ -705,6 +826,7 @@ async function initializeCompleteDatabase(): Promise {
}
migrateSchema();
+ vacuumIfFreelistBloated();
try {
ensureRawSettingDefault("allow_registration", "true");
@@ -760,12 +882,16 @@ const addColumnIfNotExists = (
sqlite.exec(`ALTER TABLE ${table}
ADD COLUMN "${column}" ${definition};`);
} catch (alterError) {
- databaseLogger.warn(`Failed to add column ${column} to ${table}`, {
- operation: "schema_migration",
- table,
- column,
- error: alterError,
- });
+ const message =
+ alterError instanceof Error ? alterError.message : String(alterError);
+ databaseLogger.warn(
+ `Failed to add column ${column} to ${table}: ${message}`,
+ {
+ operation: "schema_migration",
+ table,
+ column,
+ },
+ );
}
}
};
@@ -802,8 +928,15 @@ const migrateSchema = () => {
addColumnIfNotExists("user_preferences", "disable_update_check", "INTEGER");
addColumnIfNotExists("user_preferences", "confirm_tab_close", "INTEGER");
addColumnIfNotExists("user_preferences", "hidden_rail_tabs", "TEXT");
+ addColumnIfNotExists("user_preferences", "ai_assistant_enabled", "INTEGER");
+ addColumnIfNotExists("user_preferences", "ai_read_only_commands", "INTEGER");
addColumnIfNotExists("user_preferences", "compact_host_view", "INTEGER");
addColumnIfNotExists("user_preferences", "status_color_scheme", "TEXT");
+ addColumnIfNotExists("user_preferences", "custom_themes", "TEXT");
+ addColumnIfNotExists("user_preferences", "custom_keybindings", "TEXT");
+ addColumnIfNotExists("user_preferences", "terminal_defaults", "TEXT");
+ addColumnIfNotExists("user_preferences", "rdp_defaults", "TEXT");
+ addColumnIfNotExists("user_preferences", "terminal_macros", "TEXT");
sqlite.exec(`
CREATE TABLE IF NOT EXISTS dashboard_service_links (
@@ -857,9 +990,7 @@ const migrateSchema = () => {
databaseLogger.warn("Failed to backfill users.registered_at", {
operation: "schema_migration",
error:
- backfillError instanceof Error
- ? backfillError.message
- : String(backfillError),
+ getErrorMessage(backfillError, String(backfillError)),
});
}
} else {
@@ -873,9 +1004,7 @@ const migrateSchema = () => {
{
operation: "schema_migration",
error:
- backfillError instanceof Error
- ? backfillError.message
- : String(backfillError),
+ getErrorMessage(backfillError, String(backfillError)),
},
);
}
@@ -912,6 +1041,8 @@ const migrateSchema = () => {
addColumnIfNotExists("ssh_data", "folder", "TEXT");
addColumnIfNotExists("ssh_data", "tags", "TEXT");
addColumnIfNotExists("ssh_data", "pin", "INTEGER NOT NULL DEFAULT 0");
+ addColumnIfNotExists("ssh_data", "sort_order", "INTEGER");
+ addColumnIfNotExists("ssh_folders", "sort_order", "INTEGER");
addColumnIfNotExists(
"ssh_data",
"auth_type",
@@ -1002,11 +1133,22 @@ const migrateSchema = () => {
"INTEGER NOT NULL DEFAULT 0",
);
addColumnIfNotExists("ssh_data", "proxmox_config", "TEXT");
+ addColumnIfNotExists(
+ "ssh_data",
+ "enable_proxmox_stats",
+ "INTEGER NOT NULL DEFAULT 0",
+ );
+ addColumnIfNotExists("ssh_data", "proxmox_stats_config", "TEXT");
addColumnIfNotExists(
"ssh_data",
"enable_tmux_monitor",
"INTEGER NOT NULL DEFAULT 0",
);
+ addColumnIfNotExists(
+ "ssh_data",
+ "enable_terminal_toolbar",
+ "INTEGER NOT NULL DEFAULT 1",
+ );
addColumnIfNotExists("ssh_data", "connection_type", 'TEXT NOT NULL DEFAULT "ssh"');
addColumnIfNotExists("ssh_data", "domain", "TEXT");
@@ -1061,6 +1203,13 @@ const migrateSchema = () => {
addColumnIfNotExists("ssh_credentials", "cert_public_key", "TEXT");
+ addColumnIfNotExists(
+ "ssh_credentials",
+ "pin",
+ "INTEGER NOT NULL DEFAULT 0",
+ );
+ addColumnIfNotExists("ssh_credentials", "sort_order", "INTEGER");
+
try {
const tableInfo = sqlite.prepare("PRAGMA table_info(ssh_credentials)").all() as Array<{
cid: number;
@@ -1074,43 +1223,57 @@ const migrateSchema = () => {
if (usernameCol && usernameCol.notnull === 1) {
const tempTableName = "ssh_credentials_temp_migration";
- const allColumns = tableInfo.map((col) => col.name).join(", ");
+ const allColumns = tableInfo.map((col) => `"${col.name}"`).join(", ");
+
+ // Derive the replacement table from the live definition instead of
+ // restating it here. The table keeps gaining columns (cert_public_key,
+ // pin, sort_order, sync_id, ...), and a second copy of the column list
+ // falls behind every time one is added โ leaving the copy narrower than
+ // the table, so the INSERT below fails and the constraint stays put.
+ const createSql = sqlite
+ .prepare("SELECT sql FROM sqlite_master WHERE type = 'table' AND name = 'ssh_credentials'")
+ .pluck()
+ .get() as string | undefined;
+
+ if (!createSql) {
+ throw new Error("ssh_credentials has no stored table definition");
+ }
+
+ // Only the table name is rewritten; replace() stops at the first match,
+ // and in a CREATE TABLE statement that is the table being defined.
+ const renamedSql = createSql.replace("ssh_credentials", tempTableName);
+ const tempCreateSql = renamedSql.replace(/(["`[]?username["`\]]?\s+TEXT)\s+NOT\s+NULL/i, "$1");
+
+ if (tempCreateSql === renamedSql) {
+ throw new Error("could not derive a nullable-username definition for ssh_credentials");
+ }
+
+ // DROP TABLE takes the table's indexes with it, so replay them afterwards.
+ const indexDefs = sqlite
+ .prepare(
+ "SELECT sql FROM sqlite_master WHERE type = 'index' AND tbl_name = 'ssh_credentials' AND sql IS NOT NULL",
+ )
+ .pluck()
+ .all() as string[];
sqlite.exec(`PRAGMA foreign_keys = OFF`);
sqlite.exec(`
- CREATE TABLE ${tempTableName} (
- id INTEGER PRIMARY KEY AUTOINCREMENT,
- user_id TEXT NOT NULL,
- name TEXT NOT NULL,
- description TEXT,
- folder TEXT,
- tags TEXT,
- auth_type TEXT NOT NULL,
- username TEXT,
- password TEXT,
- key TEXT,
- key_password TEXT,
- key_type TEXT,
- usage_count INTEGER NOT NULL DEFAULT 0,
- last_used TEXT,
- created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
- private_key TEXT,
- public_key TEXT,
- detected_key_type TEXT,
- FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE
- );
+ ${tempCreateSql};
- INSERT INTO ${tempTableName} SELECT ${allColumns} FROM ssh_credentials;
+ INSERT INTO ${tempTableName} (${allColumns}) SELECT ${allColumns} FROM ssh_credentials;
DROP TABLE ssh_credentials;
ALTER TABLE ${tempTableName} RENAME TO ssh_credentials;
`);
+ for (const indexSql of indexDefs) {
+ sqlite.exec(indexSql);
+ }
sqlite.exec(`PRAGMA foreign_keys = ON`);
databaseLogger.info("Successfully migrated ssh_credentials table to remove username NOT NULL constraint", {
operation: "schema_migration_username_nullable",
+ restoredIndexes: indexDefs.length,
});
}
} catch (migrationError) {
@@ -1120,6 +1283,69 @@ const migrateSchema = () => {
});
}
+ try {
+ const auditLogColumns = sqlite.prepare("PRAGMA table_info(audit_logs)").all() as Array<{
+ name: string;
+ notnull: number;
+ }>;
+ const auditUserIdCol = auditLogColumns.find((col) => col.name === "user_id");
+
+ if (auditUserIdCol && auditUserIdCol.notnull === 1) {
+ const tempTableName = "audit_logs_temp_migration";
+ const columns = [
+ "id",
+ "user_id",
+ "username",
+ "action",
+ "resource_type",
+ "resource_id",
+ "resource_name",
+ "details",
+ "ip_address",
+ "user_agent",
+ "success",
+ "error_message",
+ "timestamp",
+ ].join(", ");
+
+ sqlite.exec(`PRAGMA foreign_keys = OFF`);
+ sqlite.exec(`
+ CREATE TABLE ${tempTableName} (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ user_id TEXT,
+ username TEXT NOT NULL,
+ action TEXT NOT NULL,
+ resource_type TEXT NOT NULL,
+ resource_id TEXT,
+ resource_name TEXT,
+ details TEXT,
+ ip_address TEXT,
+ user_agent TEXT,
+ success INTEGER NOT NULL,
+ error_message TEXT,
+ timestamp TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE SET NULL
+ );
+
+ INSERT INTO ${tempTableName} (${columns}) SELECT ${columns} FROM audit_logs;
+
+ DROP TABLE audit_logs;
+
+ ALTER TABLE ${tempTableName} RENAME TO audit_logs;
+ `);
+ sqlite.exec(`PRAGMA foreign_keys = ON`);
+
+ databaseLogger.info("Successfully migrated audit_logs table to remove user_id NOT NULL constraint", {
+ operation: "schema_migration_audit_user_id_nullable",
+ });
+ }
+ } catch (migrationError) {
+ databaseLogger.warn("Failed to migrate audit_logs user_id column", {
+ operation: "schema_migration",
+ error: migrationError,
+ });
+ }
+
addColumnIfNotExists("file_manager_recent", "host_id", "INTEGER NOT NULL");
addColumnIfNotExists("file_manager_pinned", "host_id", "INTEGER NOT NULL");
addColumnIfNotExists("file_manager_shortcuts", "host_id", "INTEGER NOT NULL");
@@ -1127,6 +1353,7 @@ const migrateSchema = () => {
addColumnIfNotExists("snippets", "folder", "TEXT");
addColumnIfNotExists("snippets", "order", "INTEGER NOT NULL DEFAULT 0");
addColumnIfNotExists("snippets", "host_filter", "TEXT");
+ addColumnIfNotExists("snippets", "is_note", "INTEGER NOT NULL DEFAULT 0");
try {
sqlite
@@ -1287,85 +1514,6 @@ const migrateSchema = () => {
}
}
- try {
- sqlite.prepare("SELECT id FROM c2s_tunnel_presets LIMIT 1").get();
- } catch {
- try {
- sqlite.exec(`
- CREATE TABLE IF NOT EXISTS c2s_tunnel_presets (
- id INTEGER PRIMARY KEY AUTOINCREMENT,
- user_id TEXT NOT NULL,
- name TEXT NOT NULL,
- config TEXT NOT NULL,
- platform TEXT,
- computer_name TEXT,
- created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
- FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE
- );
- `);
- } catch (createError) {
- databaseLogger.warn("Failed to create c2s_tunnel_presets table", {
- operation: "schema_migration",
- error: createError,
- });
- }
- }
-
- try {
- sqlite
- .prepare("SELECT id FROM sessions LIMIT 1")
- .get();
- } catch {
- try {
- sqlite.exec(`
- CREATE TABLE IF NOT EXISTS sessions (
- id TEXT PRIMARY KEY,
- user_id TEXT NOT NULL,
- jwt_token TEXT NOT NULL,
- device_type TEXT NOT NULL,
- device_info TEXT NOT NULL,
- created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
- expires_at TEXT NOT NULL,
- last_active_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
- FOREIGN KEY (user_id) REFERENCES users (id)
- );
- `);
- } catch (createError) {
- databaseLogger.warn("Failed to create sessions table", {
- operation: "schema_migration",
- error: createError,
- });
- }
- }
-
- try {
- sqlite
- .prepare("SELECT id FROM trusted_devices LIMIT 1")
- .get();
- } catch {
- try {
- sqlite.exec(`
- CREATE TABLE IF NOT EXISTS trusted_devices (
- id TEXT PRIMARY KEY,
- user_id TEXT NOT NULL,
- device_fingerprint TEXT NOT NULL,
- device_type TEXT NOT NULL,
- device_info TEXT NOT NULL,
- created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
- expires_at TEXT NOT NULL,
- last_used_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
- FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE
- );
- `);
- } catch (createError) {
- databaseLogger.warn("Failed to create trusted_devices table", {
- operation: "schema_migration",
- error: createError,
- });
- }
- }
-
try {
sqlite
.prepare("SELECT id FROM network_topology LIMIT 1")
@@ -1390,36 +1538,6 @@ const migrateSchema = () => {
}
}
- try {
- sqlite.prepare("SELECT id FROM host_access LIMIT 1").get();
- } catch {
- try {
- sqlite.exec(`
- CREATE TABLE IF NOT EXISTS host_access (
- id INTEGER PRIMARY KEY AUTOINCREMENT,
- host_id INTEGER NOT NULL,
- user_id TEXT,
- role_id INTEGER,
- granted_by TEXT NOT NULL,
- permission_level TEXT NOT NULL DEFAULT 'use',
- expires_at TEXT,
- created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
- last_accessed_at TEXT,
- access_count INTEGER NOT NULL DEFAULT 0,
- FOREIGN KEY (host_id) REFERENCES ssh_data (id) ON DELETE CASCADE,
- FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE,
- FOREIGN KEY (role_id) REFERENCES roles (id) ON DELETE CASCADE,
- FOREIGN KEY (granted_by) REFERENCES users (id) ON DELETE CASCADE
- );
- `);
- } catch (createError) {
- databaseLogger.warn("Failed to create host_access table", {
- operation: "schema_migration",
- error: createError,
- });
- }
- }
-
try {
sqlite.prepare("SELECT role_id FROM host_access LIMIT 1").get();
} catch {
@@ -1446,6 +1564,41 @@ const migrateSchema = () => {
}
}
+ try {
+ ensureSharedHostAuthOverrideProtocolSchema(sqlite);
+ } catch (schemaError) {
+ databaseLogger.warn("Failed to prepare shared_host_auth_overrides table", {
+ operation: "schema_migration",
+ error: schemaError,
+ });
+ }
+
+ try {
+ migrateLegacySharedHostAuthOverrides(
+ sqlite,
+ getRawSettingValue,
+ setRawSettingValue,
+ );
+ } catch (migrateError) {
+ databaseLogger.warn("Failed to migrate shared host auth overrides", {
+ operation: "schema_migration",
+ error: migrateError,
+ });
+ }
+
+ try {
+ sqlite.prepare("SELECT credential_id FROM ssh_folders LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec("ALTER TABLE ssh_folders ADD COLUMN credential_id INTEGER REFERENCES ssh_credentials(id) ON DELETE SET NULL");
+ } catch (alterError) {
+ databaseLogger.warn("Failed to add credential_id column to ssh_folders", {
+ operation: "schema_migration",
+ error: alterError,
+ });
+ }
+ }
+
try {
sqlite.prepare("SELECT sudo_password FROM ssh_data LIMIT 1").get();
} catch {
@@ -1463,6 +1616,7 @@ const migrateSchema = () => {
{ column: "connection_type", sql: "ALTER TABLE ssh_data ADD COLUMN connection_type TEXT NOT NULL DEFAULT 'ssh'" },
{ column: "credential_id", sql: "ALTER TABLE ssh_data ADD COLUMN credential_id INTEGER" },
{ column: "override_credential_username", sql: "ALTER TABLE ssh_data ADD COLUMN override_credential_username INTEGER" },
+ { column: "share_ssh_auth", sql: "ALTER TABLE ssh_data ADD COLUMN share_ssh_auth INTEGER NOT NULL DEFAULT 0" },
{ column: "jump_hosts", sql: "ALTER TABLE ssh_data ADD COLUMN jump_hosts TEXT" },
{ column: "show_terminal_in_sidebar", sql: "ALTER TABLE ssh_data ADD COLUMN show_terminal_in_sidebar INTEGER NOT NULL DEFAULT 1" },
{ column: "show_file_manager_in_sidebar", sql: "ALTER TABLE ssh_data ADD COLUMN show_file_manager_in_sidebar INTEGER NOT NULL DEFAULT 0" },
@@ -1508,6 +1662,9 @@ const migrateSchema = () => {
{ column: "rdp_auth_type", sql: "ALTER TABLE ssh_data ADD COLUMN rdp_auth_type TEXT" },
{ column: "vnc_auth_type", sql: "ALTER TABLE ssh_data ADD COLUMN vnc_auth_type TEXT" },
{ column: "telnet_auth_type", sql: "ALTER TABLE ssh_data ADD COLUMN telnet_auth_type TEXT" },
+ { column: "allow_session_sharing", sql: "ALTER TABLE ssh_data ADD COLUMN allow_session_sharing INTEGER NOT NULL DEFAULT 1" },
+ { column: "connection_origin", sql: "ALTER TABLE ssh_data ADD COLUMN connection_origin TEXT" },
+ { column: "parent_host_id", sql: "ALTER TABLE ssh_data ADD COLUMN parent_host_id INTEGER REFERENCES ssh_data(id) ON DELETE SET NULL" },
];
for (const migration of sshDataMigrations) {
@@ -1525,6 +1682,40 @@ const migrateSchema = () => {
}
}
+ // share_ssh_auth arrived with 2.6.1 and defaults to 0, but sharing a host
+ // used to pass the owner's SSH authentication along unconditionally. Every
+ // host shared before the upgrade therefore stopped supplying credentials to
+ // its recipients the moment the column appeared, and they were left with
+ // "No valid authentication method provided".
+ //
+ // Turn it on for hosts that are already shared, which is where the previous
+ // behaviour was in effect and consented to. Hosts nobody has shared keep the
+ // new default; the owner decides when they share one.
+ try {
+ if (getRawSettingValue("share_ssh_auth_backfill_v1") === null) {
+ const backfilled = sqlite
+ .prepare(
+ `UPDATE ssh_data SET share_ssh_auth = 1
+ WHERE share_ssh_auth = 0
+ AND id IN (SELECT DISTINCT host_id FROM host_access)`,
+ )
+ .run();
+
+ if (backfilled.changes > 0) {
+ databaseLogger.info(
+ `Restored shared SSH authentication for ${backfilled.changes} already-shared host(s)`,
+ { operation: "share_ssh_auth_backfill_v1" },
+ );
+ }
+ setRawSettingValue("share_ssh_auth_backfill_v1", "true");
+ }
+ } catch (e) {
+ databaseLogger.warn("Failed to backfill share_ssh_auth", {
+ operation: "share_ssh_auth_backfill_v1",
+ error: e,
+ });
+ }
+
// Migrate legacy authType="warpgate" hosts to useWarpgate=1 with authType="none"
try {
const result = sqlite
@@ -1594,118 +1785,6 @@ const migrateSchema = () => {
// user_open_tabs table not present yet; nothing to migrate.
}
- try {
- sqlite.prepare("SELECT id FROM roles LIMIT 1").get();
- } catch {
- try {
- sqlite.exec(`
- CREATE TABLE IF NOT EXISTS roles (
- id INTEGER PRIMARY KEY AUTOINCREMENT,
- name TEXT NOT NULL UNIQUE,
- display_name TEXT NOT NULL,
- description TEXT,
- is_system INTEGER NOT NULL DEFAULT 0,
- permissions TEXT,
- created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
- updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
- );
- `);
- } catch (createError) {
- databaseLogger.warn("Failed to create roles table", {
- operation: "schema_migration",
- error: createError,
- });
- }
- }
-
- try {
- sqlite.prepare("SELECT id FROM user_roles LIMIT 1").get();
- } catch {
- try {
- sqlite.exec(`
- CREATE TABLE IF NOT EXISTS user_roles (
- id INTEGER PRIMARY KEY AUTOINCREMENT,
- user_id TEXT NOT NULL,
- role_id INTEGER NOT NULL,
- granted_by TEXT,
- granted_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
- UNIQUE(user_id, role_id),
- FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE,
- FOREIGN KEY (role_id) REFERENCES roles (id) ON DELETE CASCADE,
- FOREIGN KEY (granted_by) REFERENCES users (id) ON DELETE SET NULL
- );
- `);
- } catch (createError) {
- databaseLogger.warn("Failed to create user_roles table", {
- operation: "schema_migration",
- error: createError,
- });
- }
- }
-
- try {
- sqlite.prepare("SELECT id FROM audit_logs LIMIT 1").get();
- } catch {
- try {
- sqlite.exec(`
- CREATE TABLE IF NOT EXISTS audit_logs (
- id INTEGER PRIMARY KEY AUTOINCREMENT,
- user_id TEXT NOT NULL,
- username TEXT NOT NULL,
- action TEXT NOT NULL,
- resource_type TEXT NOT NULL,
- resource_id TEXT,
- resource_name TEXT,
- details TEXT,
- ip_address TEXT,
- user_agent TEXT,
- success INTEGER NOT NULL,
- error_message TEXT,
- timestamp TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
- FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE
- );
- `);
- } catch (createError) {
- databaseLogger.warn("Failed to create audit_logs table", {
- operation: "schema_migration",
- error: createError,
- });
- }
- }
-
- try {
- sqlite.prepare("SELECT id FROM session_recordings LIMIT 1").get();
- } catch {
- try {
- sqlite.exec(`
- CREATE TABLE IF NOT EXISTS session_recordings (
- id INTEGER PRIMARY KEY AUTOINCREMENT,
- host_id INTEGER NOT NULL,
- user_id TEXT NOT NULL,
- access_id INTEGER,
- started_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
- ended_at TEXT,
- duration INTEGER,
- commands TEXT,
- dangerous_actions TEXT,
- recording_path TEXT,
- protocol TEXT NOT NULL DEFAULT 'ssh',
- format TEXT NOT NULL DEFAULT 'text',
- terminated_by_owner INTEGER DEFAULT 0,
- termination_reason TEXT,
- FOREIGN KEY (host_id) REFERENCES ssh_data (id) ON DELETE CASCADE,
- FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE,
- FOREIGN KEY (access_id) REFERENCES host_access (id) ON DELETE SET NULL
- );
- `);
- } catch (createError) {
- databaseLogger.warn("Failed to create session_recordings table", {
- operation: "schema_migration",
- error: createError,
- });
- }
- }
-
try {
sqlite.prepare("SELECT id FROM shared_host_secrets LIMIT 1").get();
} catch {
@@ -1847,32 +1926,6 @@ const migrateSchema = () => {
}
}
- try {
- sqlite.prepare("SELECT id FROM api_keys LIMIT 1").get();
- } catch {
- try {
- sqlite.exec(`
- CREATE TABLE IF NOT EXISTS api_keys (
- id TEXT PRIMARY KEY,
- user_id TEXT NOT NULL,
- name TEXT NOT NULL,
- token_hash TEXT NOT NULL,
- token_prefix TEXT NOT NULL,
- created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
- expires_at TEXT,
- last_used_at TEXT,
- is_active INTEGER NOT NULL DEFAULT 1,
- FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE CASCADE
- );
- `);
- } catch (createError) {
- databaseLogger.warn("Failed to create api_keys table", {
- operation: "schema_migration",
- error: createError,
- });
- }
- }
-
// --- tmux-monitor begin ---
try {
sqlite.prepare("SELECT id FROM tmux_session_tags LIMIT 1").get();
@@ -2053,6 +2106,74 @@ const migrateSchema = () => {
addColumnIfNotExists("users", "sso_provider_id", "INTEGER");
+ try {
+ const usersTableInfo = sqlite.prepare("PRAGMA table_info(users)").all() as Array<{
+ cid: number;
+ name: string;
+ type: string;
+ notnull: number;
+ dflt_value: string | null;
+ pk: number;
+ }>;
+ const legacyNotNullColumns = new Set([
+ "client_id",
+ "client_secret",
+ "issuer_url",
+ "authorization_url",
+ "token_url",
+ "identifier_path",
+ "name_path",
+ "scopes",
+ ]);
+ const hasStaleNotNull = usersTableInfo.some(
+ (col) => legacyNotNullColumns.has(col.name) && col.notnull === 1,
+ );
+
+ if (hasStaleNotNull) {
+ const tempTableName = "users_temp_migration";
+ const columnDefs = usersTableInfo
+ .map((col) => {
+ const parts = [`"${col.name}"`, col.type || "TEXT"];
+ if (col.pk === 1) parts.push("PRIMARY KEY");
+ if (col.notnull === 1 && !legacyNotNullColumns.has(col.name)) {
+ parts.push("NOT NULL");
+ }
+ if (col.dflt_value !== null) {
+ parts.push(`DEFAULT ${col.dflt_value}`);
+ }
+ return parts.join(" ");
+ })
+ .join(",\n ");
+ const allColumns = usersTableInfo.map((col) => `"${col.name}"`).join(", ");
+
+ sqlite.exec(`PRAGMA foreign_keys = OFF`);
+ sqlite.exec(`
+ CREATE TABLE ${tempTableName} (
+ ${columnDefs}
+ );
+
+ INSERT INTO ${tempTableName} SELECT ${allColumns} FROM users;
+
+ DROP TABLE users;
+
+ ALTER TABLE ${tempTableName} RENAME TO users;
+ `);
+ sqlite.exec(`PRAGMA foreign_keys = ON`);
+
+ databaseLogger.info(
+ "Successfully migrated users table to remove legacy OIDC NOT NULL constraints",
+ {
+ operation: "schema_migration_users_oidc_nullable",
+ },
+ );
+ }
+ } catch (migrationError) {
+ databaseLogger.warn("Failed to migrate users table legacy OIDC columns", {
+ operation: "schema_migration",
+ error: migrationError,
+ });
+ }
+
// Migrate legacy single oidc_config settings blob into sso_providers table
try {
const migrationDone = getRawSettingValue("sso_migration_v1");
@@ -2115,6 +2236,34 @@ const migrateSchema = () => {
}
// --- metrics-history end ---
+ // --- proxmox-node-history begin ---
+ try {
+ sqlite.prepare("SELECT id FROM proxmox_node_history LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec(`
+ CREATE TABLE IF NOT EXISTS proxmox_node_history (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ host_id INTEGER NOT NULL REFERENCES ssh_data(id) ON DELETE CASCADE,
+ ts TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ cpu_percent REAL,
+ mem_percent REAL,
+ disk_percent REAL,
+ net_rx_bytes INTEGER,
+ net_tx_bytes INTEGER
+ );
+ CREATE INDEX IF NOT EXISTS idx_proxmox_node_history_host_ts
+ ON proxmox_node_history (host_id, ts DESC);
+ `);
+ } catch (createError) {
+ databaseLogger.warn("Failed to create proxmox_node_history table", {
+ operation: "schema_migration",
+ error: createError,
+ });
+ }
+ }
+ // --- proxmox-node-history end ---
+
// --- alerts begin ---
try {
sqlite.prepare("SELECT id FROM alert_rules LIMIT 1").get();
@@ -2215,6 +2364,159 @@ const migrateSchema = () => {
}
// --- alerts end ---
+ // --- automations begin ---
+ try {
+ sqlite.prepare("SELECT id FROM automations LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec(`
+ CREATE TABLE IF NOT EXISTS automations (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
+ name TEXT NOT NULL,
+ description TEXT,
+ enabled INTEGER NOT NULL DEFAULT 1,
+ definition TEXT NOT NULL,
+ definition_version INTEGER NOT NULL DEFAULT 1,
+ concurrency_policy TEXT NOT NULL DEFAULT 'skip',
+ max_run_seconds INTEGER NOT NULL DEFAULT 300,
+ dry_run INTEGER NOT NULL DEFAULT 0,
+ last_run_at TEXT,
+ last_run_status TEXT,
+ created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
+ );
+ `);
+ } catch (createError) {
+ databaseLogger.warn("Failed to create automations table", {
+ operation: "schema_migration",
+ error: createError,
+ });
+ }
+ }
+
+ try {
+ sqlite.prepare("SELECT id FROM automation_trigger_state LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec(`
+ CREATE TABLE IF NOT EXISTS automation_trigger_state (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ automation_id INTEGER NOT NULL REFERENCES automations(id) ON DELETE CASCADE,
+ state_key TEXT NOT NULL,
+ breach_started_at TEXT,
+ last_fired_at TEXT,
+ last_value REAL,
+ last_observed_state TEXT,
+ updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
+ );
+ `);
+ } catch (createError) {
+ databaseLogger.warn("Failed to create automation_trigger_state table", {
+ operation: "schema_migration",
+ error: createError,
+ });
+ }
+ }
+
+ try {
+ sqlite.prepare("SELECT id FROM automation_schedules LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec(`
+ CREATE TABLE IF NOT EXISTS automation_schedules (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ automation_id INTEGER NOT NULL REFERENCES automations(id) ON DELETE CASCADE,
+ cron TEXT,
+ interval_seconds INTEGER,
+ timezone TEXT,
+ next_due_at TEXT,
+ last_tick_at TEXT
+ );
+ `);
+ } catch (createError) {
+ databaseLogger.warn("Failed to create automation_schedules table", {
+ operation: "schema_migration",
+ error: createError,
+ });
+ }
+ }
+
+ try {
+ sqlite.prepare("SELECT id FROM automation_runs LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec(`
+ CREATE TABLE IF NOT EXISTS automation_runs (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ automation_id INTEGER NOT NULL REFERENCES automations(id) ON DELETE CASCADE,
+ user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
+ trigger_type TEXT NOT NULL,
+ trigger_context TEXT,
+ status TEXT NOT NULL,
+ started_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ finished_at TEXT,
+ duration_ms INTEGER,
+ error TEXT,
+ dry_run INTEGER NOT NULL DEFAULT 0,
+ parent_run_id INTEGER
+ );
+ `);
+ } catch (createError) {
+ databaseLogger.warn("Failed to create automation_runs table", {
+ operation: "schema_migration",
+ error: createError,
+ });
+ }
+ }
+
+ try {
+ sqlite.prepare("SELECT id FROM automation_run_steps LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec(`
+ CREATE TABLE IF NOT EXISTS automation_run_steps (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ run_id INTEGER NOT NULL REFERENCES automation_runs(id) ON DELETE CASCADE,
+ step_index INTEGER NOT NULL,
+ step_id TEXT NOT NULL,
+ step_type TEXT NOT NULL,
+ status TEXT NOT NULL,
+ started_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ finished_at TEXT,
+ output TEXT,
+ error TEXT,
+ truncated INTEGER NOT NULL DEFAULT 0
+ );
+ `);
+ } catch (createError) {
+ databaseLogger.warn("Failed to create automation_run_steps table", {
+ operation: "schema_migration",
+ error: createError,
+ });
+ }
+ }
+
+ try {
+ sqlite.prepare("SELECT id FROM automation_channels LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec(`
+ CREATE TABLE IF NOT EXISTS automation_channels (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ automation_id INTEGER NOT NULL REFERENCES automations(id) ON DELETE CASCADE,
+ channel_id INTEGER NOT NULL REFERENCES notification_channels(id) ON DELETE CASCADE
+ );
+ `);
+ } catch (createError) {
+ databaseLogger.warn("Failed to create automation_channels table", {
+ operation: "schema_migration",
+ error: createError,
+ });
+ }
+ }
+ // --- automations end ---
+
// Seed default metrics history retention setting
try {
ensureRawSettingDefault("metrics_history_retention_days", "7");
@@ -2274,11 +2576,368 @@ const migrateSchema = () => {
}
// --- homepage end ---
+ // --- fleets begin ---
+ try {
+ sqlite.prepare("SELECT id FROM fleets LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec(`
+ CREATE TABLE IF NOT EXISTS fleets (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
+ name TEXT NOT NULL,
+ description TEXT,
+ color TEXT,
+ icon TEXT,
+ tag_rules TEXT,
+ sync_id TEXT UNIQUE,
+ created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
+ );
+ `);
+ } catch (createError) {
+ databaseLogger.warn("Failed to create fleets table", {
+ operation: "schema_migration",
+ error: createError,
+ });
+ }
+ }
+
+ try {
+ sqlite.prepare("SELECT id FROM fleet_members LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec(`
+ CREATE TABLE IF NOT EXISTS fleet_members (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ fleet_id INTEGER NOT NULL REFERENCES fleets(id) ON DELETE CASCADE,
+ host_id INTEGER NOT NULL REFERENCES ssh_data(id) ON DELETE CASCADE,
+ added_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
+ );
+ `);
+ sqlite.exec(
+ "CREATE UNIQUE INDEX IF NOT EXISTS idx_fleet_members_fleet_host ON fleet_members(fleet_id, host_id)",
+ );
+ } catch (createError) {
+ databaseLogger.warn("Failed to create fleet_members table", {
+ operation: "schema_migration",
+ error: createError,
+ });
+ }
+ }
+
+ try {
+ sqlite.prepare("SELECT id FROM fleet_inventory LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec(`
+ CREATE TABLE IF NOT EXISTS fleet_inventory (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ host_id INTEGER NOT NULL REFERENCES ssh_data(id) ON DELETE CASCADE,
+ user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
+ os_pretty_name TEXT,
+ kernel TEXT,
+ architecture TEXT,
+ hostname TEXT,
+ uptime_seconds INTEGER,
+ ip TEXT,
+ package_manager TEXT,
+ collected_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
+ );
+ `);
+ sqlite.exec(
+ "CREATE UNIQUE INDEX IF NOT EXISTS idx_fleet_inventory_host ON fleet_inventory(host_id, user_id)",
+ );
+ } catch (createError) {
+ databaseLogger.warn("Failed to create fleet_inventory table", {
+ operation: "schema_migration",
+ error: createError,
+ });
+ }
+ }
+ // --- fleets end ---
+
+ // --- workspaces begin ---
+ try {
+ sqlite.prepare("SELECT id FROM user_workspaces LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec(`
+ CREATE TABLE IF NOT EXISTS user_workspaces (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
+ name TEXT NOT NULL,
+ color TEXT,
+ icon TEXT,
+ kind TEXT NOT NULL DEFAULT 'manual',
+ is_default INTEGER NOT NULL DEFAULT 0,
+ payload TEXT NOT NULL DEFAULT '{}',
+ sync_id TEXT UNIQUE,
+ created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ last_used_at TEXT
+ );
+ `);
+ } catch (createError) {
+ databaseLogger.warn("Failed to create user_workspaces table", {
+ operation: "schema_migration",
+ error: createError,
+ });
+ }
+ }
+ // --- workspaces end ---
+
+ // --- sync begin ---
+ // Stable per-row identity used to match rows across two independently-
+ // seeded databases (the embedded desktop backend and a connected remote
+ // server) during sync. Local autoincrement ids collide across instances,
+ // so a randomly-generated id is the join key instead. SQLite refuses a
+ // non-constant DEFAULT (e.g. randomblob()) on ALTER TABLE ADD COLUMN for
+ // tables with existing constraints ("Cannot add a column with
+ // non-constant default"), so the column is added as plain nullable TEXT;
+ // repositories set syncId explicitly on insert going forward, and
+ // existing rows are backfilled by the UPDATE loop below.
+ addColumnIfNotExists("ssh_data", "sync_id", "TEXT");
+ addColumnIfNotExists("ssh_credentials", "sync_id", "TEXT");
+ addColumnIfNotExists("ssh_folders", "sync_id", "TEXT");
+ addColumnIfNotExists("snippets", "sync_id", "TEXT");
+ addColumnIfNotExists("snippet_folders", "sync_id", "TEXT");
+ addColumnIfNotExists("vault_profiles", "sync_id", "TEXT");
+ addColumnIfNotExists("dashboard_service_links", "sync_id", "TEXT");
+ // SQLite also rejects NOT NULL DEFAULT CURRENT_TIMESTAMP here for the same
+ // "non-constant default" reason -- add nullable, then backfill from
+ // created_at below and rely on the repository layer to keep it current.
+ addColumnIfNotExists("dashboard_service_links", "updated_at", "TEXT");
+ try {
+ sqlite.exec(
+ "UPDATE dashboard_service_links SET updated_at = created_at WHERE updated_at IS NULL",
+ );
+ } catch (e) {
+ const message = e instanceof Error ? e.message : String(e);
+ databaseLogger.warn(
+ `Failed to backfill dashboard_service_links.updated_at: ${message}`,
+ { operation: "schema_migration", table: "dashboard_service_links" },
+ );
+ }
+ addColumnIfNotExists("homepage_items", "sync_id", "TEXT");
+
+ const syncIdTables = [
+ "ssh_data",
+ "ssh_credentials",
+ "ssh_folders",
+ "snippets",
+ "snippet_folders",
+ "vault_profiles",
+ "dashboard_service_links",
+ "homepage_items",
+ ];
+
+ for (const table of syncIdTables) {
+ try {
+ const result = sqlite
+ .prepare(
+ `UPDATE ${table} SET sync_id = lower(hex(randomblob(16))) WHERE sync_id IS NULL`,
+ )
+ .run();
+ if (result.changes > 0) {
+ databaseLogger.info(
+ `Backfilled sync_id for ${result.changes} row(s) in ${table}`,
+ { operation: "sync_id_backfill", table },
+ );
+ }
+ sqlite.exec(
+ `CREATE UNIQUE INDEX IF NOT EXISTS idx_${table}_sync_id ON ${table}(sync_id)`,
+ );
+ } catch (e) {
+ const message = e instanceof Error ? e.message : String(e);
+ databaseLogger.warn(
+ `Failed to backfill sync_id for ${table}: ${message}`,
+ {
+ operation: "sync_id_backfill",
+ table,
+ },
+ );
+ }
+ }
+
+ try {
+ sqlite.prepare("SELECT id FROM sync_tombstones LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec(`
+ CREATE TABLE IF NOT EXISTS sync_tombstones (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
+ entity_type TEXT NOT NULL,
+ sync_id TEXT NOT NULL,
+ deleted_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
+ );
+ `);
+ sqlite.exec(
+ "CREATE INDEX IF NOT EXISTS idx_sync_tombstones_user_entity ON sync_tombstones(user_id, entity_type)",
+ );
+ } catch (createError) {
+ databaseLogger.warn("Failed to create sync_tombstones table", {
+ operation: "schema_migration",
+ error: createError,
+ });
+ }
+ }
+ // --- sync end ---
+
+ // --- ai begin ---
+ try {
+ sqlite.prepare("SELECT id FROM ai_providers LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec(`
+ CREATE TABLE IF NOT EXISTS ai_providers (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
+ provider_type TEXT NOT NULL,
+ label TEXT NOT NULL,
+ base_url TEXT,
+ api_key TEXT,
+ api_key_prefix TEXT,
+ default_model TEXT,
+ enabled INTEGER NOT NULL DEFAULT 1,
+ created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ UNIQUE(user_id, label)
+ );
+ `);
+ } catch (createError) {
+ databaseLogger.warn("Failed to create ai_providers table", {
+ operation: "schema_migration",
+ error: createError,
+ });
+ }
+ }
+
+ try {
+ sqlite.prepare("SELECT id FROM ai_conversations LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec(`
+ CREATE TABLE IF NOT EXISTS ai_conversations (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
+ title TEXT,
+ provider_id INTEGER,
+ model TEXT,
+ created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
+ );
+ `);
+ } catch (createError) {
+ databaseLogger.warn("Failed to create ai_conversations table", {
+ operation: "schema_migration",
+ error: createError,
+ });
+ }
+ }
+
+ try {
+ sqlite.prepare("SELECT id FROM ai_messages LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec(`
+ CREATE TABLE IF NOT EXISTS ai_messages (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ conversation_id INTEGER NOT NULL REFERENCES ai_conversations(id) ON DELETE CASCADE,
+ role TEXT NOT NULL,
+ content TEXT NOT NULL DEFAULT '',
+ tool_calls TEXT,
+ created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
+ );
+ `);
+ } catch (createError) {
+ databaseLogger.warn("Failed to create ai_messages table", {
+ operation: "schema_migration",
+ error: createError,
+ });
+ }
+ }
+
+ try {
+ sqlite.prepare("SELECT id FROM ai_proposals LIMIT 1").get();
+ } catch {
+ try {
+ sqlite.exec(`
+ CREATE TABLE IF NOT EXISTS ai_proposals (
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
+ conversation_id INTEGER NOT NULL REFERENCES ai_conversations(id) ON DELETE CASCADE,
+ user_id TEXT NOT NULL REFERENCES users(id) ON DELETE CASCADE,
+ kind TEXT NOT NULL,
+ summary TEXT,
+ payload TEXT NOT NULL DEFAULT '{}',
+ status TEXT NOT NULL DEFAULT 'pending',
+ applied_at TEXT,
+ result_summary TEXT,
+ created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
+ );
+ `);
+ } catch (createError) {
+ databaseLogger.warn("Failed to create ai_proposals table", {
+ operation: "schema_migration",
+ error: createError,
+ });
+ }
+ }
+
+ // --- ai end ---
+
+ // Audit trails and session recordings used to be deleted along with the user
+ // they referenced, which defeats the point of keeping them.
+ migrateAuditRetention(sqlite);
+
+ // Runs last so every table and column added above already exists.
+ createPerformanceIndexes(sqlite);
+
databaseLogger.success("Schema migration completed", {
operation: "schema_migration",
});
};
+// A trivial telemetry write forces `serialize()` to rewrite every free page
+// along with the live ones, so a database that has accumulated a large
+// freelist (from years of unbounded metrics/audit growth before retention
+// pruning existed) turns every future save into a multi-megabyte rewrite.
+// Reclaiming that space once at startup keeps steady-state saves cheap.
+const VACUUM_FREELIST_COUNT_THRESHOLD = 2000;
+const VACUUM_FREELIST_RATIO_THRESHOLD = 0.5;
+
+function vacuumIfFreelistBloated(): void {
+ try {
+ const pageCount = sqlite.pragma("page_count", { simple: true }) as number;
+ const freelistCount = sqlite.pragma("freelist_count", {
+ simple: true,
+ }) as number;
+ if (pageCount <= 0) return;
+
+ const freelistRatio = freelistCount / pageCount;
+ if (
+ freelistCount < VACUUM_FREELIST_COUNT_THRESHOLD ||
+ freelistRatio < VACUUM_FREELIST_RATIO_THRESHOLD
+ ) {
+ return;
+ }
+
+ databaseLogger.info("Reclaiming bloated SQLite freelist on startup", {
+ operation: "db_startup_vacuum",
+ pageCount,
+ freelistCount,
+ freelistRatio,
+ });
+ sqlite.exec("VACUUM");
+ } catch (error) {
+ databaseLogger.warn("Failed to vacuum database on startup", {
+ operation: "db_startup_vacuum_failed",
+ error: error instanceof Error ? error.message : String(error),
+ });
+ }
+}
+
// Callers here do not coordinate with each other, and only DatabaseSaveTrigger
// tracks whether a save is already running. Overlapping saves can write an
// older snapshot last, so run them in order.
@@ -2350,9 +3009,7 @@ async function handlePostInitFileEncryption() {
databaseLogger.warn("Failed to cleanup old migration files", {
operation: "migration_cleanup_startup_failed",
error:
- cleanupError instanceof Error
- ? cleanupError.message
- : "Unknown error",
+ getErrorMessage(cleanupError),
});
}
} catch (error) {
@@ -2367,10 +3024,54 @@ async function handlePostInitFileEncryption() {
}
async function initializeDatabase(): Promise {
+ const dialect = resolveDatabaseDialect();
+
+ if (dialect !== "sqlite") {
+ await initializeRemoteDatabase(dialect);
+ return;
+ }
+
await initializeCompleteDatabase();
await handlePostInitFileEncryption();
}
+/**
+ * Startup against Postgres or MySQL.
+ *
+ * Shorter than the SQLite path because most of what that one does has no
+ * counterpart here: there is no file to decrypt, no in-memory copy to keep in
+ * step with disk, and the schema comes from drizzle-kit migrations instead of
+ * the inline DDL below.
+ *
+ * What does carry over is the settings cache. 27 call sites read settings
+ * synchronously, which better-sqlite3 allows and no remote driver does, so the
+ * table is loaded once here before anything asks for it.
+ */
+async function initializeRemoteDatabase(
+ dialect: Exclude,
+): Promise {
+ databaseLogger.info(`Connecting to ${dialect} database`, {
+ operation: "db_init",
+ dialect,
+ });
+
+ db = await connectRemoteDatabase(dialect);
+ await runRemoteMigrations(dialect, db);
+
+ // Imported here rather than at the top: factory.ts imports getDb from this
+ // module, and a static import would close the cycle at module-load time.
+ const { primeCurrentSettingsCache, startSettingsCacheRefresh } = await import(
+ "../repositories/factory.js"
+ );
+ await primeCurrentSettingsCache();
+ startSettingsCacheRefresh();
+
+ databaseLogger.info(`${dialect} database ready`, {
+ operation: "db_init_complete",
+ dialect,
+ });
+}
+
export { initializeDatabase };
async function cleanupDatabase() {
@@ -2395,7 +3096,7 @@ async function cleanupDatabase() {
} catch (error) {
databaseLogger.warn("Error closing database connection", {
operation: "db_close_error",
- error: error instanceof Error ? error.message : "Unknown error",
+ error: getErrorMessage(error),
});
}
@@ -2448,9 +3149,9 @@ process.on("SIGTERM", async () => {
process.exit(0);
});
-let db: ReturnType>;
+let db: PortableDatabase;
-export function getDb(): ReturnType> {
+export function getDb(): PortableDatabase {
if (!db) {
throw new Error(
"Database not initialized. Ensure initializeDatabase() is called before accessing db.",
@@ -2461,6 +3162,13 @@ export function getDb(): ReturnType> {
export function getSqlite(): Database.Database {
if (!sqlite) {
+ const dialect = resolveDatabaseDialect();
+ if (dialect !== "sqlite") {
+ throw new Error(
+ `No SQLite handle: DATABASE_DIALECT is "${dialect}". This caller needs a ` +
+ `synchronous query, which only SQLite offers โ give it an async path instead.`,
+ );
+ }
throw new Error(
"SQLite not initialized. Ensure initializeDatabase() is called before accessing sqlite.",
);
diff --git a/src/backend/database/db/migrate.ts b/src/backend/database/db/migrate.ts
new file mode 100644
index 0000000..57d9991
--- /dev/null
+++ b/src/backend/database/db/migrate.ts
@@ -0,0 +1,51 @@
+import path from "path";
+import type { DatabaseDialect } from "./dialect.js";
+import type { PortableDatabase } from "../repositories/database-context.js";
+
+export const MIGRATIONS_DIR_ENV = "DRIZZLE_MIGRATIONS_DIR";
+
+/**
+ * Where the generated migrations live.
+ *
+ * SQLite does not appear here: it builds its schema from the DDL in index.ts
+ * and patches it forward with migrateSchema(). Only the client-server engines
+ * use drizzle-kit migrations, and each has its own folder because the
+ * generated SQL differs per dialect.
+ */
+export function migrationsFolder(
+ dialect: DatabaseDialect,
+ env: NodeJS.ProcessEnv = process.env,
+): string {
+ const override = env[MIGRATIONS_DIR_ENV]?.trim();
+ const root = override || path.resolve(process.cwd(), "drizzle");
+ return path.join(root, dialect);
+}
+
+/**
+ * Brings a remote database up to the current schema.
+ *
+ * drizzle's migrator records what it has applied in its own table, so this is
+ * safe to run on every start โ including against a database another instance
+ * already migrated.
+ */
+export async function runRemoteMigrations(
+ dialect: DatabaseDialect,
+ db: PortableDatabase,
+ env: NodeJS.ProcessEnv = process.env,
+): Promise {
+ if (dialect === "sqlite") {
+ throw new Error("SQLite builds its schema in index.ts, not from drizzle/");
+ }
+
+ const folder = migrationsFolder(dialect, env);
+
+ const { migrate } =
+ dialect === "postgres"
+ ? await import("drizzle-orm/node-postgres/migrator")
+ : await import("drizzle-orm/mysql2/migrator");
+
+ await (migrate as (db: unknown, config: { migrationsFolder: string }) => Promise)(
+ db,
+ { migrationsFolder: folder },
+ );
+}
diff --git a/src/backend/database/db/performance-indexes.ts b/src/backend/database/db/performance-indexes.ts
new file mode 100644
index 0000000..2e1ca83
--- /dev/null
+++ b/src/backend/database/db/performance-indexes.ts
@@ -0,0 +1,352 @@
+import { databaseLogger } from "../../utils/logger.js";
+
+/**
+ * Indexes for the columns the app filters, joins and sorts on.
+ *
+ * Most tables here are scoped per user or per host and were previously reached
+ * with a full table scan on every read: the foreign keys existed, but SQLite
+ * does not index the child side of a foreign key on its own. That is fine for a
+ * home install with a handful of hosts and invisible in testing; on an install
+ * with thousands of hosts and a large audit trail it is the dominant cost of a
+ * request.
+ *
+ * Ordering within a composite matters: the equality column comes first and the
+ * range/sort column second, so the same index serves both the filter and the
+ * ORDER BY.
+ */
+export interface PerformanceIndex {
+ name: string;
+ table: string;
+ columns: string;
+ /** Enforces a constraint as well as serving reads, e.g. one row per key. */
+ unique?: boolean;
+}
+
+export const PERFORMANCE_INDEXES: PerformanceIndex[] = [
+ // Host list: the single hottest read in the app.
+ { name: "idx_ssh_data_user_id", table: "ssh_data", columns: "user_id" },
+ {
+ name: "idx_ssh_data_parent_host",
+ table: "ssh_data",
+ columns: "parent_host_id",
+ },
+ {
+ name: "idx_ssh_data_credential",
+ table: "ssh_data",
+ columns: "credential_id",
+ },
+
+ // Sharing: resolved for every host list request and every permission check.
+ { name: "idx_host_access_user_id", table: "host_access", columns: "user_id" },
+ { name: "idx_host_access_role_id", table: "host_access", columns: "role_id" },
+ { name: "idx_host_access_host_id", table: "host_access", columns: "host_id" },
+ {
+ name: "idx_host_access_expires_at",
+ table: "host_access",
+ columns: "expires_at",
+ },
+
+ // Audit log: grows without bound and is always read newest-first.
+ {
+ name: "idx_audit_logs_timestamp",
+ table: "audit_logs",
+ columns: "timestamp",
+ },
+ {
+ name: "idx_audit_logs_user_ts",
+ table: "audit_logs",
+ columns: "user_id, timestamp",
+ },
+ {
+ name: "idx_audit_logs_action_ts",
+ table: "audit_logs",
+ columns: "action, timestamp",
+ },
+ {
+ name: "idx_audit_logs_resource_ts",
+ table: "audit_logs",
+ columns: "resource_type, timestamp",
+ },
+
+ // Auth hot path: touched on every authenticated request.
+ { name: "idx_sessions_user_id", table: "sessions", columns: "user_id" },
+ { name: "idx_sessions_expires_at", table: "sessions", columns: "expires_at" },
+ { name: "idx_user_roles_user_id", table: "user_roles", columns: "user_id" },
+ { name: "idx_user_roles_role_id", table: "user_roles", columns: "role_id" },
+ {
+ name: "idx_trusted_devices_user_id",
+ table: "trusted_devices",
+ columns: "user_id",
+ },
+ { name: "idx_api_keys_user_id", table: "api_keys", columns: "user_id" },
+
+ // Credentials and folders.
+ {
+ name: "idx_ssh_credentials_user_id",
+ table: "ssh_credentials",
+ columns: "user_id",
+ },
+ { name: "idx_ssh_folders_user_id", table: "ssh_folders", columns: "user_id" },
+ {
+ name: "idx_ssh_credential_usage_credential",
+ table: "ssh_credential_usage",
+ columns: "credential_id",
+ },
+ {
+ name: "idx_ssh_credential_usage_user",
+ table: "ssh_credential_usage",
+ columns: "user_id",
+ },
+
+ // Snippets.
+ { name: "idx_snippets_user_id", table: "snippets", columns: "user_id" },
+ {
+ name: "idx_snippet_access_user_id",
+ table: "snippet_access",
+ columns: "user_id",
+ },
+ {
+ name: "idx_snippet_access_snippet_id",
+ table: "snippet_access",
+ columns: "snippet_id",
+ },
+ {
+ name: "idx_snippet_access_role_id",
+ table: "snippet_access",
+ columns: "role_id",
+ },
+
+ // Per-user history and file manager surfaces.
+ {
+ name: "idx_recent_activity_user_ts",
+ table: "recent_activity",
+ columns: "user_id, timestamp",
+ },
+ {
+ name: "idx_command_history_user_host",
+ table: "command_history",
+ columns: "user_id, host_id",
+ },
+ {
+ name: "idx_file_manager_recent_user",
+ table: "file_manager_recent",
+ columns: "user_id, host_id",
+ },
+ {
+ name: "idx_file_manager_pinned_user",
+ table: "file_manager_pinned",
+ columns: "user_id, host_id",
+ },
+ {
+ name: "idx_file_manager_shortcuts_user",
+ table: "file_manager_shortcuts",
+ columns: "user_id, host_id",
+ },
+ {
+ name: "idx_transfer_recent_user",
+ table: "transfer_recent",
+ columns: "user_id",
+ },
+ {
+ name: "idx_user_open_tabs_user_id",
+ table: "user_open_tabs",
+ columns: "user_id",
+ },
+ {
+ name: "idx_user_workspaces_user_id",
+ table: "user_workspaces",
+ columns: "user_id",
+ },
+ {
+ name: "idx_homepage_items_user_id",
+ table: "homepage_items",
+ columns: "user_id",
+ },
+ {
+ name: "idx_dismissed_alerts_user_id",
+ table: "dismissed_alerts",
+ columns: "user_id",
+ },
+
+ // Recordings and live session sharing.
+ {
+ name: "idx_session_recordings_user_started",
+ table: "session_recordings",
+ columns: "user_id, started_at",
+ },
+ {
+ name: "idx_session_recordings_host",
+ table: "session_recordings",
+ columns: "host_id",
+ },
+ {
+ name: "idx_session_shares_session_id",
+ table: "session_shares",
+ columns: "session_id",
+ },
+ {
+ name: "idx_session_shares_host_id",
+ table: "session_shares",
+ columns: "host_id",
+ },
+
+ // Fleets.
+ {
+ name: "idx_fleet_members_fleet",
+ table: "fleet_members",
+ columns: "fleet_id",
+ },
+ {
+ name: "idx_fleet_members_host",
+ table: "fleet_members",
+ columns: "host_id",
+ },
+ {
+ name: "idx_fleet_inventory_user",
+ table: "fleet_inventory",
+ columns: "user_id",
+ },
+
+ // Alerting.
+ {
+ name: "idx_alert_firings_rule",
+ table: "alert_firings",
+ columns: "rule_id, fired_at",
+ },
+ {
+ name: "idx_alert_firings_host",
+ table: "alert_firings",
+ columns: "host_id",
+ },
+
+ // Automations.
+ {
+ name: "idx_automations_user",
+ table: "automations",
+ columns: "user_id, enabled",
+ },
+ {
+ name: "idx_automation_trigger_state_key",
+ table: "automation_trigger_state",
+ columns: "automation_id, state_key",
+ unique: true,
+ },
+ {
+ name: "idx_automation_schedules_automation",
+ table: "automation_schedules",
+ columns: "automation_id",
+ unique: true,
+ },
+ {
+ name: "idx_automation_schedules_due",
+ table: "automation_schedules",
+ columns: "next_due_at",
+ },
+ {
+ name: "idx_automation_runs_automation",
+ table: "automation_runs",
+ columns: "automation_id, started_at",
+ },
+ {
+ name: "idx_automation_runs_user",
+ table: "automation_runs",
+ columns: "user_id, started_at",
+ },
+ {
+ name: "idx_automation_run_steps_run",
+ table: "automation_run_steps",
+ columns: "run_id, step_index",
+ },
+ {
+ name: "idx_automation_channels_pair",
+ table: "automation_channels",
+ columns: "automation_id, channel_id",
+ unique: true,
+ },
+
+ // AI assistant.
+ {
+ name: "idx_ai_providers_user_label",
+ table: "ai_providers",
+ columns: "user_id, label",
+ unique: true,
+ },
+ {
+ name: "idx_ai_conversations_user",
+ table: "ai_conversations",
+ columns: "user_id, updated_at",
+ },
+ {
+ name: "idx_ai_messages_conversation",
+ table: "ai_messages",
+ columns: "conversation_id, created_at",
+ },
+ {
+ name: "idx_ai_proposals_user",
+ table: "ai_proposals",
+ columns: "user_id, status",
+ },
+ {
+ name: "idx_ai_proposals_conversation",
+ table: "ai_proposals",
+ columns: "conversation_id",
+ },
+];
+
+interface IndexableDatabase {
+ exec(sql: string): unknown;
+}
+
+export interface IndexCreationSummary {
+ created: number;
+ skipped: number;
+ failed: number;
+}
+
+/**
+ * Creates any missing index, leaving existing ones untouched.
+ *
+ * A failure here is logged and skipped rather than thrown: an index is a pure
+ * optimisation, and a table that a given install has not created yet (or a
+ * column an older schema is missing) must not stop the server from booting.
+ */
+export function createPerformanceIndexes(
+ db: IndexableDatabase,
+ indexes: PerformanceIndex[] = PERFORMANCE_INDEXES,
+): IndexCreationSummary {
+ const summary: IndexCreationSummary = { created: 0, skipped: 0, failed: 0 };
+ const startedAt = Date.now();
+
+ for (const index of indexes) {
+ try {
+ db.exec(
+ `CREATE ${index.unique ? "UNIQUE " : ""}INDEX IF NOT EXISTS ${index.name} ON ${index.table}(${index.columns})`,
+ );
+ summary.created++;
+ } catch (error) {
+ const message = error instanceof Error ? error.message : String(error);
+ // A missing table or column means this install does not have that
+ // feature's schema; nothing to index and nothing to warn loudly about.
+ if (/no such table|no such column/i.test(message)) {
+ summary.skipped++;
+ continue;
+ }
+ summary.failed++;
+ databaseLogger.warn(`Could not create index ${index.name}: ${message}`, {
+ operation: "performance_index_create",
+ index: index.name,
+ table: index.table,
+ });
+ }
+ }
+
+ databaseLogger.info(
+ `Performance indexes ready in ${Date.now() - startedAt}ms`,
+ {
+ operation: "performance_index_create",
+ ...summary,
+ },
+ );
+
+ return summary;
+}
diff --git a/src/backend/database/db/schema.mysql.ts b/src/backend/database/db/schema.mysql.ts
new file mode 100644
index 0000000..97253eb
--- /dev/null
+++ b/src/backend/database/db/schema.mysql.ts
@@ -0,0 +1,1941 @@
+// GENERATED FILE โ do not edit.
+//
+// Produced from schema.ts by scripts/generate-dialect-schema.cjs.
+// Edit the sqlite schema and re-run `node scripts/generate-dialect-schema.cjs`.
+// Target dialect: mysql.
+//
+// DDL source for drizzle-kit. NOT imported to run queries โ repositories use
+// schema.ts on every dialect. See the generator header for why that is correct.
+
+import {
+ mysqlTable,
+ text,
+ varchar,
+ int,
+ boolean,
+ double,
+ index,
+ uniqueIndex,
+ type AnyMySqlColumn,
+} from "drizzle-orm/mysql-core";
+import { sql } from "drizzle-orm";
+
+export const users = mysqlTable("users", {
+ id: varchar("id", { length: 255 }).primaryKey(),
+ username: text("username").notNull(),
+ passwordHash: text("password_hash").notNull(),
+ isAdmin: boolean("is_admin").notNull().default(false),
+
+ isOidc: boolean("is_oidc").notNull().default(false),
+ oidcIdentifier: text("oidc_identifier"),
+ ssoProviderId: int("sso_provider_id"),
+ clientId: text("client_id"),
+ clientSecret: text("client_secret"),
+ issuerUrl: text("issuer_url"),
+ authorizationUrl: text("authorization_url"),
+ tokenUrl: text("token_url"),
+ identifierPath: text("identifier_path"),
+ namePath: text("name_path"),
+ scopes: text().default("openid email profile"),
+
+ totpSecret: text("totp_secret"),
+ totpEnabled: boolean("totp_enabled")
+ .notNull()
+ .default(false),
+ totpBackupCodes: text("totp_backup_codes"),
+
+ registeredAt: text("registered_at").notNull().default(sql`(CURRENT_TIMESTAMP)`),
+ donationModalDismissed: boolean("donation_modal_dismissed")
+ .notNull()
+ .default(false),
+});
+
+export const settings = mysqlTable("settings", {
+ key: varchar("key", { length: 255 }).primaryKey(),
+ value: text("value").notNull(),
+});
+
+export const ssoProviders = mysqlTable("sso_providers", {
+ id: int("id").autoincrement().primaryKey(),
+ name: varchar("name", { length: 255 }).notNull(),
+ type: text("type").notNull(),
+ enabled: boolean("enabled").notNull().default(true),
+ displayOrder: int("display_order").notNull().default(0),
+ config: text("config").notNull(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+
+export const sessions = mysqlTable(
+ "sessions",
+ {
+ id: varchar("id", { length: 255 }).primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ jwtToken: text("jwt_token").notNull(),
+ deviceType: text("device_type").notNull(),
+ deviceInfo: text("device_info").notNull(),
+ oidcSub: text("oidc_sub"),
+ oidcSid: text("oidc_sid"),
+ ssoProviderId: int("sso_provider_id"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ expiresAt: varchar("expires_at", { length: 255 }).notNull(),
+ lastActiveAt: text("last_active_at")
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ // Listing a user's devices, and the startup sweep of expired rows.
+ (table) => [
+ index("idx_sessions_user_id").on(table.userId),
+ index("idx_sessions_expires_at").on(table.expiresAt),
+ ],
+);
+
+export const trustedDevices = mysqlTable(
+ "trusted_devices",
+ {
+ id: varchar("id", { length: 255 }).primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ deviceFingerprint: text("device_fingerprint").notNull(),
+ deviceType: text("device_type").notNull(),
+ deviceInfo: text("device_info").notNull(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ expiresAt: varchar("expires_at", { length: 255 }).notNull(),
+ lastUsedAt: text("last_used_at")
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [index("idx_trusted_devices_user_id").on(table.userId)],
+);
+
+export const webauthnCredentials = mysqlTable("webauthn_credentials", {
+ id: varchar("id", { length: 255 }).primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ credentialId: varchar("credential_id", { length: 255 }).notNull(),
+ publicKey: text("public_key").notNull(),
+ counter: int("counter").notNull().default(0),
+ deviceType: text("device_type"),
+ backedUp: boolean("backed_up").notNull().default(false),
+ transports: text("transports"),
+ userVerification: text("user_verification").notNull().default("preferred"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ lastUsedAt: text("last_used_at"),
+});
+
+export const hosts = mysqlTable(
+ "ssh_data",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ connectionType: text("connection_type").notNull().default("ssh"),
+ name: varchar("name", { length: 255 }),
+ ip: text("ip").notNull(),
+ port: int("port").notNull(),
+ username: text("username").notNull(),
+ folder: text("folder"),
+ // Sub-host nesting: a host acting as an organizational parent for other
+ // hosts, mutually exclusive with folder (see host route validation).
+ parentHostId: int("parent_host_id").references(
+ (): AnyMySqlColumn => hosts.id,
+ { onDelete: "set null" },
+ ),
+ tags: text("tags"),
+ pin: boolean("pin").notNull().default(false),
+ // Manual drag-to-reorder position within a folder. Null means the host has
+ // never been manually reordered; falls back to name sort in that case.
+ sortOrder: int("sort_order"),
+ authType: text("auth_type").notNull(),
+ useWarpgate: boolean("use_warpgate").notNull().default(false),
+ shareSshAuth: boolean("share_ssh_auth")
+ .notNull()
+ .default(false),
+ forceKeyboardInteractive: text("force_keyboard_interactive"),
+
+ password: text("password"),
+ key: text("key"),
+ keyPassword: text("key_password"),
+ keyType: text("key_type"),
+ sudoPassword: text("sudo_password"),
+
+ autostartPassword: text("autostart_password"),
+ autostartKey: text("autostart_key"),
+ autostartKeyPassword: text("autostart_key_password"),
+
+ credentialId: int("credential_id").references(() => sshCredentials.id, { onDelete: "set null" }),
+ overrideCredentialUsername: boolean("override_credential_username"),
+ // When authType is "vault", the host authenticates via a Vault SSH signer
+ // profile (shared settings, no secrets). The signing certificate is obtained
+ // per-user at connect time via an interactive Vault OIDC flow.
+ vaultProfileId: int("vault_profile_id").references(
+ () => vaultProfiles.id,
+ { onDelete: "set null" },
+ ),
+ enableTerminal: boolean("enable_terminal")
+ .notNull()
+ .default(true),
+ enableSessionLogging: boolean("enable_session_logging")
+ .notNull()
+ .default(true),
+ allowSessionSharing: boolean("allow_session_sharing")
+ .notNull()
+ .default(true),
+ enableCommandHistory: boolean("enable_command_history")
+ .notNull()
+ .default(true),
+ enableTunnel: boolean("enable_tunnel")
+ .notNull()
+ .default(true),
+ tunnelConnections: text("tunnel_connections"),
+ jumpHosts: text("jump_hosts"),
+ enableFileManager: boolean("enable_file_manager")
+ .notNull()
+ .default(true),
+ scpLegacy: boolean("scp_legacy").notNull().default(false),
+ enableDocker: boolean("enable_docker")
+ .notNull()
+ .default(false),
+ enableTmuxMonitor: boolean("enable_tmux_monitor")
+ .notNull()
+ .default(false),
+ enableTerminalToolbar: boolean("enable_terminal_toolbar")
+ .notNull()
+ .default(true),
+ showTerminalInSidebar: boolean("show_terminal_in_sidebar")
+ .notNull()
+ .default(true),
+ showFileManagerInSidebar: boolean("show_file_manager_in_sidebar")
+ .notNull()
+ .default(false),
+ showTunnelInSidebar: boolean("show_tunnel_in_sidebar")
+ .notNull()
+ .default(false),
+ showDockerInSidebar: boolean("show_docker_in_sidebar")
+ .notNull()
+ .default(false),
+ showServerStatsInSidebar: boolean("show_server_stats_in_sidebar")
+ .notNull()
+ .default(false),
+ defaultPath: text("default_path"),
+ statsConfig: text("stats_config"),
+ dockerConfig: text("docker_config"),
+ enableProxmox: boolean("enable_proxmox")
+ .notNull()
+ .default(false),
+ proxmoxConfig: text("proxmox_config"),
+ enableProxmoxStats: boolean("enable_proxmox_stats")
+ .notNull()
+ .default(false),
+ proxmoxStatsConfig: text("proxmox_stats_config"),
+ terminalConfig: text("terminal_config"),
+ quickActions: text("quick_actions"),
+ notes: text("notes"),
+ enableSsh: boolean("enable_ssh").notNull().default(true),
+ enableRdp: boolean("enable_rdp").notNull().default(false),
+ enableVnc: boolean("enable_vnc").notNull().default(false),
+ enableTelnet: boolean("enable_telnet").notNull().default(false),
+
+ sshPort: int("ssh_port").default(22),
+ rdpPort: int("rdp_port").default(3389),
+ vncPort: int("vnc_port").default(5900),
+ telnetPort: int("telnet_port").default(23),
+
+ rdpCredentialId: int("rdp_credential_id").references(() => sshCredentials.id, { onDelete: "set null" }),
+ rdpUser: text("rdp_user"),
+ rdpPassword: text("rdp_password"),
+ rdpDomain: text("rdp_domain"),
+ rdpSecurity: text("rdp_security"),
+ rdpIgnoreCert: boolean("rdp_ignore_cert").default(false),
+
+ vncCredentialId: int("vnc_credential_id").references(() => sshCredentials.id, { onDelete: "set null" }),
+ vncPassword: text("vnc_password"),
+ vncUser: text("vnc_user"),
+
+ telnetUser: text("telnet_user"),
+ telnetPassword: text("telnet_password"),
+ telnetCredentialId: int("telnet_credential_id").references(() => sshCredentials.id, { onDelete: "set null" }),
+
+ rdpAuthType: text("rdp_auth_type"),
+ vncAuthType: text("vnc_auth_type"),
+ telnetAuthType: text("telnet_auth_type"),
+
+ domain: text("domain"),
+ security: text("security"),
+ ignoreCert: boolean("ignore_cert").default(false),
+ guacamoleConfig: text("guacamole_config"),
+
+ useSocks5: boolean("use_socks5"),
+ socks5Host: text("socks5_host"),
+ socks5Port: int("socks5_port"),
+ socks5Username: text("socks5_username"),
+ socks5Password: text("socks5_password"),
+ socks5ProxyChain: text("socks5_proxy_chain"),
+
+ // null = use the desktop app's global default; "local" | "remote" pins
+ // this specific host's SSH/Docker-console/Serial connections to originate
+ // from the embedded local backend or a connected remote sync server.
+ // Ignored for rdp/vnc/telnet, which always require the remote server.
+ connectionOrigin: text("connection_origin"),
+
+ macAddress: text("mac_address"),
+ wolBroadcastAddress: text("wol_broadcast_address"),
+ portKnockSequence: text("port_knock_sequence"),
+
+ hostKeyFingerprint: text("host_key_fingerprint"),
+ hostKeyType: text("host_key_type"),
+ hostKeyAlgorithm: text("host_key_algorithm").default("sha256"),
+ hostKeyFirstSeen: text("host_key_first_seen"),
+ hostKeyLastVerified: text("host_key_last_verified"),
+ hostKeyChangedCount: int("host_key_changed_count").default(0),
+
+ // Stable identity used to match this row across two independently-seeded
+ // databases (the embedded backend and a connected remote server) during
+ // sync -- local autoincrement ids collide across instances.
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ // Every host read is scoped by owner, so user_id carries the host list.
+ //
+ // `folder` is deliberately not indexed: on Postgres/MySQL an indexed text
+ // column is generated as varchar(255), and folder holds a joined nested path
+ // with no length cap, so indexing it would truncate deep hierarchies.
+ (table) => [
+ index("idx_ssh_data_user_id").on(table.userId),
+ index("idx_ssh_data_parent_host").on(table.parentHostId),
+ index("idx_ssh_data_credential").on(table.credentialId),
+ ],
+);
+
+export const fileManagerRecent = mysqlTable(
+ "file_manager_recent",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ path: text("path").notNull(),
+ lastOpened: text("last_opened")
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ // Every file manager surface is read for one user on one host at a time.
+ (table) => [
+ index("idx_file_manager_recent_user").on(table.userId, table.hostId),
+ ],
+);
+
+export const fileManagerPinned = mysqlTable(
+ "file_manager_pinned",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ path: text("path").notNull(),
+ pinnedAt: text("pinned_at")
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [
+ index("idx_file_manager_pinned_user").on(table.userId, table.hostId),
+ ],
+);
+
+export const fileManagerShortcuts = mysqlTable(
+ "file_manager_shortcuts",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ path: text("path").notNull(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [
+ index("idx_file_manager_shortcuts_user").on(table.userId, table.hostId),
+ ],
+);
+
+export const transferRecent = mysqlTable(
+ "transfer_recent",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ sourceHostId: int("source_host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ destHostId: int("dest_host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ destPath: text("dest_path").notNull(),
+ destPathLabel: text("dest_path_label").notNull(),
+ lastUsed: text("last_used")
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [index("idx_transfer_recent_user").on(table.userId)],
+);
+
+export const dismissedAlerts = mysqlTable(
+ "dismissed_alerts",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ alertId: text("alert_id").notNull(),
+ dismissedAt: text("dismissed_at")
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [index("idx_dismissed_alerts_user_id").on(table.userId)],
+);
+
+export const sshCredentials = mysqlTable(
+ "ssh_credentials",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ description: text("description"),
+ folder: text("folder"),
+ tags: text("tags"),
+ pin: boolean("pin").notNull().default(false),
+ // Manual drag-to-reorder position within a folder. Null means the
+ // credential has never been manually reordered; falls back to name sort
+ // in that case, same convention as hosts.sortOrder.
+ sortOrder: int("sort_order"),
+ authType: text("auth_type").notNull(),
+ username: text("username"),
+ password: text("password"),
+ key: text("key"),
+ privateKey: text("private_key"),
+ publicKey: text("public_key"),
+ keyPassword: text("key_password"),
+ keyType: text("key_type"),
+ detectedKeyType: text("detected_key_type"),
+
+ certPublicKey: text("cert_public_key"),
+
+
+ usageCount: int("usage_count").notNull().default(0),
+ lastUsed: text("last_used"),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [index("idx_ssh_credentials_user_id").on(table.userId)],
+);
+
+export const sshCredentialUsage = mysqlTable(
+ "ssh_credential_usage",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ credentialId: int("credential_id")
+ .notNull()
+ .references(() => sshCredentials.id, { onDelete: "cascade" }),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ usedAt: text("used_at")
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [
+ index("idx_ssh_credential_usage_credential").on(table.credentialId),
+ index("idx_ssh_credential_usage_user").on(table.userId),
+ ],
+);
+
+export const snippets = mysqlTable(
+ "snippets",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ content: text("content").notNull(),
+ description: text("description"),
+ folder: text("folder"),
+ order: int("order").notNull().default(0),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ hostFilter: text("host_filter"),
+ isNote: boolean("is_note").notNull().default(false),
+ },
+ (table) => [index("idx_snippets_user_id").on(table.userId)],
+);
+
+export const snippetFolders = mysqlTable("snippet_folders", {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ color: text("color"),
+ icon: text("icon"),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+
+export const c2sTunnelPresets = mysqlTable("c2s_tunnel_presets", {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ config: text("config").notNull(),
+ platform: text("platform"),
+ computerName: text("computer_name"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+
+export const snippetAccess = mysqlTable(
+ "snippet_access",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ snippetId: int("snippet_id")
+ .notNull()
+ .references(() => snippets.id, { onDelete: "cascade" }),
+
+ userId: varchar("user_id", { length: 255 }).references(() => users.id, { onDelete: "cascade" }),
+ roleId: int("role_id").references(() => roles.id, {
+ onDelete: "cascade",
+ }),
+
+ grantedBy: varchar("granted_by", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+
+ permissionLevel: text("permission_level").notNull().default("view"),
+
+ expiresAt: varchar("expires_at", { length: 255 }),
+
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ // Same three lookup shapes as host_access: by grantee, by role, by snippet.
+ (table) => [
+ index("idx_snippet_access_user_id").on(table.userId),
+ index("idx_snippet_access_snippet_id").on(table.snippetId),
+ index("idx_snippet_access_role_id").on(table.roleId),
+ ],
+);
+
+export const sshFolders = mysqlTable(
+ "ssh_folders",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ color: text("color"),
+ icon: text("icon"),
+ credentialId: int("credential_id").references(() => sshCredentials.id, {
+ onDelete: "set null",
+ }),
+ // Manual drag-to-reorder position among sibling folders. Null falls back
+ // to name sort, same convention as hosts.sortOrder.
+ sortOrder: int("sort_order"),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [index("idx_ssh_folders_user_id").on(table.userId)],
+);
+
+export const recentActivity = mysqlTable(
+ "recent_activity",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ type: text("type").notNull(),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ hostName: text("host_name"),
+ timestamp: varchar("timestamp", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ // Always read newest-first for one user, so timestamp follows user_id.
+ (table) => [
+ index("idx_recent_activity_user_ts").on(table.userId, table.timestamp),
+ ],
+);
+
+export const commandHistory = mysqlTable(
+ "command_history",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ command: text("command").notNull(),
+ executedAt: text("executed_at")
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [
+ index("idx_command_history_user_host").on(table.userId, table.hostId),
+ ],
+);
+
+export const networkTopology = mysqlTable("network_topology", {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ topology: text("topology"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+
+export const hostAccess = mysqlTable(
+ "host_access",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+
+ userId: varchar("user_id", { length: 255 })
+ .references(() => users.id, { onDelete: "cascade" }),
+ roleId: int("role_id")
+ .references(() => roles.id, { onDelete: "cascade" }),
+
+ grantedBy: varchar("granted_by", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+
+ permissionLevel: text("permission_level")
+ .notNull()
+ .default("connect"),
+
+ expiresAt: varchar("expires_at", { length: 255 }),
+
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ lastAccessedAt: text("last_accessed_at"),
+ accessCount: int("access_count").notNull().default(0),
+ },
+ // Resolved on every host list request and every permission check, so all
+ // three lookup shapes (by grantee, by role, by host) need to be indexed.
+ (table) => [
+ index("idx_host_access_user_id").on(table.userId),
+ index("idx_host_access_role_id").on(table.roleId),
+ index("idx_host_access_host_id").on(table.hostId),
+ index("idx_host_access_expires_at").on(table.expiresAt),
+ ],
+);
+
+export const sharedHostAuthOverrides = mysqlTable(
+ "shared_host_auth_overrides",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ protocol: varchar("protocol", { length: 255 }).notNull().default("ssh"),
+ credentialId: int("credential_id")
+ .notNull()
+ .references(() => sshCredentials.id, { onDelete: "cascade" }),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [
+ uniqueIndex("shared_host_auth_overrides_host_user_protocol_unique").on(
+ table.hostId,
+ table.userId,
+ table.protocol,
+ ),
+ ],
+);
+
+export const sharedHostSecrets = mysqlTable(
+ "shared_host_secrets",
+ {
+ id: int("id").autoincrement().primaryKey(),
+
+ hostAccessId: int("host_access_id")
+ .notNull()
+ .references(() => hostAccess.id, { onDelete: "cascade" }),
+
+ targetUserId: varchar("target_user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+
+ protocol: varchar("protocol", { length: 255 }).notNull().default("ssh"),
+ sourceType: text("source_type").notNull().default("credential"),
+
+ originalCredentialId: int("original_credential_id").references(
+ () => sshCredentials.id,
+ { onDelete: "cascade" },
+ ),
+
+ encryptedUsername: text("encrypted_username"),
+ encryptedAuthType: text("encrypted_auth_type"),
+ encryptedPassword: text("encrypted_password"),
+ encryptedKey: text("encrypted_key"),
+ encryptedKeyPassword: text("encrypted_key_password"),
+ encryptedKeyType: text("encrypted_key_type"),
+ encryptedDomain: text("encrypted_domain"),
+
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ // Declared inline in the production DDL as UNIQUE(...), but never here,
+ // so the generated Postgres and MySQL schemas allowed duplicates the
+ // SQLite deployment forbids โ and the upsert had nothing to conflict on.
+ (table) => [
+ uniqueIndex("idx_shared_host_secrets_scope").on(
+ table.hostAccessId,
+ table.targetUserId,
+ table.protocol,
+ ),
+ ],
+);
+
+export const roles = mysqlTable("roles", {
+ id: int("id").autoincrement().primaryKey(),
+ name: varchar("name", { length: 255 }).notNull().unique(),
+ displayName: text("display_name").notNull(),
+ description: text("description"),
+
+ isSystem: boolean("is_system")
+ .notNull()
+ .default(false),
+
+ permissions: text("permissions"),
+
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+
+export const userRoles = mysqlTable(
+ "user_roles",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ roleId: int("role_id")
+ .notNull()
+ .references(() => roles.id, { onDelete: "cascade" }),
+
+ grantedBy: varchar("granted_by", { length: 255 }).references(() => users.id, {
+ onDelete: "set null",
+ }),
+ grantedAt: text("granted_at")
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ // Declared inline in the production DDL as UNIQUE(...), but never here,
+ // so the generated Postgres and MySQL schemas allowed duplicates the
+ // SQLite deployment forbids โ and the upsert had nothing to conflict on.
+ //
+ // The unique pair already serves lookups by user, since user_id leads it.
+ // Listing a role's members starts from role_id, which it cannot serve.
+ (table) => [
+ uniqueIndex("idx_user_roles_user_role").on(table.userId, table.roleId),
+ index("idx_user_roles_role_id").on(table.roleId),
+ ],
+);
+
+export const auditLogs = mysqlTable(
+ "audit_logs",
+ {
+ id: int("id").autoincrement().primaryKey(),
+
+ // Nullable on purpose: the trail outlives the account, and username keeps the
+ // entry attributable once the reference is gone.
+ userId: varchar("user_id", { length: 255 }).references(() => users.id, { onDelete: "set null" }),
+ username: text("username").notNull(),
+
+ action: varchar("action", { length: 255 }).notNull(),
+ resourceType: varchar("resource_type", { length: 255 }).notNull(),
+ resourceId: text("resource_id"),
+ resourceName: text("resource_name"),
+
+ details: text("details"),
+ ipAddress: text("ip_address"),
+ userAgent: text("user_agent"),
+
+ success: boolean("success").notNull(),
+ errorMessage: text("error_message"),
+
+ timestamp: varchar("timestamp", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ // This table only grows, and is always read newest-first with an optional
+ // filter. Each composite leads with the filtered column so the same index
+ // also satisfies the ORDER BY.
+ (table) => [
+ index("idx_audit_logs_timestamp").on(table.timestamp),
+ index("idx_audit_logs_user_ts").on(table.userId, table.timestamp),
+ index("idx_audit_logs_action_ts").on(table.action, table.timestamp),
+ index("idx_audit_logs_resource_ts").on(table.resourceType, table.timestamp),
+ ],
+);
+
+export const sessionRecordings = mysqlTable(
+ "session_recordings",
+ {
+ id: int("id").autoincrement().primaryKey(),
+
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ // Nullable on purpose: a recording is evidence about the host as much as the
+ // person, so it outlives the account. username keeps it attributable.
+ userId: varchar("user_id", { length: 255 }).references(() => users.id, { onDelete: "set null" }),
+ username: text("username"),
+ accessId: int("access_id").references(() => hostAccess.id, {
+ onDelete: "set null",
+ }),
+
+ startedAt: varchar("started_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ endedAt: text("ended_at"),
+ duration: int("duration"),
+
+ commands: text("commands"),
+ dangerousActions: text("dangerous_actions"),
+
+ recordingPath: text("recording_path"),
+ protocol: varchar("protocol", { length: 255 }).notNull().default("ssh"),
+ format: text("format").notNull().default("text"),
+
+ terminatedByOwner: boolean("terminated_by_owner").default(false),
+ terminationReason: text("termination_reason"),
+ },
+ // Listed newest-first per user, and audited per host.
+ (table) => [
+ index("idx_session_recordings_user_started").on(
+ table.userId,
+ table.startedAt,
+ ),
+ index("idx_session_recordings_host").on(table.hostId),
+ ],
+);
+
+export const sessionShares = mysqlTable(
+ "session_shares",
+ {
+ id: varchar("id", { length: 255 }).primaryKey(),
+
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ ownerUserId: varchar("owner_user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+
+ protocol: varchar("protocol", { length: 255 }).notNull(),
+
+ // Live-session binding: TerminalSessionManager's session.id for SSH, or
+ // guacd's own guacamoleConnectionId for rdp/vnc/telnet. Neither is a DB
+ // row (process-local, in-memory) so this intentionally has no FK.
+ sessionId: varchar("session_id", { length: 255 }).notNull(),
+ tabInstanceId: text("tab_instance_id"),
+
+ shareType: text("share_type").notNull(), // "link" | "user"
+ targetUserId: varchar("target_user_id", { length: 255 }).references(() => users.id, {
+ onDelete: "cascade",
+ }),
+ linkToken: varchar("link_token", { length: 255 }).unique(),
+
+ permissionLevel: text("permission_level").notNull().default("read-only"),
+
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ expiresAt: varchar("expires_at", { length: 255 }).notNull(),
+ revokedAt: text("revoked_at"),
+
+ lastJoinedAt: text("last_joined_at"),
+ joinCount: int("join_count").notNull().default(0),
+ },
+ // Resolved from the live session on join, and listed per host.
+ (table) => [
+ index("idx_session_shares_session_id").on(table.sessionId),
+ index("idx_session_shares_host_id").on(table.hostId),
+ ],
+);
+
+export const sessionShareParticipants = mysqlTable(
+ "session_share_participants",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ shareId: varchar("share_id", { length: 255 })
+ .notNull()
+ .references(() => sessionShares.id, { onDelete: "cascade" }),
+
+ userId: varchar("user_id", { length: 255 }).references(() => users.id, {
+ onDelete: "cascade",
+ }),
+ guestLabel: text("guest_label"),
+
+ joinedAt: text("joined_at")
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ leftAt: text("left_at"),
+ },
+);
+
+export const opksshTokens = mysqlTable(
+ "opkssh_tokens",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+
+ sshCert: text("ssh_cert").notNull(),
+ privateKey: text("private_key").notNull(),
+
+ email: text("email"),
+ sub: text("sub"),
+ issuer: text("issuer"),
+ audience: text("audience"),
+
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ expiresAt: varchar("expires_at", { length: 255 }).notNull(),
+ lastUsed: text("last_used"),
+ },
+ // Declared inline in the production DDL as UNIQUE(...), but never here,
+ // so the generated Postgres and MySQL schemas allowed duplicates the
+ // SQLite deployment forbids โ and the upsert had nothing to conflict on.
+ (table) => [uniqueIndex("idx_opkssh_tokens_user_host").on(table.userId, table.hostId)],
+);
+
+// Vault SSH signer profiles. These hold ONLY non-secret connection settings and
+// are intended to be shared across users (shared === true makes a profile
+// visible to every user on the server). Each user authenticates to Vault via an
+// interactive OIDC flow at connect time; no tokens or keys are stored here.
+export const vaultProfiles = mysqlTable("vault_profiles", {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ description: text("description"),
+ folder: text("folder"),
+ tags: text("tags"),
+ // Vault server connection (non-secret)
+ vaultAddr: text("vault_addr").notNull(),
+ vaultNamespace: text("vault_namespace"),
+ // OIDC auth method mount + role used to obtain a Vault token interactively
+ oidcMount: text("oidc_mount"),
+ oidcRole: text("oidc_role"),
+ // SSH secrets engine mount + signer role used to sign the ephemeral key
+ sshMount: text("ssh_mount"),
+ sshRole: text("ssh_role").notNull(),
+ validPrincipals: text("valid_principals"),
+ // Ephemeral keypair algorithm to generate per connection
+ keyType: text("key_type"),
+ // When true the profile is visible/usable by all users on the server
+ shared: boolean("shared").notNull().default(false),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+
+// Per-user cache of the ephemeral SSH private key + Vault-signed certificate.
+// Transient: rows live only until the certificate expires. Secret fields are
+// encrypted under the user's data-encryption key (see field-crypto.ts).
+export const vaultTokens = mysqlTable(
+ "vault_tokens",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ profileId: int("profile_id")
+ .notNull()
+ .references(() => vaultProfiles.id, { onDelete: "cascade" }),
+
+ sshCert: text("ssh_cert").notNull(),
+ privateKey: text("private_key").notNull(),
+
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ expiresAt: varchar("expires_at", { length: 255 }).notNull(),
+ lastUsed: text("last_used"),
+ },
+ // Declared inline in the production DDL as UNIQUE(...), but never here,
+ // so the generated Postgres and MySQL schemas allowed duplicates the
+ // SQLite deployment forbids โ and the upsert had nothing to conflict on.
+ (table) => [uniqueIndex("idx_vault_tokens_user_profile").on(table.userId, table.profileId)],
+);
+
+export const apiKeys = mysqlTable(
+ "api_keys",
+ {
+ id: varchar("id", { length: 255 }).primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ tokenHash: text("token_hash").notNull(),
+ tokenPrefix: text("token_prefix").notNull(),
+ createdAt: varchar("created_at", { length: 255 }).notNull().default(sql`(CURRENT_TIMESTAMP)`),
+ expiresAt: varchar("expires_at", { length: 255 }),
+ lastUsedAt: text("last_used_at"),
+ isActive: boolean("is_active").notNull().default(true),
+ },
+ (table) => [index("idx_api_keys_user_id").on(table.userId)],
+);
+
+export const userOpenTabs = mysqlTable(
+ "user_open_tabs",
+ {
+ id: varchar("id", { length: 255 }).primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ tabType: text("tab_type").notNull(),
+ hostId: int("host_id").references(() => hosts.id, {
+ onDelete: "cascade",
+ }),
+ label: varchar("label", { length: 255 }).notNull(),
+ tabOrder: int("tab_order").notNull().default(0),
+ backendSessionId: text("backend_session_id"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [index("idx_user_open_tabs_user_id").on(table.userId)],
+);
+
+export const userPreferences = mysqlTable("user_preferences", {
+ userId: varchar("user_id", { length: 255 })
+ .primaryKey()
+ .references(() => users.id, { onDelete: "cascade" }),
+ reopenTabsOnLogin: boolean("reopen_tabs_on_login")
+ .notNull()
+ .default(false),
+ theme: text("theme"),
+ fontSize: text("font_size"),
+ accentColor: text("accent_color"),
+ language: text("language"),
+ storageMode: text("storage_mode"),
+ commandAutocomplete: boolean("command_autocomplete"),
+ commandPaletteEnabled: boolean("command_palette_enabled"),
+ showHostTags: boolean("show_host_tags"),
+ hostTrayOnClick: boolean("host_tray_on_click"),
+ pinAppRail: boolean("pin_app_rail"),
+ expandAppRailOnHover: boolean("expand_app_rail_on_hover"),
+ foldersCollapsed: boolean("folders_collapsed"),
+ confirmSnippetExecution: boolean("confirm_snippet_execution"),
+ disableUpdateCheck: boolean("disable_update_check"),
+ confirmTabClose: boolean("confirm_tab_close"),
+ hiddenRailTabs: text("hidden_rail_tabs"),
+ // null means the user has not been asked yet; the assistant stays hidden
+ // until this is explicitly true and the admin global is on.
+ aiAssistantEnabled: boolean("ai_assistant_enabled"),
+ // Opt-in to letting the assistant run allowlisted read-only diagnostics
+ // without a per-command approval click.
+ aiReadOnlyCommands: boolean("ai_read_only_commands"),
+ compactHostView: boolean("compact_host_view"),
+ statusColorScheme: text("status_color_scheme"),
+ customThemes: text("custom_themes"),
+ customKeybindings: text("custom_keybindings"),
+ terminalDefaults: text("terminal_defaults"),
+ rdpDefaults: text("rdp_defaults"),
+ terminalMacros: text("terminal_macros"),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+
+export const hostMetricsPreferences = mysqlTable(
+ "host_metrics_preferences",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ // JSON-encoded HostMetricsLayout. Layout has no secrets, so it is stored as
+ // plain JSON (no field-level encryption).
+ layout: text("layout").notNull(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ // One layout per user per host. Enforced in production since the inline DDL
+ // creates it, but it was never declared here, so the generated Postgres and
+ // MySQL schemas lacked it โ and the upsert has nothing to conflict on.
+ (table) => [
+ uniqueIndex("idx_host_metrics_prefs_user_host").on(table.userId, table.hostId),
+ ],
+);
+
+export const proxmoxStatsPreferences = mysqlTable(
+ "proxmox_stats_preferences",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 }).notNull().references(() => users.id, { onDelete: "cascade" }),
+ hostId: int("host_id").notNull().references(() => hosts.id, { onDelete: "cascade" }),
+ // JSON-encoded ProxmoxStatsLayout. Layout has no secrets, so it is stored as
+ // plain JSON (no field-level encryption), same convention as hostMetricsPreferences.layout.
+ layout: text("layout").notNull(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [
+ uniqueIndex("idx_proxmox_stats_prefs_user_host").on(table.userId, table.hostId),
+ ],
+);
+
+export const hostSidebarPreferences = mysqlTable("host_sidebar_preferences", {
+ userId: varchar("user_id", { length: 255 })
+ .primaryKey()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // JSON-encoded HostSidebarPreferences. No secrets in this blob, stored as
+ // plain JSON like hostMetricsPreferences.layout.
+ data: text("data").notNull(),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+
+export const credentialSidebarPreferences = mysqlTable(
+ "credential_sidebar_preferences",
+ {
+ userId: varchar("user_id", { length: 255 })
+ .primaryKey()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // JSON-encoded CredentialSidebarPreferences. No secrets in this blob,
+ // same convention as hostSidebarPreferences.data.
+ data: text("data").notNull(),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+);
+
+export const uiPreferences = mysqlTable("ui_preferences", {
+ userId: varchar("user_id", { length: 255 })
+ .primaryKey()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // JSON-encoded UiPreferences (preset + per-area overrides + onboarding
+ // state). No secrets in this blob, same convention as
+ // hostSidebarPreferences.data.
+ data: text("data").notNull(),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+
+export const hostHealthChecks = mysqlTable(
+ "host_health_checks",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ // JSON array of { id, name, type: "tcp"|"http", target, port, path }
+ checks: text("checks").notNull(),
+ intervalSeconds: int("interval_seconds").notNull().default(300),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ // Same as above: one set of checks per user per host.
+ (table) => [
+ uniqueIndex("idx_host_health_checks_user_host").on(table.userId, table.hostId),
+ ],
+);
+
+export const hostHealthHistory = mysqlTable("host_health_history", {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ checkId: text("check_id").notNull(),
+ ts: text("ts").notNull().default(sql`(CURRENT_TIMESTAMP)`),
+ ok: boolean("ok").notNull(),
+ latencyMs: int("latency_ms"),
+ detail: text("detail"),
+});
+
+export const dashboardServiceLinks = mysqlTable("dashboard_service_links", {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ label: varchar("label", { length: 255 }).notNull(),
+ url: text("url").notNull(),
+ order: int("order").notNull().default(0),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+
+// --- termix-id begin ---
+// A user claims a unique public handle. Their published SSH public keys are
+// served at an unauthenticated resolver endpoint in authorized_keys format,
+// so any server can be provisioned with `curl /termix-id/u/ >> ~/.ssh/authorized_keys`.
+export const termixIdentities = mysqlTable("termix_identities", {
+ id: int("id").autoincrement().primaryKey(),
+ // One Termix ID per user โ enforced in schema, not just in code.
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .unique()
+ .references(() => users.id, { onDelete: "cascade" }),
+ handle: varchar("handle", { length: 255 }).notNull().unique(),
+ description: text("description"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+
+export const termixIdentityKeys = mysqlTable("termix_identity_keys", {
+ id: int("id").autoincrement().primaryKey(),
+ identityId: int("identity_id")
+ .notNull()
+ .references(() => termixIdentities.id, { onDelete: "cascade" }),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // Public keys are non-secret, so they are stored in plaintext (no field-level
+ // encryption). This is what lets the unauthenticated resolver serve them.
+ publicKey: text("public_key").notNull(),
+ // Raw algorithm token (e.g. "ssh-ed25519"), and a normalized group used for
+ // the / resolver filter (RSA / ED25519 / ECDSA / ...).
+ keyType: text("key_type").notNull(),
+ algorithm: text("algorithm").notNull(),
+ label: varchar("label", { length: 255 }),
+ comment: text("comment"),
+ // "manual" (pasted) or "credential" (imported from an ssh_credentials entry).
+ source: text("source").notNull().default("manual"),
+ credentialId: int("credential_id").references(() => sshCredentials.id, {
+ onDelete: "set null",
+ }),
+ enabled: boolean("enabled").notNull().default(true),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+// Per-identity certificate authority. Servers that trust this CA (via
+// TrustedUserCAKeys / @cert-authority) accept any user certificate it signs,
+// giving central revocation (rotate the CA) and expiry (cert validity).
+export const termixIdentityCa = mysqlTable("termix_identity_ca", {
+ id: int("id").autoincrement().primaryKey(),
+ identityId: int("identity_id")
+ .notNull()
+ .unique()
+ .references(() => termixIdentities.id, { onDelete: "cascade" }),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // CA public key (plaintext โ it is published); CA private key is field-encrypted.
+ publicKey: text("public_key").notNull(),
+ privateKey: text("private_key").notNull(),
+ validityDays: int("validity_days").notNull().default(90),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+// --- termix-id end ---
+
+// --- tmux-monitor begin ---
+export const tmuxSessionTags = mysqlTable("tmux_session_tags", {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ sessionName: text("session_name").notNull(),
+ tag: text("tag").notNull(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+// --- tmux-monitor end ---
+
+// --- metrics-history begin ---
+export const hostMetricsHistory = mysqlTable("host_metrics_history", {
+ id: int("id").autoincrement().primaryKey(),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ ts: text("ts")
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ cpuPercent: double("cpu_percent"),
+ memPercent: double("mem_percent"),
+ diskPercent: double("disk_percent"),
+ netRxBytes: int("net_rx_bytes"),
+ netTxBytes: int("net_tx_bytes"),
+});
+// --- metrics-history end ---
+
+// --- proxmox-node-history begin ---
+export const proxmoxNodeHistory = mysqlTable("proxmox_node_history", {
+ id: int("id").autoincrement().primaryKey(),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ ts: text("ts")
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ cpuPercent: double("cpu_percent"),
+ memPercent: double("mem_percent"),
+ diskPercent: double("disk_percent"),
+ netRxBytes: int("net_rx_bytes"),
+ netTxBytes: int("net_tx_bytes"),
+});
+// --- proxmox-node-history end ---
+
+// --- alerts begin ---
+export const alertRules = mysqlTable("alert_rules", {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: int("host_id").references(() => hosts.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ enabled: boolean("enabled").notNull().default(true),
+ triggerType: text("trigger_type").notNull(),
+ thresholdValue: double("threshold_value"),
+ thresholdDurationSeconds: int("threshold_duration_seconds"),
+ cooldownMinutes: int("cooldown_minutes").notNull().default(15),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+
+export const notificationChannels = mysqlTable("notification_channels", {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ type: text("type").notNull(),
+ config: text("config").notNull(),
+ enabled: boolean("enabled").notNull().default(true),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+
+export const alertRuleChannels = mysqlTable("alert_rule_channels", {
+ id: int("id").autoincrement().primaryKey(),
+ ruleId: int("rule_id")
+ .notNull()
+ .references(() => alertRules.id, { onDelete: "cascade" }),
+ channelId: int("channel_id")
+ .notNull()
+ .references(() => notificationChannels.id, { onDelete: "cascade" }),
+});
+
+export const alertFirings = mysqlTable(
+ "alert_firings",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ ruleId: int("rule_id")
+ .notNull()
+ .references(() => alertRules.id, { onDelete: "cascade" }),
+ hostId: int("host_id").notNull(),
+ hostName: text("host_name").notNull(),
+ firedAt: varchar("fired_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ resolvedAt: text("resolved_at"),
+ value: double("value"),
+ message: text("message").notNull(),
+ severity: text("severity").notNull().default("warning"),
+ acknowledged: boolean("acknowledged")
+ .notNull()
+ .default(false),
+ },
+ // A rule's history is read newest-first; host_id is filtered on its own.
+ (table) => [
+ index("idx_alert_firings_rule").on(table.ruleId, table.firedAt),
+ index("idx_alert_firings_host").on(table.hostId),
+ ],
+);
+// --- alerts end ---
+
+// --- automations begin ---
+export const automations = mysqlTable(
+ "automations",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ description: text("description"),
+ enabled: boolean("enabled").notNull().default(true),
+ // The whole trigger + steps graph, shaped by AutomationDefinition. Read and
+ // written as a unit, never queried by its inner structure.
+ definition: text("definition").notNull(),
+ definitionVersion: int("definition_version").notNull().default(1),
+ concurrencyPolicy: text("concurrency_policy").notNull().default("skip"),
+ maxRunSeconds: int("max_run_seconds").notNull().default(300),
+ dryRun: boolean("dry_run").notNull().default(false),
+ lastRunAt: text("last_run_at"),
+ lastRunStatus: text("last_run_status"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ // The scheduler sweeps enabled automations for one user at a time.
+ (table) => [index("idx_automations_user").on(table.userId, table.enabled)],
+);
+
+/**
+ * Durable per-target trigger state. state_key scopes a trigger to what it is
+ * actually watching ("", ":/data", ":"), so
+ * a sustained-breach window can track one filesystem rather than a whole host.
+ * Living in the database rather than memory means cooldowns and dwell windows
+ * survive a restart.
+ */
+export const automationTriggerState = mysqlTable(
+ "automation_trigger_state",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ automationId: int("automation_id")
+ .notNull()
+ .references(() => automations.id, { onDelete: "cascade" }),
+ stateKey: varchar("state_key", { length: 255 }).notNull(),
+ breachStartedAt: text("breach_started_at"),
+ lastFiredAt: text("last_fired_at"),
+ lastValue: double("last_value"),
+ lastObservedState: text("last_observed_state"),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [
+ uniqueIndex("idx_automation_trigger_state_key").on(
+ table.automationId,
+ table.stateKey,
+ ),
+ ],
+);
+
+export const automationSchedules = mysqlTable(
+ "automation_schedules",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ automationId: int("automation_id")
+ .notNull()
+ .references(() => automations.id, { onDelete: "cascade" }),
+ cron: text("cron"),
+ intervalSeconds: int("interval_seconds"),
+ timezone: text("timezone"),
+ nextDueAt: varchar("next_due_at", { length: 255 }),
+ lastTickAt: text("last_tick_at"),
+ },
+ (table) => [
+ uniqueIndex("idx_automation_schedules_automation").on(table.automationId),
+ index("idx_automation_schedules_due").on(table.nextDueAt),
+ ],
+);
+
+export const automationRuns = mysqlTable(
+ "automation_runs",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ automationId: int("automation_id")
+ .notNull()
+ .references(() => automations.id, { onDelete: "cascade" }),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ triggerType: text("trigger_type").notNull(),
+ triggerContext: text("trigger_context"),
+ status: varchar("status", { length: 255 }).notNull(),
+ startedAt: varchar("started_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ finishedAt: text("finished_at"),
+ durationMs: int("duration_ms"),
+ error: text("error"),
+ dryRun: boolean("dry_run").notNull().default(false),
+ // Set when one automation invoked another, so a chain can be traced.
+ parentRunId: int("parent_run_id"),
+ },
+ (table) => [
+ index("idx_automation_runs_automation").on(
+ table.automationId,
+ table.startedAt,
+ ),
+ index("idx_automation_runs_user").on(table.userId, table.startedAt),
+ ],
+);
+
+export const automationRunSteps = mysqlTable(
+ "automation_run_steps",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ runId: int("run_id")
+ .notNull()
+ .references(() => automationRuns.id, { onDelete: "cascade" }),
+ stepIndex: int("step_index").notNull(),
+ stepId: text("step_id").notNull(),
+ stepType: text("step_type").notNull(),
+ status: varchar("status", { length: 255 }).notNull(),
+ startedAt: varchar("started_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ finishedAt: text("finished_at"),
+ output: text("output"),
+ error: text("error"),
+ truncated: boolean("truncated")
+ .notNull()
+ .default(false),
+ },
+ (table) => [
+ index("idx_automation_run_steps_run").on(table.runId, table.stepIndex),
+ ],
+);
+
+export const automationChannels = mysqlTable(
+ "automation_channels",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ automationId: int("automation_id")
+ .notNull()
+ .references(() => automations.id, { onDelete: "cascade" }),
+ channelId: int("channel_id")
+ .notNull()
+ .references(() => notificationChannels.id, { onDelete: "cascade" }),
+ },
+ (table) => [
+ uniqueIndex("idx_automation_channels_pair").on(
+ table.automationId,
+ table.channelId,
+ ),
+ ],
+);
+// --- automations end ---
+
+// --- homepage begin ---
+export const homepageItems = mysqlTable(
+ "homepage_items",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ typeId: text("type_id").notNull(),
+ title: text("title"),
+ config: text("config").notNull().default("{}"),
+ folderId: int("folder_id"),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [index("idx_homepage_items_user_id").on(table.userId)],
+);
+
+export const homepageLayouts = mysqlTable("homepage_layouts", {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .unique()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // JSON: { entries: HomepageLayoutEntry[], pan: {x,y}, zoom: number }
+ layout: text("layout").notNull().default("{}"),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+// --- homepage end ---
+
+// --- fleets begin ---
+export const fleets = mysqlTable("fleets", {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ description: text("description"),
+ color: text("color"),
+ icon: text("icon"),
+ // JSON array of { tag: string } rules, unioned with static fleetMembers at
+ // resolution time. Kept to tag-equality matching for v1.
+ tagRules: text("tag_rules"),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+
+export const fleetMembers = mysqlTable(
+ "fleet_members",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ fleetId: int("fleet_id")
+ .notNull()
+ .references(() => fleets.id, { onDelete: "cascade" }),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ addedAt: text("added_at")
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ // fleet_id leads the unique pair, so listing a fleet's hosts is already
+ // served. Finding the fleets a host belongs to starts from host_id.
+ (table) => [
+ uniqueIndex("idx_fleet_members_fleet_host").on(table.fleetId, table.hostId),
+ index("idx_fleet_members_host").on(table.hostId),
+ ],
+);
+
+// Latest-only inventory snapshot per host, overwritten on each refresh - no
+// historical log, matching the "latest snapshot only" scope decision.
+export const fleetInventory = mysqlTable(
+ "fleet_inventory",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ hostId: int("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ osPrettyName: text("os_pretty_name"),
+ kernel: text("kernel"),
+ architecture: text("architecture"),
+ hostname: text("hostname"),
+ uptimeSeconds: int("uptime_seconds"),
+ ip: text("ip"),
+ packageManager: text("package_manager"),
+ collectedAt: text("collected_at")
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ // host_id leads the unique pair; a user's whole inventory is read by user_id.
+ (table) => [
+ uniqueIndex("idx_fleet_inventory_host").on(table.hostId, table.userId),
+ index("idx_fleet_inventory_user").on(table.userId),
+ ],
+);
+// --- fleets end ---
+
+// --- workspaces begin ---
+export const userWorkspaces = mysqlTable(
+ "user_workspaces",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ color: text("color"),
+ icon: text("icon"),
+ // "manual" | "last_session" - exactly one last_session row per user.
+ kind: text("kind").notNull().default("manual"),
+ isDefault: boolean("is_default")
+ .notNull()
+ .default(false),
+ // JSON-encoded WorkspacePayload: tabs, splitMode, paneTabIds, rowSizes, rowColSizes
+ payload: text("payload").notNull().default("{}"),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ lastUsedAt: text("last_used_at"),
+ },
+ (table) => [index("idx_user_workspaces_user_id").on(table.userId)],
+);
+// --- workspaces end ---
+
+// --- sync begin ---
+// Records a delete for a synced entity type so the other side of a sync
+// pair (embedded desktop backend <-> connected remote server) learns about
+// the deletion instead of re-creating the row on its next pull.
+export const syncTombstones = mysqlTable("sync_tombstones", {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ entityType: text("entity_type").notNull(),
+ syncId: varchar("sync_id", { length: 255 }).notNull(),
+ deletedAt: text("deleted_at")
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+});
+// --- sync end ---
+
+// --- ai begin ---
+/**
+ * A user's connection to one AI provider. api_key is encrypted at rest via
+ * FieldCrypto; it is never returned to the frontend, which only ever sees
+ * api_key_prefix for display.
+ */
+export const aiProviders = mysqlTable(
+ "ai_providers",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // ollama | anthropic | openai | gemini | openai_compatible
+ providerType: text("provider_type").notNull(),
+ label: varchar("label", { length: 255 }).notNull(),
+ // Required for ollama and openai_compatible, optional elsewhere.
+ baseUrl: text("base_url"),
+ apiKey: text("api_key"),
+ // First few characters, kept in the clear so the UI can identify a key.
+ apiKeyPrefix: text("api_key_prefix"),
+ defaultModel: text("default_model"),
+ enabled: boolean("enabled").notNull().default(true),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [
+ uniqueIndex("idx_ai_providers_user_label").on(table.userId, table.label),
+ ],
+);
+
+export const aiConversations = mysqlTable(
+ "ai_conversations",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ title: text("title"),
+ providerId: int("provider_id"),
+ model: text("model"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [
+ index("idx_ai_conversations_user").on(table.userId, table.updatedAt),
+ ],
+);
+
+export const aiMessages = mysqlTable(
+ "ai_messages",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ conversationId: int("conversation_id")
+ .notNull()
+ .references(() => aiConversations.id, { onDelete: "cascade" }),
+ // user | assistant | tool
+ role: text("role").notNull(),
+ content: text("content").notNull().default(""),
+ // Serialized tool calls and their results for this turn.
+ toolCalls: text("tool_calls"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [
+ index("idx_ai_messages_conversation").on(
+ table.conversationId,
+ table.createdAt,
+ ),
+ ],
+);
+
+/**
+ * A change the assistant wants to make. Nothing here has been applied: the
+ * payload is re-validated against the tool schema at apply time and only then
+ * dispatched through the same repository logic a human action uses.
+ */
+export const aiProposals = mysqlTable(
+ "ai_proposals",
+ {
+ id: int("id").autoincrement().primaryKey(),
+ conversationId: int("conversation_id")
+ .notNull()
+ .references(() => aiConversations.id, { onDelete: "cascade" }),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // The propose_* tool name that produced this.
+ kind: text("kind").notNull(),
+ summary: text("summary"),
+ payload: text("payload").notNull().default("{}"),
+ // pending | applied | rejected | expired
+ status: varchar("status", { length: 255 }).notNull().default("pending"),
+ appliedAt: text("applied_at"),
+ resultSummary: text("result_summary"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`(CURRENT_TIMESTAMP)`),
+ },
+ (table) => [
+ index("idx_ai_proposals_user").on(table.userId, table.status),
+ index("idx_ai_proposals_conversation").on(table.conversationId),
+ ],
+);
+// --- ai end ---
diff --git a/src/backend/database/db/schema.pg.ts b/src/backend/database/db/schema.pg.ts
new file mode 100644
index 0000000..c5d0327
--- /dev/null
+++ b/src/backend/database/db/schema.pg.ts
@@ -0,0 +1,1942 @@
+// GENERATED FILE โ do not edit.
+//
+// Produced from schema.ts by scripts/generate-dialect-schema.cjs.
+// Edit the sqlite schema and re-run `node scripts/generate-dialect-schema.cjs`.
+// Target dialect: postgres.
+//
+// DDL source for drizzle-kit. NOT imported to run queries โ repositories use
+// schema.ts on every dialect. See the generator header for why that is correct.
+
+import {
+ pgTable,
+ text,
+ varchar,
+ integer,
+ serial,
+ boolean,
+ doublePrecision,
+ index,
+ uniqueIndex,
+ type AnyPgColumn,
+} from "drizzle-orm/pg-core";
+import { sql } from "drizzle-orm";
+
+export const users = pgTable("users", {
+ id: varchar("id", { length: 255 }).primaryKey(),
+ username: text("username").notNull(),
+ passwordHash: text("password_hash").notNull(),
+ isAdmin: boolean("is_admin").notNull().default(false),
+
+ isOidc: boolean("is_oidc").notNull().default(false),
+ oidcIdentifier: text("oidc_identifier"),
+ ssoProviderId: integer("sso_provider_id"),
+ clientId: text("client_id"),
+ clientSecret: text("client_secret"),
+ issuerUrl: text("issuer_url"),
+ authorizationUrl: text("authorization_url"),
+ tokenUrl: text("token_url"),
+ identifierPath: text("identifier_path"),
+ namePath: text("name_path"),
+ scopes: text().default("openid email profile"),
+
+ totpSecret: text("totp_secret"),
+ totpEnabled: boolean("totp_enabled")
+ .notNull()
+ .default(false),
+ totpBackupCodes: text("totp_backup_codes"),
+
+ registeredAt: text("registered_at").notNull().default(sql`CURRENT_TIMESTAMP`),
+ donationModalDismissed: boolean("donation_modal_dismissed")
+ .notNull()
+ .default(false),
+});
+
+export const settings = pgTable("settings", {
+ key: varchar("key", { length: 255 }).primaryKey(),
+ value: text("value").notNull(),
+});
+
+export const ssoProviders = pgTable("sso_providers", {
+ id: serial("id").primaryKey(),
+ name: varchar("name", { length: 255 }).notNull(),
+ type: text("type").notNull(),
+ enabled: boolean("enabled").notNull().default(true),
+ displayOrder: integer("display_order").notNull().default(0),
+ config: text("config").notNull(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+
+export const sessions = pgTable(
+ "sessions",
+ {
+ id: varchar("id", { length: 255 }).primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ jwtToken: text("jwt_token").notNull(),
+ deviceType: text("device_type").notNull(),
+ deviceInfo: text("device_info").notNull(),
+ oidcSub: text("oidc_sub"),
+ oidcSid: text("oidc_sid"),
+ ssoProviderId: integer("sso_provider_id"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ expiresAt: varchar("expires_at", { length: 255 }).notNull(),
+ lastActiveAt: text("last_active_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // Listing a user's devices, and the startup sweep of expired rows.
+ (table) => [
+ index("idx_sessions_user_id").on(table.userId),
+ index("idx_sessions_expires_at").on(table.expiresAt),
+ ],
+);
+
+export const trustedDevices = pgTable(
+ "trusted_devices",
+ {
+ id: varchar("id", { length: 255 }).primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ deviceFingerprint: text("device_fingerprint").notNull(),
+ deviceType: text("device_type").notNull(),
+ deviceInfo: text("device_info").notNull(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ expiresAt: varchar("expires_at", { length: 255 }).notNull(),
+ lastUsedAt: text("last_used_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [index("idx_trusted_devices_user_id").on(table.userId)],
+);
+
+export const webauthnCredentials = pgTable("webauthn_credentials", {
+ id: varchar("id", { length: 255 }).primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ credentialId: varchar("credential_id", { length: 255 }).notNull(),
+ publicKey: text("public_key").notNull(),
+ counter: integer("counter").notNull().default(0),
+ deviceType: text("device_type"),
+ backedUp: boolean("backed_up").notNull().default(false),
+ transports: text("transports"),
+ userVerification: text("user_verification").notNull().default("preferred"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ lastUsedAt: text("last_used_at"),
+});
+
+export const hosts = pgTable(
+ "ssh_data",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ connectionType: text("connection_type").notNull().default("ssh"),
+ name: varchar("name", { length: 255 }),
+ ip: text("ip").notNull(),
+ port: integer("port").notNull(),
+ username: text("username").notNull(),
+ folder: text("folder"),
+ // Sub-host nesting: a host acting as an organizational parent for other
+ // hosts, mutually exclusive with folder (see host route validation).
+ parentHostId: integer("parent_host_id").references(
+ (): AnyPgColumn => hosts.id,
+ { onDelete: "set null" },
+ ),
+ tags: text("tags"),
+ pin: boolean("pin").notNull().default(false),
+ // Manual drag-to-reorder position within a folder. Null means the host has
+ // never been manually reordered; falls back to name sort in that case.
+ sortOrder: integer("sort_order"),
+ authType: text("auth_type").notNull(),
+ useWarpgate: boolean("use_warpgate").notNull().default(false),
+ shareSshAuth: boolean("share_ssh_auth")
+ .notNull()
+ .default(false),
+ forceKeyboardInteractive: text("force_keyboard_interactive"),
+
+ password: text("password"),
+ key: text("key"),
+ keyPassword: text("key_password"),
+ keyType: text("key_type"),
+ sudoPassword: text("sudo_password"),
+
+ autostartPassword: text("autostart_password"),
+ autostartKey: text("autostart_key"),
+ autostartKeyPassword: text("autostart_key_password"),
+
+ credentialId: integer("credential_id").references(() => sshCredentials.id, { onDelete: "set null" }),
+ overrideCredentialUsername: boolean("override_credential_username"),
+ // When authType is "vault", the host authenticates via a Vault SSH signer
+ // profile (shared settings, no secrets). The signing certificate is obtained
+ // per-user at connect time via an interactive Vault OIDC flow.
+ vaultProfileId: integer("vault_profile_id").references(
+ () => vaultProfiles.id,
+ { onDelete: "set null" },
+ ),
+ enableTerminal: boolean("enable_terminal")
+ .notNull()
+ .default(true),
+ enableSessionLogging: boolean("enable_session_logging")
+ .notNull()
+ .default(true),
+ allowSessionSharing: boolean("allow_session_sharing")
+ .notNull()
+ .default(true),
+ enableCommandHistory: boolean("enable_command_history")
+ .notNull()
+ .default(true),
+ enableTunnel: boolean("enable_tunnel")
+ .notNull()
+ .default(true),
+ tunnelConnections: text("tunnel_connections"),
+ jumpHosts: text("jump_hosts"),
+ enableFileManager: boolean("enable_file_manager")
+ .notNull()
+ .default(true),
+ scpLegacy: boolean("scp_legacy").notNull().default(false),
+ enableDocker: boolean("enable_docker")
+ .notNull()
+ .default(false),
+ enableTmuxMonitor: boolean("enable_tmux_monitor")
+ .notNull()
+ .default(false),
+ enableTerminalToolbar: boolean("enable_terminal_toolbar")
+ .notNull()
+ .default(true),
+ showTerminalInSidebar: boolean("show_terminal_in_sidebar")
+ .notNull()
+ .default(true),
+ showFileManagerInSidebar: boolean("show_file_manager_in_sidebar")
+ .notNull()
+ .default(false),
+ showTunnelInSidebar: boolean("show_tunnel_in_sidebar")
+ .notNull()
+ .default(false),
+ showDockerInSidebar: boolean("show_docker_in_sidebar")
+ .notNull()
+ .default(false),
+ showServerStatsInSidebar: boolean("show_server_stats_in_sidebar")
+ .notNull()
+ .default(false),
+ defaultPath: text("default_path"),
+ statsConfig: text("stats_config"),
+ dockerConfig: text("docker_config"),
+ enableProxmox: boolean("enable_proxmox")
+ .notNull()
+ .default(false),
+ proxmoxConfig: text("proxmox_config"),
+ enableProxmoxStats: boolean("enable_proxmox_stats")
+ .notNull()
+ .default(false),
+ proxmoxStatsConfig: text("proxmox_stats_config"),
+ terminalConfig: text("terminal_config"),
+ quickActions: text("quick_actions"),
+ notes: text("notes"),
+ enableSsh: boolean("enable_ssh").notNull().default(true),
+ enableRdp: boolean("enable_rdp").notNull().default(false),
+ enableVnc: boolean("enable_vnc").notNull().default(false),
+ enableTelnet: boolean("enable_telnet").notNull().default(false),
+
+ sshPort: integer("ssh_port").default(22),
+ rdpPort: integer("rdp_port").default(3389),
+ vncPort: integer("vnc_port").default(5900),
+ telnetPort: integer("telnet_port").default(23),
+
+ rdpCredentialId: integer("rdp_credential_id").references(() => sshCredentials.id, { onDelete: "set null" }),
+ rdpUser: text("rdp_user"),
+ rdpPassword: text("rdp_password"),
+ rdpDomain: text("rdp_domain"),
+ rdpSecurity: text("rdp_security"),
+ rdpIgnoreCert: boolean("rdp_ignore_cert").default(false),
+
+ vncCredentialId: integer("vnc_credential_id").references(() => sshCredentials.id, { onDelete: "set null" }),
+ vncPassword: text("vnc_password"),
+ vncUser: text("vnc_user"),
+
+ telnetUser: text("telnet_user"),
+ telnetPassword: text("telnet_password"),
+ telnetCredentialId: integer("telnet_credential_id").references(() => sshCredentials.id, { onDelete: "set null" }),
+
+ rdpAuthType: text("rdp_auth_type"),
+ vncAuthType: text("vnc_auth_type"),
+ telnetAuthType: text("telnet_auth_type"),
+
+ domain: text("domain"),
+ security: text("security"),
+ ignoreCert: boolean("ignore_cert").default(false),
+ guacamoleConfig: text("guacamole_config"),
+
+ useSocks5: boolean("use_socks5"),
+ socks5Host: text("socks5_host"),
+ socks5Port: integer("socks5_port"),
+ socks5Username: text("socks5_username"),
+ socks5Password: text("socks5_password"),
+ socks5ProxyChain: text("socks5_proxy_chain"),
+
+ // null = use the desktop app's global default; "local" | "remote" pins
+ // this specific host's SSH/Docker-console/Serial connections to originate
+ // from the embedded local backend or a connected remote sync server.
+ // Ignored for rdp/vnc/telnet, which always require the remote server.
+ connectionOrigin: text("connection_origin"),
+
+ macAddress: text("mac_address"),
+ wolBroadcastAddress: text("wol_broadcast_address"),
+ portKnockSequence: text("port_knock_sequence"),
+
+ hostKeyFingerprint: text("host_key_fingerprint"),
+ hostKeyType: text("host_key_type"),
+ hostKeyAlgorithm: text("host_key_algorithm").default("sha256"),
+ hostKeyFirstSeen: text("host_key_first_seen"),
+ hostKeyLastVerified: text("host_key_last_verified"),
+ hostKeyChangedCount: integer("host_key_changed_count").default(0),
+
+ // Stable identity used to match this row across two independently-seeded
+ // databases (the embedded backend and a connected remote server) during
+ // sync -- local autoincrement ids collide across instances.
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // Every host read is scoped by owner, so user_id carries the host list.
+ //
+ // `folder` is deliberately not indexed: on Postgres/MySQL an indexed text
+ // column is generated as varchar(255), and folder holds a joined nested path
+ // with no length cap, so indexing it would truncate deep hierarchies.
+ (table) => [
+ index("idx_ssh_data_user_id").on(table.userId),
+ index("idx_ssh_data_parent_host").on(table.parentHostId),
+ index("idx_ssh_data_credential").on(table.credentialId),
+ ],
+);
+
+export const fileManagerRecent = pgTable(
+ "file_manager_recent",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ path: text("path").notNull(),
+ lastOpened: text("last_opened")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // Every file manager surface is read for one user on one host at a time.
+ (table) => [
+ index("idx_file_manager_recent_user").on(table.userId, table.hostId),
+ ],
+);
+
+export const fileManagerPinned = pgTable(
+ "file_manager_pinned",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ path: text("path").notNull(),
+ pinnedAt: text("pinned_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ index("idx_file_manager_pinned_user").on(table.userId, table.hostId),
+ ],
+);
+
+export const fileManagerShortcuts = pgTable(
+ "file_manager_shortcuts",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ path: text("path").notNull(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ index("idx_file_manager_shortcuts_user").on(table.userId, table.hostId),
+ ],
+);
+
+export const transferRecent = pgTable(
+ "transfer_recent",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ sourceHostId: integer("source_host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ destHostId: integer("dest_host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ destPath: text("dest_path").notNull(),
+ destPathLabel: text("dest_path_label").notNull(),
+ lastUsed: text("last_used")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [index("idx_transfer_recent_user").on(table.userId)],
+);
+
+export const dismissedAlerts = pgTable(
+ "dismissed_alerts",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ alertId: text("alert_id").notNull(),
+ dismissedAt: text("dismissed_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [index("idx_dismissed_alerts_user_id").on(table.userId)],
+);
+
+export const sshCredentials = pgTable(
+ "ssh_credentials",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ description: text("description"),
+ folder: text("folder"),
+ tags: text("tags"),
+ pin: boolean("pin").notNull().default(false),
+ // Manual drag-to-reorder position within a folder. Null means the
+ // credential has never been manually reordered; falls back to name sort
+ // in that case, same convention as hosts.sortOrder.
+ sortOrder: integer("sort_order"),
+ authType: text("auth_type").notNull(),
+ username: text("username"),
+ password: text("password"),
+ key: text("key"),
+ privateKey: text("private_key"),
+ publicKey: text("public_key"),
+ keyPassword: text("key_password"),
+ keyType: text("key_type"),
+ detectedKeyType: text("detected_key_type"),
+
+ certPublicKey: text("cert_public_key"),
+
+
+ usageCount: integer("usage_count").notNull().default(0),
+ lastUsed: text("last_used"),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [index("idx_ssh_credentials_user_id").on(table.userId)],
+);
+
+export const sshCredentialUsage = pgTable(
+ "ssh_credential_usage",
+ {
+ id: serial("id").primaryKey(),
+ credentialId: integer("credential_id")
+ .notNull()
+ .references(() => sshCredentials.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ usedAt: text("used_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ index("idx_ssh_credential_usage_credential").on(table.credentialId),
+ index("idx_ssh_credential_usage_user").on(table.userId),
+ ],
+);
+
+export const snippets = pgTable(
+ "snippets",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ content: text("content").notNull(),
+ description: text("description"),
+ folder: text("folder"),
+ order: integer("order").notNull().default(0),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ hostFilter: text("host_filter"),
+ isNote: boolean("is_note").notNull().default(false),
+ },
+ (table) => [index("idx_snippets_user_id").on(table.userId)],
+);
+
+export const snippetFolders = pgTable("snippet_folders", {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ color: text("color"),
+ icon: text("icon"),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+
+export const c2sTunnelPresets = pgTable("c2s_tunnel_presets", {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ config: text("config").notNull(),
+ platform: text("platform"),
+ computerName: text("computer_name"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+
+export const snippetAccess = pgTable(
+ "snippet_access",
+ {
+ id: serial("id").primaryKey(),
+ snippetId: integer("snippet_id")
+ .notNull()
+ .references(() => snippets.id, { onDelete: "cascade" }),
+
+ userId: varchar("user_id", { length: 255 }).references(() => users.id, { onDelete: "cascade" }),
+ roleId: integer("role_id").references(() => roles.id, {
+ onDelete: "cascade",
+ }),
+
+ grantedBy: varchar("granted_by", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+
+ permissionLevel: text("permission_level").notNull().default("view"),
+
+ expiresAt: varchar("expires_at", { length: 255 }),
+
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // Same three lookup shapes as host_access: by grantee, by role, by snippet.
+ (table) => [
+ index("idx_snippet_access_user_id").on(table.userId),
+ index("idx_snippet_access_snippet_id").on(table.snippetId),
+ index("idx_snippet_access_role_id").on(table.roleId),
+ ],
+);
+
+export const sshFolders = pgTable(
+ "ssh_folders",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ color: text("color"),
+ icon: text("icon"),
+ credentialId: integer("credential_id").references(() => sshCredentials.id, {
+ onDelete: "set null",
+ }),
+ // Manual drag-to-reorder position among sibling folders. Null falls back
+ // to name sort, same convention as hosts.sortOrder.
+ sortOrder: integer("sort_order"),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [index("idx_ssh_folders_user_id").on(table.userId)],
+);
+
+export const recentActivity = pgTable(
+ "recent_activity",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ type: text("type").notNull(),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ hostName: text("host_name"),
+ timestamp: varchar("timestamp", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // Always read newest-first for one user, so timestamp follows user_id.
+ (table) => [
+ index("idx_recent_activity_user_ts").on(table.userId, table.timestamp),
+ ],
+);
+
+export const commandHistory = pgTable(
+ "command_history",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ command: text("command").notNull(),
+ executedAt: text("executed_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ index("idx_command_history_user_host").on(table.userId, table.hostId),
+ ],
+);
+
+export const networkTopology = pgTable("network_topology", {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ topology: text("topology"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+
+export const hostAccess = pgTable(
+ "host_access",
+ {
+ id: serial("id").primaryKey(),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+
+ userId: varchar("user_id", { length: 255 })
+ .references(() => users.id, { onDelete: "cascade" }),
+ roleId: integer("role_id")
+ .references(() => roles.id, { onDelete: "cascade" }),
+
+ grantedBy: varchar("granted_by", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+
+ permissionLevel: text("permission_level")
+ .notNull()
+ .default("connect"),
+
+ expiresAt: varchar("expires_at", { length: 255 }),
+
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ lastAccessedAt: text("last_accessed_at"),
+ accessCount: integer("access_count").notNull().default(0),
+ },
+ // Resolved on every host list request and every permission check, so all
+ // three lookup shapes (by grantee, by role, by host) need to be indexed.
+ (table) => [
+ index("idx_host_access_user_id").on(table.userId),
+ index("idx_host_access_role_id").on(table.roleId),
+ index("idx_host_access_host_id").on(table.hostId),
+ index("idx_host_access_expires_at").on(table.expiresAt),
+ ],
+);
+
+export const sharedHostAuthOverrides = pgTable(
+ "shared_host_auth_overrides",
+ {
+ id: serial("id").primaryKey(),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ protocol: varchar("protocol", { length: 255 }).notNull().default("ssh"),
+ credentialId: integer("credential_id")
+ .notNull()
+ .references(() => sshCredentials.id, { onDelete: "cascade" }),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ uniqueIndex("shared_host_auth_overrides_host_user_protocol_unique").on(
+ table.hostId,
+ table.userId,
+ table.protocol,
+ ),
+ ],
+);
+
+export const sharedHostSecrets = pgTable(
+ "shared_host_secrets",
+ {
+ id: serial("id").primaryKey(),
+
+ hostAccessId: integer("host_access_id")
+ .notNull()
+ .references(() => hostAccess.id, { onDelete: "cascade" }),
+
+ targetUserId: varchar("target_user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+
+ protocol: varchar("protocol", { length: 255 }).notNull().default("ssh"),
+ sourceType: text("source_type").notNull().default("credential"),
+
+ originalCredentialId: integer("original_credential_id").references(
+ () => sshCredentials.id,
+ { onDelete: "cascade" },
+ ),
+
+ encryptedUsername: text("encrypted_username"),
+ encryptedAuthType: text("encrypted_auth_type"),
+ encryptedPassword: text("encrypted_password"),
+ encryptedKey: text("encrypted_key"),
+ encryptedKeyPassword: text("encrypted_key_password"),
+ encryptedKeyType: text("encrypted_key_type"),
+ encryptedDomain: text("encrypted_domain"),
+
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // Declared inline in the production DDL as UNIQUE(...), but never here,
+ // so the generated Postgres and MySQL schemas allowed duplicates the
+ // SQLite deployment forbids โ and the upsert had nothing to conflict on.
+ (table) => [
+ uniqueIndex("idx_shared_host_secrets_scope").on(
+ table.hostAccessId,
+ table.targetUserId,
+ table.protocol,
+ ),
+ ],
+);
+
+export const roles = pgTable("roles", {
+ id: serial("id").primaryKey(),
+ name: varchar("name", { length: 255 }).notNull().unique(),
+ displayName: text("display_name").notNull(),
+ description: text("description"),
+
+ isSystem: boolean("is_system")
+ .notNull()
+ .default(false),
+
+ permissions: text("permissions"),
+
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+
+export const userRoles = pgTable(
+ "user_roles",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ roleId: integer("role_id")
+ .notNull()
+ .references(() => roles.id, { onDelete: "cascade" }),
+
+ grantedBy: varchar("granted_by", { length: 255 }).references(() => users.id, {
+ onDelete: "set null",
+ }),
+ grantedAt: text("granted_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // Declared inline in the production DDL as UNIQUE(...), but never here,
+ // so the generated Postgres and MySQL schemas allowed duplicates the
+ // SQLite deployment forbids โ and the upsert had nothing to conflict on.
+ //
+ // The unique pair already serves lookups by user, since user_id leads it.
+ // Listing a role's members starts from role_id, which it cannot serve.
+ (table) => [
+ uniqueIndex("idx_user_roles_user_role").on(table.userId, table.roleId),
+ index("idx_user_roles_role_id").on(table.roleId),
+ ],
+);
+
+export const auditLogs = pgTable(
+ "audit_logs",
+ {
+ id: serial("id").primaryKey(),
+
+ // Nullable on purpose: the trail outlives the account, and username keeps the
+ // entry attributable once the reference is gone.
+ userId: varchar("user_id", { length: 255 }).references(() => users.id, { onDelete: "set null" }),
+ username: text("username").notNull(),
+
+ action: varchar("action", { length: 255 }).notNull(),
+ resourceType: varchar("resource_type", { length: 255 }).notNull(),
+ resourceId: text("resource_id"),
+ resourceName: text("resource_name"),
+
+ details: text("details"),
+ ipAddress: text("ip_address"),
+ userAgent: text("user_agent"),
+
+ success: boolean("success").notNull(),
+ errorMessage: text("error_message"),
+
+ timestamp: varchar("timestamp", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // This table only grows, and is always read newest-first with an optional
+ // filter. Each composite leads with the filtered column so the same index
+ // also satisfies the ORDER BY.
+ (table) => [
+ index("idx_audit_logs_timestamp").on(table.timestamp),
+ index("idx_audit_logs_user_ts").on(table.userId, table.timestamp),
+ index("idx_audit_logs_action_ts").on(table.action, table.timestamp),
+ index("idx_audit_logs_resource_ts").on(table.resourceType, table.timestamp),
+ ],
+);
+
+export const sessionRecordings = pgTable(
+ "session_recordings",
+ {
+ id: serial("id").primaryKey(),
+
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ // Nullable on purpose: a recording is evidence about the host as much as the
+ // person, so it outlives the account. username keeps it attributable.
+ userId: varchar("user_id", { length: 255 }).references(() => users.id, { onDelete: "set null" }),
+ username: text("username"),
+ accessId: integer("access_id").references(() => hostAccess.id, {
+ onDelete: "set null",
+ }),
+
+ startedAt: varchar("started_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ endedAt: text("ended_at"),
+ duration: integer("duration"),
+
+ commands: text("commands"),
+ dangerousActions: text("dangerous_actions"),
+
+ recordingPath: text("recording_path"),
+ protocol: varchar("protocol", { length: 255 }).notNull().default("ssh"),
+ format: text("format").notNull().default("text"),
+
+ terminatedByOwner: boolean("terminated_by_owner").default(false),
+ terminationReason: text("termination_reason"),
+ },
+ // Listed newest-first per user, and audited per host.
+ (table) => [
+ index("idx_session_recordings_user_started").on(
+ table.userId,
+ table.startedAt,
+ ),
+ index("idx_session_recordings_host").on(table.hostId),
+ ],
+);
+
+export const sessionShares = pgTable(
+ "session_shares",
+ {
+ id: varchar("id", { length: 255 }).primaryKey(),
+
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ ownerUserId: varchar("owner_user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+
+ protocol: varchar("protocol", { length: 255 }).notNull(),
+
+ // Live-session binding: TerminalSessionManager's session.id for SSH, or
+ // guacd's own guacamoleConnectionId for rdp/vnc/telnet. Neither is a DB
+ // row (process-local, in-memory) so this intentionally has no FK.
+ sessionId: varchar("session_id", { length: 255 }).notNull(),
+ tabInstanceId: text("tab_instance_id"),
+
+ shareType: text("share_type").notNull(), // "link" | "user"
+ targetUserId: varchar("target_user_id", { length: 255 }).references(() => users.id, {
+ onDelete: "cascade",
+ }),
+ linkToken: varchar("link_token", { length: 255 }).unique(),
+
+ permissionLevel: text("permission_level").notNull().default("read-only"),
+
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ expiresAt: varchar("expires_at", { length: 255 }).notNull(),
+ revokedAt: text("revoked_at"),
+
+ lastJoinedAt: text("last_joined_at"),
+ joinCount: integer("join_count").notNull().default(0),
+ },
+ // Resolved from the live session on join, and listed per host.
+ (table) => [
+ index("idx_session_shares_session_id").on(table.sessionId),
+ index("idx_session_shares_host_id").on(table.hostId),
+ ],
+);
+
+export const sessionShareParticipants = pgTable(
+ "session_share_participants",
+ {
+ id: serial("id").primaryKey(),
+ shareId: varchar("share_id", { length: 255 })
+ .notNull()
+ .references(() => sessionShares.id, { onDelete: "cascade" }),
+
+ userId: varchar("user_id", { length: 255 }).references(() => users.id, {
+ onDelete: "cascade",
+ }),
+ guestLabel: text("guest_label"),
+
+ joinedAt: text("joined_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ leftAt: text("left_at"),
+ },
+);
+
+export const opksshTokens = pgTable(
+ "opkssh_tokens",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+
+ sshCert: text("ssh_cert").notNull(),
+ privateKey: text("private_key").notNull(),
+
+ email: text("email"),
+ sub: text("sub"),
+ issuer: text("issuer"),
+ audience: text("audience"),
+
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ expiresAt: varchar("expires_at", { length: 255 }).notNull(),
+ lastUsed: text("last_used"),
+ },
+ // Declared inline in the production DDL as UNIQUE(...), but never here,
+ // so the generated Postgres and MySQL schemas allowed duplicates the
+ // SQLite deployment forbids โ and the upsert had nothing to conflict on.
+ (table) => [uniqueIndex("idx_opkssh_tokens_user_host").on(table.userId, table.hostId)],
+);
+
+// Vault SSH signer profiles. These hold ONLY non-secret connection settings and
+// are intended to be shared across users (shared === true makes a profile
+// visible to every user on the server). Each user authenticates to Vault via an
+// interactive OIDC flow at connect time; no tokens or keys are stored here.
+export const vaultProfiles = pgTable("vault_profiles", {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ description: text("description"),
+ folder: text("folder"),
+ tags: text("tags"),
+ // Vault server connection (non-secret)
+ vaultAddr: text("vault_addr").notNull(),
+ vaultNamespace: text("vault_namespace"),
+ // OIDC auth method mount + role used to obtain a Vault token interactively
+ oidcMount: text("oidc_mount"),
+ oidcRole: text("oidc_role"),
+ // SSH secrets engine mount + signer role used to sign the ephemeral key
+ sshMount: text("ssh_mount"),
+ sshRole: text("ssh_role").notNull(),
+ validPrincipals: text("valid_principals"),
+ // Ephemeral keypair algorithm to generate per connection
+ keyType: text("key_type"),
+ // When true the profile is visible/usable by all users on the server
+ shared: boolean("shared").notNull().default(false),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+
+// Per-user cache of the ephemeral SSH private key + Vault-signed certificate.
+// Transient: rows live only until the certificate expires. Secret fields are
+// encrypted under the user's data-encryption key (see field-crypto.ts).
+export const vaultTokens = pgTable(
+ "vault_tokens",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ profileId: integer("profile_id")
+ .notNull()
+ .references(() => vaultProfiles.id, { onDelete: "cascade" }),
+
+ sshCert: text("ssh_cert").notNull(),
+ privateKey: text("private_key").notNull(),
+
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ expiresAt: varchar("expires_at", { length: 255 }).notNull(),
+ lastUsed: text("last_used"),
+ },
+ // Declared inline in the production DDL as UNIQUE(...), but never here,
+ // so the generated Postgres and MySQL schemas allowed duplicates the
+ // SQLite deployment forbids โ and the upsert had nothing to conflict on.
+ (table) => [uniqueIndex("idx_vault_tokens_user_profile").on(table.userId, table.profileId)],
+);
+
+export const apiKeys = pgTable(
+ "api_keys",
+ {
+ id: varchar("id", { length: 255 }).primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ tokenHash: text("token_hash").notNull(),
+ tokenPrefix: text("token_prefix").notNull(),
+ createdAt: varchar("created_at", { length: 255 }).notNull().default(sql`CURRENT_TIMESTAMP`),
+ expiresAt: varchar("expires_at", { length: 255 }),
+ lastUsedAt: text("last_used_at"),
+ isActive: boolean("is_active").notNull().default(true),
+ },
+ (table) => [index("idx_api_keys_user_id").on(table.userId)],
+);
+
+export const userOpenTabs = pgTable(
+ "user_open_tabs",
+ {
+ id: varchar("id", { length: 255 }).primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ tabType: text("tab_type").notNull(),
+ hostId: integer("host_id").references(() => hosts.id, {
+ onDelete: "cascade",
+ }),
+ label: varchar("label", { length: 255 }).notNull(),
+ tabOrder: integer("tab_order").notNull().default(0),
+ backendSessionId: text("backend_session_id"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [index("idx_user_open_tabs_user_id").on(table.userId)],
+);
+
+export const userPreferences = pgTable("user_preferences", {
+ userId: varchar("user_id", { length: 255 })
+ .primaryKey()
+ .references(() => users.id, { onDelete: "cascade" }),
+ reopenTabsOnLogin: boolean("reopen_tabs_on_login")
+ .notNull()
+ .default(false),
+ theme: text("theme"),
+ fontSize: text("font_size"),
+ accentColor: text("accent_color"),
+ language: text("language"),
+ storageMode: text("storage_mode"),
+ commandAutocomplete: boolean("command_autocomplete"),
+ commandPaletteEnabled: boolean("command_palette_enabled"),
+ showHostTags: boolean("show_host_tags"),
+ hostTrayOnClick: boolean("host_tray_on_click"),
+ pinAppRail: boolean("pin_app_rail"),
+ expandAppRailOnHover: boolean("expand_app_rail_on_hover"),
+ foldersCollapsed: boolean("folders_collapsed"),
+ confirmSnippetExecution: boolean("confirm_snippet_execution"),
+ disableUpdateCheck: boolean("disable_update_check"),
+ confirmTabClose: boolean("confirm_tab_close"),
+ hiddenRailTabs: text("hidden_rail_tabs"),
+ // null means the user has not been asked yet; the assistant stays hidden
+ // until this is explicitly true and the admin global is on.
+ aiAssistantEnabled: boolean("ai_assistant_enabled"),
+ // Opt-in to letting the assistant run allowlisted read-only diagnostics
+ // without a per-command approval click.
+ aiReadOnlyCommands: boolean("ai_read_only_commands"),
+ compactHostView: boolean("compact_host_view"),
+ statusColorScheme: text("status_color_scheme"),
+ customThemes: text("custom_themes"),
+ customKeybindings: text("custom_keybindings"),
+ terminalDefaults: text("terminal_defaults"),
+ rdpDefaults: text("rdp_defaults"),
+ terminalMacros: text("terminal_macros"),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+
+export const hostMetricsPreferences = pgTable(
+ "host_metrics_preferences",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ // JSON-encoded HostMetricsLayout. Layout has no secrets, so it is stored as
+ // plain JSON (no field-level encryption).
+ layout: text("layout").notNull(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // One layout per user per host. Enforced in production since the inline DDL
+ // creates it, but it was never declared here, so the generated Postgres and
+ // MySQL schemas lacked it โ and the upsert has nothing to conflict on.
+ (table) => [
+ uniqueIndex("idx_host_metrics_prefs_user_host").on(table.userId, table.hostId),
+ ],
+);
+
+export const proxmoxStatsPreferences = pgTable(
+ "proxmox_stats_preferences",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 }).notNull().references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id").notNull().references(() => hosts.id, { onDelete: "cascade" }),
+ // JSON-encoded ProxmoxStatsLayout. Layout has no secrets, so it is stored as
+ // plain JSON (no field-level encryption), same convention as hostMetricsPreferences.layout.
+ layout: text("layout").notNull(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ uniqueIndex("idx_proxmox_stats_prefs_user_host").on(table.userId, table.hostId),
+ ],
+);
+
+export const hostSidebarPreferences = pgTable("host_sidebar_preferences", {
+ userId: varchar("user_id", { length: 255 })
+ .primaryKey()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // JSON-encoded HostSidebarPreferences. No secrets in this blob, stored as
+ // plain JSON like hostMetricsPreferences.layout.
+ data: text("data").notNull(),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+
+export const credentialSidebarPreferences = pgTable(
+ "credential_sidebar_preferences",
+ {
+ userId: varchar("user_id", { length: 255 })
+ .primaryKey()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // JSON-encoded CredentialSidebarPreferences. No secrets in this blob,
+ // same convention as hostSidebarPreferences.data.
+ data: text("data").notNull(),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+);
+
+export const uiPreferences = pgTable("ui_preferences", {
+ userId: varchar("user_id", { length: 255 })
+ .primaryKey()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // JSON-encoded UiPreferences (preset + per-area overrides + onboarding
+ // state). No secrets in this blob, same convention as
+ // hostSidebarPreferences.data.
+ data: text("data").notNull(),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+
+export const hostHealthChecks = pgTable(
+ "host_health_checks",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ // JSON array of { id, name, type: "tcp"|"http", target, port, path }
+ checks: text("checks").notNull(),
+ intervalSeconds: integer("interval_seconds").notNull().default(300),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // Same as above: one set of checks per user per host.
+ (table) => [
+ uniqueIndex("idx_host_health_checks_user_host").on(table.userId, table.hostId),
+ ],
+);
+
+export const hostHealthHistory = pgTable("host_health_history", {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ checkId: text("check_id").notNull(),
+ ts: text("ts").notNull().default(sql`CURRENT_TIMESTAMP`),
+ ok: boolean("ok").notNull(),
+ latencyMs: integer("latency_ms"),
+ detail: text("detail"),
+});
+
+export const dashboardServiceLinks = pgTable("dashboard_service_links", {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ label: varchar("label", { length: 255 }).notNull(),
+ url: text("url").notNull(),
+ order: integer("order").notNull().default(0),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+
+// --- termix-id begin ---
+// A user claims a unique public handle. Their published SSH public keys are
+// served at an unauthenticated resolver endpoint in authorized_keys format,
+// so any server can be provisioned with `curl /termix-id/u/ >> ~/.ssh/authorized_keys`.
+export const termixIdentities = pgTable("termix_identities", {
+ id: serial("id").primaryKey(),
+ // One Termix ID per user โ enforced in schema, not just in code.
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .unique()
+ .references(() => users.id, { onDelete: "cascade" }),
+ handle: varchar("handle", { length: 255 }).notNull().unique(),
+ description: text("description"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+
+export const termixIdentityKeys = pgTable("termix_identity_keys", {
+ id: serial("id").primaryKey(),
+ identityId: integer("identity_id")
+ .notNull()
+ .references(() => termixIdentities.id, { onDelete: "cascade" }),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // Public keys are non-secret, so they are stored in plaintext (no field-level
+ // encryption). This is what lets the unauthenticated resolver serve them.
+ publicKey: text("public_key").notNull(),
+ // Raw algorithm token (e.g. "ssh-ed25519"), and a normalized group used for
+ // the / resolver filter (RSA / ED25519 / ECDSA / ...).
+ keyType: text("key_type").notNull(),
+ algorithm: text("algorithm").notNull(),
+ label: varchar("label", { length: 255 }),
+ comment: text("comment"),
+ // "manual" (pasted) or "credential" (imported from an ssh_credentials entry).
+ source: text("source").notNull().default("manual"),
+ credentialId: integer("credential_id").references(() => sshCredentials.id, {
+ onDelete: "set null",
+ }),
+ enabled: boolean("enabled").notNull().default(true),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+// Per-identity certificate authority. Servers that trust this CA (via
+// TrustedUserCAKeys / @cert-authority) accept any user certificate it signs,
+// giving central revocation (rotate the CA) and expiry (cert validity).
+export const termixIdentityCa = pgTable("termix_identity_ca", {
+ id: serial("id").primaryKey(),
+ identityId: integer("identity_id")
+ .notNull()
+ .unique()
+ .references(() => termixIdentities.id, { onDelete: "cascade" }),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // CA public key (plaintext โ it is published); CA private key is field-encrypted.
+ publicKey: text("public_key").notNull(),
+ privateKey: text("private_key").notNull(),
+ validityDays: integer("validity_days").notNull().default(90),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+// --- termix-id end ---
+
+// --- tmux-monitor begin ---
+export const tmuxSessionTags = pgTable("tmux_session_tags", {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ sessionName: text("session_name").notNull(),
+ tag: text("tag").notNull(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+// --- tmux-monitor end ---
+
+// --- metrics-history begin ---
+export const hostMetricsHistory = pgTable("host_metrics_history", {
+ id: serial("id").primaryKey(),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ ts: text("ts")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ cpuPercent: doublePrecision("cpu_percent"),
+ memPercent: doublePrecision("mem_percent"),
+ diskPercent: doublePrecision("disk_percent"),
+ netRxBytes: integer("net_rx_bytes"),
+ netTxBytes: integer("net_tx_bytes"),
+});
+// --- metrics-history end ---
+
+// --- proxmox-node-history begin ---
+export const proxmoxNodeHistory = pgTable("proxmox_node_history", {
+ id: serial("id").primaryKey(),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ ts: text("ts")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ cpuPercent: doublePrecision("cpu_percent"),
+ memPercent: doublePrecision("mem_percent"),
+ diskPercent: doublePrecision("disk_percent"),
+ netRxBytes: integer("net_rx_bytes"),
+ netTxBytes: integer("net_tx_bytes"),
+});
+// --- proxmox-node-history end ---
+
+// --- alerts begin ---
+export const alertRules = pgTable("alert_rules", {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id").references(() => hosts.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ enabled: boolean("enabled").notNull().default(true),
+ triggerType: text("trigger_type").notNull(),
+ thresholdValue: doublePrecision("threshold_value"),
+ thresholdDurationSeconds: integer("threshold_duration_seconds"),
+ cooldownMinutes: integer("cooldown_minutes").notNull().default(15),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+
+export const notificationChannels = pgTable("notification_channels", {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ type: text("type").notNull(),
+ config: text("config").notNull(),
+ enabled: boolean("enabled").notNull().default(true),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+
+export const alertRuleChannels = pgTable("alert_rule_channels", {
+ id: serial("id").primaryKey(),
+ ruleId: integer("rule_id")
+ .notNull()
+ .references(() => alertRules.id, { onDelete: "cascade" }),
+ channelId: integer("channel_id")
+ .notNull()
+ .references(() => notificationChannels.id, { onDelete: "cascade" }),
+});
+
+export const alertFirings = pgTable(
+ "alert_firings",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ ruleId: integer("rule_id")
+ .notNull()
+ .references(() => alertRules.id, { onDelete: "cascade" }),
+ hostId: integer("host_id").notNull(),
+ hostName: text("host_name").notNull(),
+ firedAt: varchar("fired_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ resolvedAt: text("resolved_at"),
+ value: doublePrecision("value"),
+ message: text("message").notNull(),
+ severity: text("severity").notNull().default("warning"),
+ acknowledged: boolean("acknowledged")
+ .notNull()
+ .default(false),
+ },
+ // A rule's history is read newest-first; host_id is filtered on its own.
+ (table) => [
+ index("idx_alert_firings_rule").on(table.ruleId, table.firedAt),
+ index("idx_alert_firings_host").on(table.hostId),
+ ],
+);
+// --- alerts end ---
+
+// --- automations begin ---
+export const automations = pgTable(
+ "automations",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ description: text("description"),
+ enabled: boolean("enabled").notNull().default(true),
+ // The whole trigger + steps graph, shaped by AutomationDefinition. Read and
+ // written as a unit, never queried by its inner structure.
+ definition: text("definition").notNull(),
+ definitionVersion: integer("definition_version").notNull().default(1),
+ concurrencyPolicy: text("concurrency_policy").notNull().default("skip"),
+ maxRunSeconds: integer("max_run_seconds").notNull().default(300),
+ dryRun: boolean("dry_run").notNull().default(false),
+ lastRunAt: text("last_run_at"),
+ lastRunStatus: text("last_run_status"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // The scheduler sweeps enabled automations for one user at a time.
+ (table) => [index("idx_automations_user").on(table.userId, table.enabled)],
+);
+
+/**
+ * Durable per-target trigger state. state_key scopes a trigger to what it is
+ * actually watching ("", ":/data", ":"), so
+ * a sustained-breach window can track one filesystem rather than a whole host.
+ * Living in the database rather than memory means cooldowns and dwell windows
+ * survive a restart.
+ */
+export const automationTriggerState = pgTable(
+ "automation_trigger_state",
+ {
+ id: serial("id").primaryKey(),
+ automationId: integer("automation_id")
+ .notNull()
+ .references(() => automations.id, { onDelete: "cascade" }),
+ stateKey: varchar("state_key", { length: 255 }).notNull(),
+ breachStartedAt: text("breach_started_at"),
+ lastFiredAt: text("last_fired_at"),
+ lastValue: doublePrecision("last_value"),
+ lastObservedState: text("last_observed_state"),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ uniqueIndex("idx_automation_trigger_state_key").on(
+ table.automationId,
+ table.stateKey,
+ ),
+ ],
+);
+
+export const automationSchedules = pgTable(
+ "automation_schedules",
+ {
+ id: serial("id").primaryKey(),
+ automationId: integer("automation_id")
+ .notNull()
+ .references(() => automations.id, { onDelete: "cascade" }),
+ cron: text("cron"),
+ intervalSeconds: integer("interval_seconds"),
+ timezone: text("timezone"),
+ nextDueAt: varchar("next_due_at", { length: 255 }),
+ lastTickAt: text("last_tick_at"),
+ },
+ (table) => [
+ uniqueIndex("idx_automation_schedules_automation").on(table.automationId),
+ index("idx_automation_schedules_due").on(table.nextDueAt),
+ ],
+);
+
+export const automationRuns = pgTable(
+ "automation_runs",
+ {
+ id: serial("id").primaryKey(),
+ automationId: integer("automation_id")
+ .notNull()
+ .references(() => automations.id, { onDelete: "cascade" }),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ triggerType: text("trigger_type").notNull(),
+ triggerContext: text("trigger_context"),
+ status: varchar("status", { length: 255 }).notNull(),
+ startedAt: varchar("started_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ finishedAt: text("finished_at"),
+ durationMs: integer("duration_ms"),
+ error: text("error"),
+ dryRun: boolean("dry_run").notNull().default(false),
+ // Set when one automation invoked another, so a chain can be traced.
+ parentRunId: integer("parent_run_id"),
+ },
+ (table) => [
+ index("idx_automation_runs_automation").on(
+ table.automationId,
+ table.startedAt,
+ ),
+ index("idx_automation_runs_user").on(table.userId, table.startedAt),
+ ],
+);
+
+export const automationRunSteps = pgTable(
+ "automation_run_steps",
+ {
+ id: serial("id").primaryKey(),
+ runId: integer("run_id")
+ .notNull()
+ .references(() => automationRuns.id, { onDelete: "cascade" }),
+ stepIndex: integer("step_index").notNull(),
+ stepId: text("step_id").notNull(),
+ stepType: text("step_type").notNull(),
+ status: varchar("status", { length: 255 }).notNull(),
+ startedAt: varchar("started_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ finishedAt: text("finished_at"),
+ output: text("output"),
+ error: text("error"),
+ truncated: boolean("truncated")
+ .notNull()
+ .default(false),
+ },
+ (table) => [
+ index("idx_automation_run_steps_run").on(table.runId, table.stepIndex),
+ ],
+);
+
+export const automationChannels = pgTable(
+ "automation_channels",
+ {
+ id: serial("id").primaryKey(),
+ automationId: integer("automation_id")
+ .notNull()
+ .references(() => automations.id, { onDelete: "cascade" }),
+ channelId: integer("channel_id")
+ .notNull()
+ .references(() => notificationChannels.id, { onDelete: "cascade" }),
+ },
+ (table) => [
+ uniqueIndex("idx_automation_channels_pair").on(
+ table.automationId,
+ table.channelId,
+ ),
+ ],
+);
+// --- automations end ---
+
+// --- homepage begin ---
+export const homepageItems = pgTable(
+ "homepage_items",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ typeId: text("type_id").notNull(),
+ title: text("title"),
+ config: text("config").notNull().default("{}"),
+ folderId: integer("folder_id"),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [index("idx_homepage_items_user_id").on(table.userId)],
+);
+
+export const homepageLayouts = pgTable("homepage_layouts", {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .unique()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // JSON: { entries: HomepageLayoutEntry[], pan: {x,y}, zoom: number }
+ layout: text("layout").notNull().default("{}"),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+// --- homepage end ---
+
+// --- fleets begin ---
+export const fleets = pgTable("fleets", {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ description: text("description"),
+ color: text("color"),
+ icon: text("icon"),
+ // JSON array of { tag: string } rules, unioned with static fleetMembers at
+ // resolution time. Kept to tag-equality matching for v1.
+ tagRules: text("tag_rules"),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+
+export const fleetMembers = pgTable(
+ "fleet_members",
+ {
+ id: serial("id").primaryKey(),
+ fleetId: integer("fleet_id")
+ .notNull()
+ .references(() => fleets.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ addedAt: text("added_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // fleet_id leads the unique pair, so listing a fleet's hosts is already
+ // served. Finding the fleets a host belongs to starts from host_id.
+ (table) => [
+ uniqueIndex("idx_fleet_members_fleet_host").on(table.fleetId, table.hostId),
+ index("idx_fleet_members_host").on(table.hostId),
+ ],
+);
+
+// Latest-only inventory snapshot per host, overwritten on each refresh - no
+// historical log, matching the "latest snapshot only" scope decision.
+export const fleetInventory = pgTable(
+ "fleet_inventory",
+ {
+ id: serial("id").primaryKey(),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ osPrettyName: text("os_pretty_name"),
+ kernel: text("kernel"),
+ architecture: text("architecture"),
+ hostname: text("hostname"),
+ uptimeSeconds: integer("uptime_seconds"),
+ ip: text("ip"),
+ packageManager: text("package_manager"),
+ collectedAt: text("collected_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // host_id leads the unique pair; a user's whole inventory is read by user_id.
+ (table) => [
+ uniqueIndex("idx_fleet_inventory_host").on(table.hostId, table.userId),
+ index("idx_fleet_inventory_user").on(table.userId),
+ ],
+);
+// --- fleets end ---
+
+// --- workspaces begin ---
+export const userWorkspaces = pgTable(
+ "user_workspaces",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: varchar("name", { length: 255 }).notNull(),
+ color: text("color"),
+ icon: text("icon"),
+ // "manual" | "last_session" - exactly one last_session row per user.
+ kind: text("kind").notNull().default("manual"),
+ isDefault: boolean("is_default")
+ .notNull()
+ .default(false),
+ // JSON-encoded WorkspacePayload: tabs, splitMode, paneTabIds, rowSizes, rowColSizes
+ payload: text("payload").notNull().default("{}"),
+ syncId: varchar("sync_id", { length: 255 }).unique(),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ lastUsedAt: text("last_used_at"),
+ },
+ (table) => [index("idx_user_workspaces_user_id").on(table.userId)],
+);
+// --- workspaces end ---
+
+// --- sync begin ---
+// Records a delete for a synced entity type so the other side of a sync
+// pair (embedded desktop backend <-> connected remote server) learns about
+// the deletion instead of re-creating the row on its next pull.
+export const syncTombstones = pgTable("sync_tombstones", {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ entityType: text("entity_type").notNull(),
+ syncId: varchar("sync_id", { length: 255 }).notNull(),
+ deletedAt: text("deleted_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+// --- sync end ---
+
+// --- ai begin ---
+/**
+ * A user's connection to one AI provider. api_key is encrypted at rest via
+ * FieldCrypto; it is never returned to the frontend, which only ever sees
+ * api_key_prefix for display.
+ */
+export const aiProviders = pgTable(
+ "ai_providers",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // ollama | anthropic | openai | gemini | openai_compatible
+ providerType: text("provider_type").notNull(),
+ label: varchar("label", { length: 255 }).notNull(),
+ // Required for ollama and openai_compatible, optional elsewhere.
+ baseUrl: text("base_url"),
+ apiKey: text("api_key"),
+ // First few characters, kept in the clear so the UI can identify a key.
+ apiKeyPrefix: text("api_key_prefix"),
+ defaultModel: text("default_model"),
+ enabled: boolean("enabled").notNull().default(true),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ uniqueIndex("idx_ai_providers_user_label").on(table.userId, table.label),
+ ],
+);
+
+export const aiConversations = pgTable(
+ "ai_conversations",
+ {
+ id: serial("id").primaryKey(),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ title: text("title"),
+ providerId: integer("provider_id"),
+ model: text("model"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: varchar("updated_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ index("idx_ai_conversations_user").on(table.userId, table.updatedAt),
+ ],
+);
+
+export const aiMessages = pgTable(
+ "ai_messages",
+ {
+ id: serial("id").primaryKey(),
+ conversationId: integer("conversation_id")
+ .notNull()
+ .references(() => aiConversations.id, { onDelete: "cascade" }),
+ // user | assistant | tool
+ role: text("role").notNull(),
+ content: text("content").notNull().default(""),
+ // Serialized tool calls and their results for this turn.
+ toolCalls: text("tool_calls"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ index("idx_ai_messages_conversation").on(
+ table.conversationId,
+ table.createdAt,
+ ),
+ ],
+);
+
+/**
+ * A change the assistant wants to make. Nothing here has been applied: the
+ * payload is re-validated against the tool schema at apply time and only then
+ * dispatched through the same repository logic a human action uses.
+ */
+export const aiProposals = pgTable(
+ "ai_proposals",
+ {
+ id: serial("id").primaryKey(),
+ conversationId: integer("conversation_id")
+ .notNull()
+ .references(() => aiConversations.id, { onDelete: "cascade" }),
+ userId: varchar("user_id", { length: 255 })
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // The propose_* tool name that produced this.
+ kind: text("kind").notNull(),
+ summary: text("summary"),
+ payload: text("payload").notNull().default("{}"),
+ // pending | applied | rejected | expired
+ status: varchar("status", { length: 255 }).notNull().default("pending"),
+ appliedAt: text("applied_at"),
+ resultSummary: text("result_summary"),
+ createdAt: varchar("created_at", { length: 255 })
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ index("idx_ai_proposals_user").on(table.userId, table.status),
+ index("idx_ai_proposals_conversation").on(table.conversationId),
+ ],
+);
+// --- ai end ---
diff --git a/src/backend/database/db/schema.ts b/src/backend/database/db/schema.ts
index 6e0a305..6a15e34 100644
--- a/src/backend/database/db/schema.ts
+++ b/src/backend/database/db/schema.ts
@@ -1,4 +1,12 @@
-import { sqliteTable, text, integer, real } from "drizzle-orm/sqlite-core";
+import {
+ sqliteTable,
+ text,
+ integer,
+ real,
+ index,
+ uniqueIndex,
+ type AnySQLiteColumn,
+} from "drizzle-orm/sqlite-core";
import { sql } from "drizzle-orm";
export const users = sqliteTable("users", {
@@ -53,42 +61,54 @@ export const ssoProviders = sqliteTable("sso_providers", {
.default(sql`CURRENT_TIMESTAMP`),
});
-export const sessions = sqliteTable("sessions", {
- id: text("id").primaryKey(),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- jwtToken: text("jwt_token").notNull(),
- deviceType: text("device_type").notNull(),
- deviceInfo: text("device_info").notNull(),
- oidcSub: text("oidc_sub"),
- oidcSid: text("oidc_sid"),
- ssoProviderId: integer("sso_provider_id"),
- createdAt: text("created_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
- expiresAt: text("expires_at").notNull(),
- lastActiveAt: text("last_active_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+export const sessions = sqliteTable(
+ "sessions",
+ {
+ id: text("id").primaryKey(),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ jwtToken: text("jwt_token").notNull(),
+ deviceType: text("device_type").notNull(),
+ deviceInfo: text("device_info").notNull(),
+ oidcSub: text("oidc_sub"),
+ oidcSid: text("oidc_sid"),
+ ssoProviderId: integer("sso_provider_id"),
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ expiresAt: text("expires_at").notNull(),
+ lastActiveAt: text("last_active_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // Listing a user's devices, and the startup sweep of expired rows.
+ (table) => [
+ index("idx_sessions_user_id").on(table.userId),
+ index("idx_sessions_expires_at").on(table.expiresAt),
+ ],
+);
-export const trustedDevices = sqliteTable("trusted_devices", {
- id: text("id").primaryKey(),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- deviceFingerprint: text("device_fingerprint").notNull(),
- deviceType: text("device_type").notNull(),
- deviceInfo: text("device_info").notNull(),
- createdAt: text("created_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
- expiresAt: text("expires_at").notNull(),
- lastUsedAt: text("last_used_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+export const trustedDevices = sqliteTable(
+ "trusted_devices",
+ {
+ id: text("id").primaryKey(),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ deviceFingerprint: text("device_fingerprint").notNull(),
+ deviceType: text("device_type").notNull(),
+ deviceInfo: text("device_info").notNull(),
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ expiresAt: text("expires_at").notNull(),
+ lastUsedAt: text("last_used_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [index("idx_trusted_devices_user_id").on(table.userId)],
+);
export const webauthnCredentials = sqliteTable("webauthn_credentials", {
id: text("id").primaryKey(),
@@ -109,228 +129,303 @@ export const webauthnCredentials = sqliteTable("webauthn_credentials", {
lastUsedAt: text("last_used_at"),
});
-export const hosts = sqliteTable("ssh_data", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- connectionType: text("connection_type").notNull().default("ssh"),
- name: text("name"),
- ip: text("ip").notNull(),
- port: integer("port").notNull(),
- username: text("username").notNull(),
- folder: text("folder"),
- tags: text("tags"),
- pin: integer("pin", { mode: "boolean" }).notNull().default(false),
- authType: text("auth_type").notNull(),
- useWarpgate: integer("use_warpgate", { mode: "boolean" }).notNull().default(false),
- forceKeyboardInteractive: text("force_keyboard_interactive"),
+export const hosts = sqliteTable(
+ "ssh_data",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ connectionType: text("connection_type").notNull().default("ssh"),
+ name: text("name"),
+ ip: text("ip").notNull(),
+ port: integer("port").notNull(),
+ username: text("username").notNull(),
+ folder: text("folder"),
+ // Sub-host nesting: a host acting as an organizational parent for other
+ // hosts, mutually exclusive with folder (see host route validation).
+ parentHostId: integer("parent_host_id").references(
+ (): AnySQLiteColumn => hosts.id,
+ { onDelete: "set null" },
+ ),
+ tags: text("tags"),
+ pin: integer("pin", { mode: "boolean" }).notNull().default(false),
+ // Manual drag-to-reorder position within a folder. Null means the host has
+ // never been manually reordered; falls back to name sort in that case.
+ sortOrder: integer("sort_order"),
+ authType: text("auth_type").notNull(),
+ useWarpgate: integer("use_warpgate", { mode: "boolean" }).notNull().default(false),
+ shareSshAuth: integer("share_ssh_auth", { mode: "boolean" })
+ .notNull()
+ .default(false),
+ forceKeyboardInteractive: text("force_keyboard_interactive"),
- password: text("password"),
- key: text("key", { length: 8192 }),
- keyPassword: text("key_password"),
- keyType: text("key_type"),
- sudoPassword: text("sudo_password"),
+ password: text("password"),
+ key: text("key", { length: 8192 }),
+ keyPassword: text("key_password"),
+ keyType: text("key_type"),
+ sudoPassword: text("sudo_password"),
- autostartPassword: text("autostart_password"),
- autostartKey: text("autostart_key", { length: 8192 }),
- autostartKeyPassword: text("autostart_key_password"),
+ autostartPassword: text("autostart_password"),
+ autostartKey: text("autostart_key", { length: 8192 }),
+ autostartKeyPassword: text("autostart_key_password"),
- credentialId: integer("credential_id").references(() => sshCredentials.id, { onDelete: "set null" }),
- overrideCredentialUsername: integer("override_credential_username", {
- mode: "boolean",
- }),
- // When authType is "vault", the host authenticates via a Vault SSH signer
- // profile (shared settings, no secrets). The signing certificate is obtained
- // per-user at connect time via an interactive Vault OIDC flow.
- vaultProfileId: integer("vault_profile_id").references(
- () => vaultProfiles.id,
- { onDelete: "set null" },
- ),
- enableTerminal: integer("enable_terminal", { mode: "boolean" })
- .notNull()
- .default(true),
- enableSessionLogging: integer("enable_session_logging", { mode: "boolean" })
- .notNull()
- .default(true),
- enableCommandHistory: integer("enable_command_history", { mode: "boolean" })
- .notNull()
- .default(true),
- enableTunnel: integer("enable_tunnel", { mode: "boolean" })
- .notNull()
- .default(true),
- tunnelConnections: text("tunnel_connections"),
- jumpHosts: text("jump_hosts"),
- enableFileManager: integer("enable_file_manager", { mode: "boolean" })
- .notNull()
- .default(true),
- scpLegacy: integer("scp_legacy", { mode: "boolean" }).notNull().default(false),
- enableDocker: integer("enable_docker", { mode: "boolean" })
- .notNull()
- .default(false),
- enableTmuxMonitor: integer("enable_tmux_monitor", { mode: "boolean" })
- .notNull()
- .default(false),
- showTerminalInSidebar: integer("show_terminal_in_sidebar", { mode: "boolean" })
- .notNull()
- .default(true),
- showFileManagerInSidebar: integer("show_file_manager_in_sidebar", { mode: "boolean" })
- .notNull()
- .default(false),
- showTunnelInSidebar: integer("show_tunnel_in_sidebar", { mode: "boolean" })
- .notNull()
- .default(false),
- showDockerInSidebar: integer("show_docker_in_sidebar", { mode: "boolean" })
- .notNull()
- .default(false),
- showServerStatsInSidebar: integer("show_server_stats_in_sidebar", { mode: "boolean" })
- .notNull()
- .default(false),
- defaultPath: text("default_path"),
- statsConfig: text("stats_config"),
- dockerConfig: text("docker_config"),
- enableProxmox: integer("enable_proxmox", { mode: "boolean" })
- .notNull()
- .default(false),
- proxmoxConfig: text("proxmox_config"),
- terminalConfig: text("terminal_config"),
- quickActions: text("quick_actions"),
- notes: text("notes"),
- enableSsh: integer("enable_ssh", { mode: "boolean" }).notNull().default(true),
- enableRdp: integer("enable_rdp", { mode: "boolean" }).notNull().default(false),
- enableVnc: integer("enable_vnc", { mode: "boolean" }).notNull().default(false),
- enableTelnet: integer("enable_telnet", { mode: "boolean" }).notNull().default(false),
+ credentialId: integer("credential_id").references(() => sshCredentials.id, { onDelete: "set null" }),
+ overrideCredentialUsername: integer("override_credential_username", {
+ mode: "boolean",
+ }),
+ // When authType is "vault", the host authenticates via a Vault SSH signer
+ // profile (shared settings, no secrets). The signing certificate is obtained
+ // per-user at connect time via an interactive Vault OIDC flow.
+ vaultProfileId: integer("vault_profile_id").references(
+ () => vaultProfiles.id,
+ { onDelete: "set null" },
+ ),
+ enableTerminal: integer("enable_terminal", { mode: "boolean" })
+ .notNull()
+ .default(true),
+ enableSessionLogging: integer("enable_session_logging", { mode: "boolean" })
+ .notNull()
+ .default(true),
+ allowSessionSharing: integer("allow_session_sharing", { mode: "boolean" })
+ .notNull()
+ .default(true),
+ enableCommandHistory: integer("enable_command_history", { mode: "boolean" })
+ .notNull()
+ .default(true),
+ enableTunnel: integer("enable_tunnel", { mode: "boolean" })
+ .notNull()
+ .default(true),
+ tunnelConnections: text("tunnel_connections"),
+ jumpHosts: text("jump_hosts"),
+ enableFileManager: integer("enable_file_manager", { mode: "boolean" })
+ .notNull()
+ .default(true),
+ scpLegacy: integer("scp_legacy", { mode: "boolean" }).notNull().default(false),
+ enableDocker: integer("enable_docker", { mode: "boolean" })
+ .notNull()
+ .default(false),
+ enableTmuxMonitor: integer("enable_tmux_monitor", { mode: "boolean" })
+ .notNull()
+ .default(false),
+ enableTerminalToolbar: integer("enable_terminal_toolbar", { mode: "boolean" })
+ .notNull()
+ .default(true),
+ showTerminalInSidebar: integer("show_terminal_in_sidebar", { mode: "boolean" })
+ .notNull()
+ .default(true),
+ showFileManagerInSidebar: integer("show_file_manager_in_sidebar", { mode: "boolean" })
+ .notNull()
+ .default(false),
+ showTunnelInSidebar: integer("show_tunnel_in_sidebar", { mode: "boolean" })
+ .notNull()
+ .default(false),
+ showDockerInSidebar: integer("show_docker_in_sidebar", { mode: "boolean" })
+ .notNull()
+ .default(false),
+ showServerStatsInSidebar: integer("show_server_stats_in_sidebar", { mode: "boolean" })
+ .notNull()
+ .default(false),
+ defaultPath: text("default_path"),
+ statsConfig: text("stats_config"),
+ dockerConfig: text("docker_config"),
+ enableProxmox: integer("enable_proxmox", { mode: "boolean" })
+ .notNull()
+ .default(false),
+ proxmoxConfig: text("proxmox_config"),
+ enableProxmoxStats: integer("enable_proxmox_stats", { mode: "boolean" })
+ .notNull()
+ .default(false),
+ proxmoxStatsConfig: text("proxmox_stats_config"),
+ terminalConfig: text("terminal_config"),
+ quickActions: text("quick_actions"),
+ notes: text("notes"),
+ enableSsh: integer("enable_ssh", { mode: "boolean" }).notNull().default(true),
+ enableRdp: integer("enable_rdp", { mode: "boolean" }).notNull().default(false),
+ enableVnc: integer("enable_vnc", { mode: "boolean" }).notNull().default(false),
+ enableTelnet: integer("enable_telnet", { mode: "boolean" }).notNull().default(false),
- sshPort: integer("ssh_port").default(22),
- rdpPort: integer("rdp_port").default(3389),
- vncPort: integer("vnc_port").default(5900),
- telnetPort: integer("telnet_port").default(23),
+ sshPort: integer("ssh_port").default(22),
+ rdpPort: integer("rdp_port").default(3389),
+ vncPort: integer("vnc_port").default(5900),
+ telnetPort: integer("telnet_port").default(23),
- rdpCredentialId: integer("rdp_credential_id").references(() => sshCredentials.id, { onDelete: "set null" }),
- rdpUser: text("rdp_user"),
- rdpPassword: text("rdp_password"),
- rdpDomain: text("rdp_domain"),
- rdpSecurity: text("rdp_security"),
- rdpIgnoreCert: integer("rdp_ignore_cert", { mode: "boolean" }).default(false),
+ rdpCredentialId: integer("rdp_credential_id").references(() => sshCredentials.id, { onDelete: "set null" }),
+ rdpUser: text("rdp_user"),
+ rdpPassword: text("rdp_password"),
+ rdpDomain: text("rdp_domain"),
+ rdpSecurity: text("rdp_security"),
+ rdpIgnoreCert: integer("rdp_ignore_cert", { mode: "boolean" }).default(false),
- vncCredentialId: integer("vnc_credential_id").references(() => sshCredentials.id, { onDelete: "set null" }),
- vncPassword: text("vnc_password"),
- vncUser: text("vnc_user"),
+ vncCredentialId: integer("vnc_credential_id").references(() => sshCredentials.id, { onDelete: "set null" }),
+ vncPassword: text("vnc_password"),
+ vncUser: text("vnc_user"),
- telnetUser: text("telnet_user"),
- telnetPassword: text("telnet_password"),
- telnetCredentialId: integer("telnet_credential_id").references(() => sshCredentials.id, { onDelete: "set null" }),
+ telnetUser: text("telnet_user"),
+ telnetPassword: text("telnet_password"),
+ telnetCredentialId: integer("telnet_credential_id").references(() => sshCredentials.id, { onDelete: "set null" }),
- rdpAuthType: text("rdp_auth_type"),
- vncAuthType: text("vnc_auth_type"),
- telnetAuthType: text("telnet_auth_type"),
+ rdpAuthType: text("rdp_auth_type"),
+ vncAuthType: text("vnc_auth_type"),
+ telnetAuthType: text("telnet_auth_type"),
- domain: text("domain"),
- security: text("security"),
- ignoreCert: integer("ignore_cert", { mode: "boolean" }).default(false),
- guacamoleConfig: text("guacamole_config"),
+ domain: text("domain"),
+ security: text("security"),
+ ignoreCert: integer("ignore_cert", { mode: "boolean" }).default(false),
+ guacamoleConfig: text("guacamole_config"),
- useSocks5: integer("use_socks5", { mode: "boolean" }),
- socks5Host: text("socks5_host"),
- socks5Port: integer("socks5_port"),
- socks5Username: text("socks5_username"),
- socks5Password: text("socks5_password"),
- socks5ProxyChain: text("socks5_proxy_chain"),
+ useSocks5: integer("use_socks5", { mode: "boolean" }),
+ socks5Host: text("socks5_host"),
+ socks5Port: integer("socks5_port"),
+ socks5Username: text("socks5_username"),
+ socks5Password: text("socks5_password"),
+ socks5ProxyChain: text("socks5_proxy_chain"),
- macAddress: text("mac_address"),
- wolBroadcastAddress: text("wol_broadcast_address"),
- portKnockSequence: text("port_knock_sequence"),
+ // null = use the desktop app's global default; "local" | "remote" pins
+ // this specific host's SSH/Docker-console/Serial connections to originate
+ // from the embedded local backend or a connected remote sync server.
+ // Ignored for rdp/vnc/telnet, which always require the remote server.
+ connectionOrigin: text("connection_origin"),
- hostKeyFingerprint: text("host_key_fingerprint"),
- hostKeyType: text("host_key_type"),
- hostKeyAlgorithm: text("host_key_algorithm").default("sha256"),
- hostKeyFirstSeen: text("host_key_first_seen"),
- hostKeyLastVerified: text("host_key_last_verified"),
- hostKeyChangedCount: integer("host_key_changed_count").default(0),
+ macAddress: text("mac_address"),
+ wolBroadcastAddress: text("wol_broadcast_address"),
+ portKnockSequence: text("port_knock_sequence"),
- createdAt: text("created_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
- updatedAt: text("updated_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+ hostKeyFingerprint: text("host_key_fingerprint"),
+ hostKeyType: text("host_key_type"),
+ hostKeyAlgorithm: text("host_key_algorithm").default("sha256"),
+ hostKeyFirstSeen: text("host_key_first_seen"),
+ hostKeyLastVerified: text("host_key_last_verified"),
+ hostKeyChangedCount: integer("host_key_changed_count").default(0),
-export const fileManagerRecent = sqliteTable("file_manager_recent", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- hostId: integer("host_id")
- .notNull()
- .references(() => hosts.id, { onDelete: "cascade" }),
- name: text("name").notNull(),
- path: text("path").notNull(),
- lastOpened: text("last_opened")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+ // Stable identity used to match this row across two independently-seeded
+ // databases (the embedded backend and a connected remote server) during
+ // sync -- local autoincrement ids collide across instances.
+ syncId: text("sync_id").unique(),
-export const fileManagerPinned = sqliteTable("file_manager_pinned", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- hostId: integer("host_id")
- .notNull()
- .references(() => hosts.id, { onDelete: "cascade" }),
- name: text("name").notNull(),
- path: text("path").notNull(),
- pinnedAt: text("pinned_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // Every host read is scoped by owner, so user_id carries the host list.
+ //
+ // `folder` is deliberately not indexed: on Postgres/MySQL an indexed text
+ // column is generated as varchar(255), and folder holds a joined nested path
+ // with no length cap, so indexing it would truncate deep hierarchies.
+ (table) => [
+ index("idx_ssh_data_user_id").on(table.userId),
+ index("idx_ssh_data_parent_host").on(table.parentHostId),
+ index("idx_ssh_data_credential").on(table.credentialId),
+ ],
+);
-export const fileManagerShortcuts = sqliteTable("file_manager_shortcuts", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- hostId: integer("host_id")
- .notNull()
- .references(() => hosts.id, { onDelete: "cascade" }),
- name: text("name").notNull(),
- path: text("path").notNull(),
- createdAt: text("created_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+export const fileManagerRecent = sqliteTable(
+ "file_manager_recent",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ name: text("name").notNull(),
+ path: text("path").notNull(),
+ lastOpened: text("last_opened")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // Every file manager surface is read for one user on one host at a time.
+ (table) => [
+ index("idx_file_manager_recent_user").on(table.userId, table.hostId),
+ ],
+);
-export const transferRecent = sqliteTable("transfer_recent", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- sourceHostId: integer("source_host_id")
- .notNull()
- .references(() => hosts.id, { onDelete: "cascade" }),
- destHostId: integer("dest_host_id")
- .notNull()
- .references(() => hosts.id, { onDelete: "cascade" }),
- destPath: text("dest_path").notNull(),
- destPathLabel: text("dest_path_label").notNull(),
- lastUsed: text("last_used")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+export const fileManagerPinned = sqliteTable(
+ "file_manager_pinned",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ name: text("name").notNull(),
+ path: text("path").notNull(),
+ pinnedAt: text("pinned_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ index("idx_file_manager_pinned_user").on(table.userId, table.hostId),
+ ],
+);
-export const dismissedAlerts = sqliteTable("dismissed_alerts", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- alertId: text("alert_id").notNull(),
- dismissedAt: text("dismissed_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+export const fileManagerShortcuts = sqliteTable(
+ "file_manager_shortcuts",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ name: text("name").notNull(),
+ path: text("path").notNull(),
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ index("idx_file_manager_shortcuts_user").on(table.userId, table.hostId),
+ ],
+);
-export const sshCredentials = sqliteTable("ssh_credentials", {
+export const transferRecent = sqliteTable(
+ "transfer_recent",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ sourceHostId: integer("source_host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ destHostId: integer("dest_host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ destPath: text("dest_path").notNull(),
+ destPathLabel: text("dest_path_label").notNull(),
+ lastUsed: text("last_used")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [index("idx_transfer_recent_user").on(table.userId)],
+);
+
+export const dismissedAlerts = sqliteTable(
+ "dismissed_alerts",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ alertId: text("alert_id").notNull(),
+ dismissedAt: text("dismissed_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [index("idx_dismissed_alerts_user_id").on(table.userId)],
+);
+
+export const sshCredentials = sqliteTable(
+ "ssh_credentials",
+ {
id: integer("id").primaryKey({ autoIncrement: true }),
userId: text("user_id")
.notNull()
@@ -339,6 +434,11 @@ export const sshCredentials = sqliteTable("ssh_credentials", {
description: text("description"),
folder: text("folder"),
tags: text("tags"),
+ pin: integer("pin", { mode: "boolean" }).notNull().default(false),
+ // Manual drag-to-reorder position within a folder. Null means the
+ // credential has never been manually reordered; falls back to name sort
+ // in that case, same convention as hosts.sortOrder.
+ sortOrder: integer("sort_order"),
authType: text("auth_type").notNull(),
username: text("username"),
password: text("password"),
@@ -354,48 +454,64 @@ export const sshCredentials = sqliteTable("ssh_credentials", {
usageCount: integer("usage_count").notNull().default(0),
lastUsed: text("last_used"),
+ syncId: text("sync_id").unique(),
createdAt: text("created_at")
.notNull()
.default(sql`CURRENT_TIMESTAMP`),
updatedAt: text("updated_at")
.notNull()
.default(sql`CURRENT_TIMESTAMP`),
-});
+ },
+ (table) => [index("idx_ssh_credentials_user_id").on(table.userId)],
+);
-export const sshCredentialUsage = sqliteTable("ssh_credential_usage", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- credentialId: integer("credential_id")
- .notNull()
- .references(() => sshCredentials.id, { onDelete: "cascade" }),
- hostId: integer("host_id")
- .notNull()
- .references(() => hosts.id, { onDelete: "cascade" }),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- usedAt: text("used_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+export const sshCredentialUsage = sqliteTable(
+ "ssh_credential_usage",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ credentialId: integer("credential_id")
+ .notNull()
+ .references(() => sshCredentials.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ usedAt: text("used_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ index("idx_ssh_credential_usage_credential").on(table.credentialId),
+ index("idx_ssh_credential_usage_user").on(table.userId),
+ ],
+);
-export const snippets = sqliteTable("snippets", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- name: text("name").notNull(),
- content: text("content").notNull(),
- description: text("description"),
- folder: text("folder"),
- order: integer("order").notNull().default(0),
- createdAt: text("created_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
- updatedAt: text("updated_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
- hostFilter: text("host_filter"),
-});
+export const snippets = sqliteTable(
+ "snippets",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: text("name").notNull(),
+ content: text("content").notNull(),
+ description: text("description"),
+ folder: text("folder"),
+ order: integer("order").notNull().default(0),
+ syncId: text("sync_id").unique(),
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ hostFilter: text("host_filter"),
+ isNote: integer("is_note", { mode: "boolean" }).notNull().default(false),
+ },
+ (table) => [index("idx_snippets_user_id").on(table.userId)],
+);
export const snippetFolders = sqliteTable("snippet_folders", {
id: integer("id").primaryKey({ autoIncrement: true }),
@@ -405,6 +521,7 @@ export const snippetFolders = sqliteTable("snippet_folders", {
name: text("name").notNull(),
color: text("color"),
icon: text("icon"),
+ syncId: text("sync_id").unique(),
createdAt: text("created_at")
.notNull()
.default(sql`CURRENT_TIMESTAMP`),
@@ -430,74 +547,107 @@ export const c2sTunnelPresets = sqliteTable("c2s_tunnel_presets", {
.default(sql`CURRENT_TIMESTAMP`),
});
-export const snippetAccess = sqliteTable("snippet_access", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- snippetId: integer("snippet_id")
- .notNull()
- .references(() => snippets.id, { onDelete: "cascade" }),
+export const snippetAccess = sqliteTable(
+ "snippet_access",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ snippetId: integer("snippet_id")
+ .notNull()
+ .references(() => snippets.id, { onDelete: "cascade" }),
- userId: text("user_id").references(() => users.id, { onDelete: "cascade" }),
- roleId: integer("role_id").references(() => roles.id, {
- onDelete: "cascade",
- }),
+ userId: text("user_id").references(() => users.id, { onDelete: "cascade" }),
+ roleId: integer("role_id").references(() => roles.id, {
+ onDelete: "cascade",
+ }),
- grantedBy: text("granted_by")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
+ grantedBy: text("granted_by")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
- permissionLevel: text("permission_level").notNull().default("view"),
+ permissionLevel: text("permission_level").notNull().default("view"),
- expiresAt: text("expires_at"),
+ expiresAt: text("expires_at"),
- createdAt: text("created_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // Same three lookup shapes as host_access: by grantee, by role, by snippet.
+ (table) => [
+ index("idx_snippet_access_user_id").on(table.userId),
+ index("idx_snippet_access_snippet_id").on(table.snippetId),
+ index("idx_snippet_access_role_id").on(table.roleId),
+ ],
+);
-export const sshFolders = sqliteTable("ssh_folders", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- name: text("name").notNull(),
- color: text("color"),
- icon: text("icon"),
- createdAt: text("created_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
- updatedAt: text("updated_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+export const sshFolders = sqliteTable(
+ "ssh_folders",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: text("name").notNull(),
+ color: text("color"),
+ icon: text("icon"),
+ credentialId: integer("credential_id").references(() => sshCredentials.id, {
+ onDelete: "set null",
+ }),
+ // Manual drag-to-reorder position among sibling folders. Null falls back
+ // to name sort, same convention as hosts.sortOrder.
+ sortOrder: integer("sort_order"),
+ syncId: text("sync_id").unique(),
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [index("idx_ssh_folders_user_id").on(table.userId)],
+);
-export const recentActivity = sqliteTable("recent_activity", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- type: text("type").notNull(),
- hostId: integer("host_id")
- .notNull()
- .references(() => hosts.id, { onDelete: "cascade" }),
- hostName: text("host_name"),
- timestamp: text("timestamp")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+export const recentActivity = sqliteTable(
+ "recent_activity",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ type: text("type").notNull(),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ hostName: text("host_name"),
+ timestamp: text("timestamp")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // Always read newest-first for one user, so timestamp follows user_id.
+ (table) => [
+ index("idx_recent_activity_user_ts").on(table.userId, table.timestamp),
+ ],
+);
-export const commandHistory = sqliteTable("command_history", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- hostId: integer("host_id")
- .notNull()
- .references(() => hosts.id, { onDelete: "cascade" }),
- command: text("command").notNull(),
- executedAt: text("executed_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+export const commandHistory = sqliteTable(
+ "command_history",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ command: text("command").notNull(),
+ executedAt: text("executed_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ index("idx_command_history_user_host").on(table.userId, table.hostId),
+ ],
+);
export const networkTopology = sqliteTable("network_topology", {
id: integer("id").primaryKey({ autoIncrement: true }),
@@ -513,72 +663,122 @@ export const networkTopology = sqliteTable("network_topology", {
.default(sql`CURRENT_TIMESTAMP`),
});
-export const hostAccess = sqliteTable("host_access", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- hostId: integer("host_id")
- .notNull()
- .references(() => hosts.id, { onDelete: "cascade" }),
+export const hostAccess = sqliteTable(
+ "host_access",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
- userId: text("user_id")
- .references(() => users.id, { onDelete: "cascade" }),
- roleId: integer("role_id")
- .references(() => roles.id, { onDelete: "cascade" }),
+ userId: text("user_id")
+ .references(() => users.id, { onDelete: "cascade" }),
+ roleId: integer("role_id")
+ .references(() => roles.id, { onDelete: "cascade" }),
- grantedBy: text("granted_by")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
+ grantedBy: text("granted_by")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
- permissionLevel: text("permission_level")
- .notNull()
- .default("connect"),
+ permissionLevel: text("permission_level")
+ .notNull()
+ .default("connect"),
- expiresAt: text("expires_at"),
+ expiresAt: text("expires_at"),
- createdAt: text("created_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
- lastAccessedAt: text("last_accessed_at"),
- accessCount: integer("access_count").notNull().default(0),
- overrideCredentialId: integer("override_credential_id").references(
- () => sshCredentials.id,
- { onDelete: "set null" },
- ),
-});
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ lastAccessedAt: text("last_accessed_at"),
+ accessCount: integer("access_count").notNull().default(0),
+ },
+ // Resolved on every host list request and every permission check, so all
+ // three lookup shapes (by grantee, by role, by host) need to be indexed.
+ (table) => [
+ index("idx_host_access_user_id").on(table.userId),
+ index("idx_host_access_role_id").on(table.roleId),
+ index("idx_host_access_host_id").on(table.hostId),
+ index("idx_host_access_expires_at").on(table.expiresAt),
+ ],
+);
-export const sharedHostSecrets = sqliteTable("shared_host_secrets", {
- id: integer("id").primaryKey({ autoIncrement: true }),
+export const sharedHostAuthOverrides = sqliteTable(
+ "shared_host_auth_overrides",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ protocol: text("protocol").notNull().default("ssh"),
+ credentialId: integer("credential_id")
+ .notNull()
+ .references(() => sshCredentials.id, { onDelete: "cascade" }),
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ uniqueIndex("shared_host_auth_overrides_host_user_protocol_unique").on(
+ table.hostId,
+ table.userId,
+ table.protocol,
+ ),
+ ],
+);
- hostAccessId: integer("host_access_id")
- .notNull()
- .references(() => hostAccess.id, { onDelete: "cascade" }),
+export const sharedHostSecrets = sqliteTable(
+ "shared_host_secrets",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
- targetUserId: text("target_user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
+ hostAccessId: integer("host_access_id")
+ .notNull()
+ .references(() => hostAccess.id, { onDelete: "cascade" }),
- protocol: text("protocol").notNull().default("ssh"),
- sourceType: text("source_type").notNull().default("credential"),
+ targetUserId: text("target_user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
- originalCredentialId: integer("original_credential_id").references(
- () => sshCredentials.id,
- { onDelete: "cascade" },
- ),
+ protocol: text("protocol").notNull().default("ssh"),
+ sourceType: text("source_type").notNull().default("credential"),
- encryptedUsername: text("encrypted_username"),
- encryptedAuthType: text("encrypted_auth_type"),
- encryptedPassword: text("encrypted_password"),
- encryptedKey: text("encrypted_key", { length: 16384 }),
- encryptedKeyPassword: text("encrypted_key_password"),
- encryptedKeyType: text("encrypted_key_type"),
- encryptedDomain: text("encrypted_domain"),
+ originalCredentialId: integer("original_credential_id").references(
+ () => sshCredentials.id,
+ { onDelete: "cascade" },
+ ),
- createdAt: text("created_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
- updatedAt: text("updated_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+ encryptedUsername: text("encrypted_username"),
+ encryptedAuthType: text("encrypted_auth_type"),
+ encryptedPassword: text("encrypted_password"),
+ encryptedKey: text("encrypted_key", { length: 16384 }),
+ encryptedKeyPassword: text("encrypted_key_password"),
+ encryptedKeyType: text("encrypted_key_type"),
+ encryptedDomain: text("encrypted_domain"),
+
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // Declared inline in the production DDL as UNIQUE(...), but never here,
+ // so the generated Postgres and MySQL schemas allowed duplicates the
+ // SQLite deployment forbids โ and the upsert had nothing to conflict on.
+ (table) => [
+ uniqueIndex("idx_shared_host_secrets_scope").on(
+ table.hostAccessId,
+ table.targetUserId,
+ table.protocol,
+ ),
+ ],
+);
export const roles = sqliteTable("roles", {
id: integer("id").primaryKey({ autoIncrement: true }),
@@ -600,102 +800,211 @@ export const roles = sqliteTable("roles", {
.default(sql`CURRENT_TIMESTAMP`),
});
-export const userRoles = sqliteTable("user_roles", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- roleId: integer("role_id")
- .notNull()
- .references(() => roles.id, { onDelete: "cascade" }),
+export const userRoles = sqliteTable(
+ "user_roles",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ roleId: integer("role_id")
+ .notNull()
+ .references(() => roles.id, { onDelete: "cascade" }),
+
+ grantedBy: text("granted_by").references(() => users.id, {
+ onDelete: "set null",
+ }),
+ grantedAt: text("granted_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // Declared inline in the production DDL as UNIQUE(...), but never here,
+ // so the generated Postgres and MySQL schemas allowed duplicates the
+ // SQLite deployment forbids โ and the upsert had nothing to conflict on.
+ //
+ // The unique pair already serves lookups by user, since user_id leads it.
+ // Listing a role's members starts from role_id, which it cannot serve.
+ (table) => [
+ uniqueIndex("idx_user_roles_user_role").on(table.userId, table.roleId),
+ index("idx_user_roles_role_id").on(table.roleId),
+ ],
+);
- grantedBy: text("granted_by").references(() => users.id, {
- onDelete: "set null",
- }),
- grantedAt: text("granted_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+export const auditLogs = sqliteTable(
+ "audit_logs",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
-export const auditLogs = sqliteTable("audit_logs", {
- id: integer("id").primaryKey({ autoIncrement: true }),
+ // Nullable on purpose: the trail outlives the account, and username keeps the
+ // entry attributable once the reference is gone.
+ userId: text("user_id").references(() => users.id, { onDelete: "set null" }),
+ username: text("username").notNull(),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- username: text("username").notNull(),
+ action: text("action").notNull(),
+ resourceType: text("resource_type").notNull(),
+ resourceId: text("resource_id"),
+ resourceName: text("resource_name"),
- action: text("action").notNull(),
- resourceType: text("resource_type").notNull(),
- resourceId: text("resource_id"),
- resourceName: text("resource_name"),
+ details: text("details"),
+ ipAddress: text("ip_address"),
+ userAgent: text("user_agent"),
- details: text("details"),
- ipAddress: text("ip_address"),
- userAgent: text("user_agent"),
+ success: integer("success", { mode: "boolean" }).notNull(),
+ errorMessage: text("error_message"),
- success: integer("success", { mode: "boolean" }).notNull(),
- errorMessage: text("error_message"),
+ timestamp: text("timestamp")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // This table only grows, and is always read newest-first with an optional
+ // filter. Each composite leads with the filtered column so the same index
+ // also satisfies the ORDER BY.
+ (table) => [
+ index("idx_audit_logs_timestamp").on(table.timestamp),
+ index("idx_audit_logs_user_ts").on(table.userId, table.timestamp),
+ index("idx_audit_logs_action_ts").on(table.action, table.timestamp),
+ index("idx_audit_logs_resource_ts").on(table.resourceType, table.timestamp),
+ ],
+);
- timestamp: text("timestamp")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+export const sessionRecordings = sqliteTable(
+ "session_recordings",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
-export const sessionRecordings = sqliteTable("session_recordings", {
- id: integer("id").primaryKey({ autoIncrement: true }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ // Nullable on purpose: a recording is evidence about the host as much as the
+ // person, so it outlives the account. username keeps it attributable.
+ userId: text("user_id").references(() => users.id, { onDelete: "set null" }),
+ username: text("username"),
+ accessId: integer("access_id").references(() => hostAccess.id, {
+ onDelete: "set null",
+ }),
+
+ startedAt: text("started_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ endedAt: text("ended_at"),
+ duration: integer("duration"),
+
+ commands: text("commands"),
+ dangerousActions: text("dangerous_actions"),
+
+ recordingPath: text("recording_path"),
+ protocol: text("protocol").notNull().default("ssh"),
+ format: text("format").notNull().default("text"),
+
+ terminatedByOwner: integer("terminated_by_owner", {
+ mode: "boolean",
+ }).default(false),
+ terminationReason: text("termination_reason"),
+ },
+ // Listed newest-first per user, and audited per host.
+ (table) => [
+ index("idx_session_recordings_user_started").on(
+ table.userId,
+ table.startedAt,
+ ),
+ index("idx_session_recordings_host").on(table.hostId),
+ ],
+);
+
+export const sessionShares = sqliteTable(
+ "session_shares",
+ {
+ id: text("id").primaryKey(),
hostId: integer("host_id")
.notNull()
.references(() => hosts.id, { onDelete: "cascade" }),
- userId: text("user_id")
+ ownerUserId: text("owner_user_id")
.notNull()
.references(() => users.id, { onDelete: "cascade" }),
- accessId: integer("access_id").references(() => hostAccess.id, {
- onDelete: "set null",
+
+ protocol: text("protocol").notNull(),
+
+ // Live-session binding: TerminalSessionManager's session.id for SSH, or
+ // guacd's own guacamoleConnectionId for rdp/vnc/telnet. Neither is a DB
+ // row (process-local, in-memory) so this intentionally has no FK.
+ sessionId: text("session_id").notNull(),
+ tabInstanceId: text("tab_instance_id"),
+
+ shareType: text("share_type").notNull(), // "link" | "user"
+ targetUserId: text("target_user_id").references(() => users.id, {
+ onDelete: "cascade",
}),
+ linkToken: text("link_token").unique(),
- startedAt: text("started_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
- endedAt: text("ended_at"),
- duration: integer("duration"),
-
- commands: text("commands"),
- dangerousActions: text("dangerous_actions"),
-
- recordingPath: text("recording_path"),
- protocol: text("protocol").notNull().default("ssh"),
- format: text("format").notNull().default("text"),
-
- terminatedByOwner: integer("terminated_by_owner", { mode: "boolean" })
- .default(false),
- terminationReason: text("termination_reason"),
-});
-
-export const opksshTokens = sqliteTable("opkssh_tokens", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- hostId: integer("host_id")
- .notNull()
- .references(() => hosts.id, { onDelete: "cascade" }),
-
- sshCert: text("ssh_cert", { length: 8192 }).notNull(),
- privateKey: text("private_key", { length: 8192 }).notNull(),
-
- email: text("email"),
- sub: text("sub"),
- issuer: text("issuer"),
- audience: text("audience"),
+ permissionLevel: text("permission_level").notNull().default("read-only"),
createdAt: text("created_at")
.notNull()
.default(sql`CURRENT_TIMESTAMP`),
expiresAt: text("expires_at").notNull(),
- lastUsed: text("last_used"),
-});
+ revokedAt: text("revoked_at"),
+
+ lastJoinedAt: text("last_joined_at"),
+ joinCount: integer("join_count").notNull().default(0),
+ },
+ // Resolved from the live session on join, and listed per host.
+ (table) => [
+ index("idx_session_shares_session_id").on(table.sessionId),
+ index("idx_session_shares_host_id").on(table.hostId),
+ ],
+);
+
+export const sessionShareParticipants = sqliteTable(
+ "session_share_participants",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ shareId: text("share_id")
+ .notNull()
+ .references(() => sessionShares.id, { onDelete: "cascade" }),
+
+ userId: text("user_id").references(() => users.id, {
+ onDelete: "cascade",
+ }),
+ guestLabel: text("guest_label"),
+
+ joinedAt: text("joined_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ leftAt: text("left_at"),
+ },
+);
+
+export const opksshTokens = sqliteTable(
+ "opkssh_tokens",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+
+ sshCert: text("ssh_cert", { length: 8192 }).notNull(),
+ privateKey: text("private_key", { length: 8192 }).notNull(),
+
+ email: text("email"),
+ sub: text("sub"),
+ issuer: text("issuer"),
+ audience: text("audience"),
+
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ expiresAt: text("expires_at").notNull(),
+ lastUsed: text("last_used"),
+ },
+ // Declared inline in the production DDL as UNIQUE(...), but never here,
+ // so the generated Postgres and MySQL schemas allowed duplicates the
+ // SQLite deployment forbids โ and the upsert had nothing to conflict on.
+ (table) => [uniqueIndex("idx_opkssh_tokens_user_host").on(table.userId, table.hostId)],
+);
// Vault SSH signer profiles. These hold ONLY non-secret connection settings and
// are intended to be shared across users (shared === true makes a profile
@@ -724,6 +1033,7 @@ export const vaultProfiles = sqliteTable("vault_profiles", {
keyType: text("key_type"),
// When true the profile is visible/usable by all users on the server
shared: integer("shared", { mode: "boolean" }).notNull().default(false),
+ syncId: text("sync_id").unique(),
createdAt: text("created_at")
.notNull()
.default(sql`CURRENT_TIMESTAMP`),
@@ -735,56 +1045,73 @@ export const vaultProfiles = sqliteTable("vault_profiles", {
// Per-user cache of the ephemeral SSH private key + Vault-signed certificate.
// Transient: rows live only until the certificate expires. Secret fields are
// encrypted under the user's data-encryption key (see field-crypto.ts).
-export const vaultTokens = sqliteTable("vault_tokens", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- profileId: integer("profile_id")
- .notNull()
- .references(() => vaultProfiles.id, { onDelete: "cascade" }),
+export const vaultTokens = sqliteTable(
+ "vault_tokens",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ profileId: integer("profile_id")
+ .notNull()
+ .references(() => vaultProfiles.id, { onDelete: "cascade" }),
+
+ sshCert: text("ssh_cert", { length: 8192 }).notNull(),
+ privateKey: text("private_key", { length: 8192 }).notNull(),
+
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ expiresAt: text("expires_at").notNull(),
+ lastUsed: text("last_used"),
+ },
+ // Declared inline in the production DDL as UNIQUE(...), but never here,
+ // so the generated Postgres and MySQL schemas allowed duplicates the
+ // SQLite deployment forbids โ and the upsert had nothing to conflict on.
+ (table) => [uniqueIndex("idx_vault_tokens_user_profile").on(table.userId, table.profileId)],
+);
- sshCert: text("ssh_cert", { length: 8192 }).notNull(),
- privateKey: text("private_key", { length: 8192 }).notNull(),
+export const apiKeys = sqliteTable(
+ "api_keys",
+ {
+ id: text("id").primaryKey(),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: text("name").notNull(),
+ tokenHash: text("token_hash").notNull(),
+ tokenPrefix: text("token_prefix").notNull(),
+ createdAt: text("created_at").notNull().default(sql`CURRENT_TIMESTAMP`),
+ expiresAt: text("expires_at"),
+ lastUsedAt: text("last_used_at"),
+ isActive: integer("is_active", { mode: "boolean" }).notNull().default(true),
+ },
+ (table) => [index("idx_api_keys_user_id").on(table.userId)],
+);
- createdAt: text("created_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
- expiresAt: text("expires_at").notNull(),
- lastUsed: text("last_used"),
-});
-
-export const apiKeys = sqliteTable("api_keys", {
- id: text("id").primaryKey(),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- name: text("name").notNull(),
- tokenHash: text("token_hash").notNull(),
- tokenPrefix: text("token_prefix").notNull(),
- createdAt: text("created_at").notNull().default(sql`CURRENT_TIMESTAMP`),
- expiresAt: text("expires_at"),
- lastUsedAt: text("last_used_at"),
- isActive: integer("is_active", { mode: "boolean" }).notNull().default(true),
-});
-
-export const userOpenTabs = sqliteTable("user_open_tabs", {
- id: text("id").primaryKey(),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- tabType: text("tab_type").notNull(),
- hostId: integer("host_id").references(() => hosts.id, { onDelete: "cascade" }),
- label: text("label").notNull(),
- tabOrder: integer("tab_order").notNull().default(0),
- backendSessionId: text("backend_session_id"),
- createdAt: text("created_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
- updatedAt: text("updated_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+export const userOpenTabs = sqliteTable(
+ "user_open_tabs",
+ {
+ id: text("id").primaryKey(),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ tabType: text("tab_type").notNull(),
+ hostId: integer("host_id").references(() => hosts.id, {
+ onDelete: "cascade",
+ }),
+ label: text("label").notNull(),
+ tabOrder: integer("tab_order").notNull().default(0),
+ backendSessionId: text("backend_session_id"),
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [index("idx_user_open_tabs_user_id").on(table.userId)],
+);
export const userPreferences = sqliteTable("user_preferences", {
userId: text("user_id")
@@ -811,14 +1138,27 @@ export const userPreferences = sqliteTable("user_preferences", {
disableUpdateCheck: integer("disable_update_check", { mode: "boolean" }),
confirmTabClose: integer("confirm_tab_close", { mode: "boolean" }),
hiddenRailTabs: text("hidden_rail_tabs"),
+ // null means the user has not been asked yet; the assistant stays hidden
+ // until this is explicitly true and the admin global is on.
+ aiAssistantEnabled: integer("ai_assistant_enabled", { mode: "boolean" }),
+ // Opt-in to letting the assistant run allowlisted read-only diagnostics
+ // without a per-command approval click.
+ aiReadOnlyCommands: integer("ai_read_only_commands", { mode: "boolean" }),
compactHostView: integer("compact_host_view", { mode: "boolean" }),
statusColorScheme: text("status_color_scheme"),
+ customThemes: text("custom_themes"),
+ customKeybindings: text("custom_keybindings"),
+ terminalDefaults: text("terminal_defaults"),
+ rdpDefaults: text("rdp_defaults"),
+ terminalMacros: text("terminal_macros"),
updatedAt: text("updated_at")
.notNull()
.default(sql`CURRENT_TIMESTAMP`),
});
-export const hostMetricsPreferences = sqliteTable("host_metrics_preferences", {
+export const hostMetricsPreferences = sqliteTable(
+ "host_metrics_preferences",
+ {
id: integer("id").primaryKey({ autoIncrement: true }),
userId: text("user_id")
.notNull()
@@ -835,9 +1175,79 @@ export const hostMetricsPreferences = sqliteTable("host_metrics_preferences", {
updatedAt: text("updated_at")
.notNull()
.default(sql`CURRENT_TIMESTAMP`),
+ },
+ // One layout per user per host. Enforced in production since the inline DDL
+ // creates it, but it was never declared here, so the generated Postgres and
+ // MySQL schemas lacked it โ and the upsert has nothing to conflict on.
+ (table) => [
+ uniqueIndex("idx_host_metrics_prefs_user_host").on(table.userId, table.hostId),
+ ],
+);
+
+export const proxmoxStatsPreferences = sqliteTable(
+ "proxmox_stats_preferences",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id").notNull().references(() => users.id, { onDelete: "cascade" }),
+ hostId: integer("host_id").notNull().references(() => hosts.id, { onDelete: "cascade" }),
+ // JSON-encoded ProxmoxStatsLayout. Layout has no secrets, so it is stored as
+ // plain JSON (no field-level encryption), same convention as hostMetricsPreferences.layout.
+ layout: text("layout").notNull(),
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ uniqueIndex("idx_proxmox_stats_prefs_user_host").on(table.userId, table.hostId),
+ ],
+);
+
+export const hostSidebarPreferences = sqliteTable("host_sidebar_preferences", {
+ userId: text("user_id")
+ .primaryKey()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // JSON-encoded HostSidebarPreferences. No secrets in this blob, stored as
+ // plain JSON like hostMetricsPreferences.layout.
+ data: text("data").notNull(),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
});
-export const hostHealthChecks = sqliteTable("host_health_checks", {
+export const credentialSidebarPreferences = sqliteTable(
+ "credential_sidebar_preferences",
+ {
+ userId: text("user_id")
+ .primaryKey()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // JSON-encoded CredentialSidebarPreferences. No secrets in this blob,
+ // same convention as hostSidebarPreferences.data.
+ data: text("data").notNull(),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+);
+
+export const uiPreferences = sqliteTable("ui_preferences", {
+ userId: text("user_id")
+ .primaryKey()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // JSON-encoded UiPreferences (preset + per-area overrides + onboarding
+ // state). No secrets in this blob, same convention as
+ // hostSidebarPreferences.data.
+ data: text("data").notNull(),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+
+export const hostHealthChecks = sqliteTable(
+ "host_health_checks",
+ {
id: integer("id").primaryKey({ autoIncrement: true }),
userId: text("user_id")
.notNull()
@@ -854,7 +1264,12 @@ export const hostHealthChecks = sqliteTable("host_health_checks", {
updatedAt: text("updated_at")
.notNull()
.default(sql`CURRENT_TIMESTAMP`),
-});
+ },
+ // Same as above: one set of checks per user per host.
+ (table) => [
+ uniqueIndex("idx_host_health_checks_user_host").on(table.userId, table.hostId),
+ ],
+);
export const hostHealthHistory = sqliteTable("host_health_history", {
id: integer("id").primaryKey({ autoIncrement: true }),
@@ -879,9 +1294,13 @@ export const dashboardServiceLinks = sqliteTable("dashboard_service_links", {
label: text("label").notNull(),
url: text("url").notNull(),
order: integer("order").notNull().default(0),
+ syncId: text("sync_id").unique(),
createdAt: text("created_at")
.notNull()
.default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
});
// --- termix-id begin ---
@@ -991,6 +1410,23 @@ export const hostMetricsHistory = sqliteTable("host_metrics_history", {
});
// --- metrics-history end ---
+// --- proxmox-node-history begin ---
+export const proxmoxNodeHistory = sqliteTable("proxmox_node_history", {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ ts: text("ts")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ cpuPercent: real("cpu_percent"),
+ memPercent: real("mem_percent"),
+ diskPercent: real("disk_percent"),
+ netRxBytes: integer("net_rx_bytes"),
+ netTxBytes: integer("net_tx_bytes"),
+});
+// --- proxmox-node-history end ---
+
// --- alerts begin ---
export const alertRules = sqliteTable("alert_rules", {
id: integer("id").primaryKey({ autoIncrement: true }),
@@ -1036,44 +1472,218 @@ export const alertRuleChannels = sqliteTable("alert_rule_channels", {
.references(() => notificationChannels.id, { onDelete: "cascade" }),
});
-export const alertFirings = sqliteTable("alert_firings", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- ruleId: integer("rule_id")
- .notNull()
- .references(() => alertRules.id, { onDelete: "cascade" }),
- hostId: integer("host_id").notNull(),
- hostName: text("host_name").notNull(),
- firedAt: text("fired_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
- resolvedAt: text("resolved_at"),
- value: real("value"),
- message: text("message").notNull(),
- severity: text("severity").notNull().default("warning"),
- acknowledged: integer("acknowledged", { mode: "boolean" }).notNull().default(false),
-});
+export const alertFirings = sqliteTable(
+ "alert_firings",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ ruleId: integer("rule_id")
+ .notNull()
+ .references(() => alertRules.id, { onDelete: "cascade" }),
+ hostId: integer("host_id").notNull(),
+ hostName: text("host_name").notNull(),
+ firedAt: text("fired_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ resolvedAt: text("resolved_at"),
+ value: real("value"),
+ message: text("message").notNull(),
+ severity: text("severity").notNull().default("warning"),
+ acknowledged: integer("acknowledged", { mode: "boolean" })
+ .notNull()
+ .default(false),
+ },
+ // A rule's history is read newest-first; host_id is filtered on its own.
+ (table) => [
+ index("idx_alert_firings_rule").on(table.ruleId, table.firedAt),
+ index("idx_alert_firings_host").on(table.hostId),
+ ],
+);
// --- alerts end ---
+// --- automations begin ---
+export const automations = sqliteTable(
+ "automations",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: text("name").notNull(),
+ description: text("description"),
+ enabled: integer("enabled", { mode: "boolean" }).notNull().default(true),
+ // The whole trigger + steps graph, shaped by AutomationDefinition. Read and
+ // written as a unit, never queried by its inner structure.
+ definition: text("definition").notNull(),
+ definitionVersion: integer("definition_version").notNull().default(1),
+ concurrencyPolicy: text("concurrency_policy").notNull().default("skip"),
+ maxRunSeconds: integer("max_run_seconds").notNull().default(300),
+ dryRun: integer("dry_run", { mode: "boolean" }).notNull().default(false),
+ lastRunAt: text("last_run_at"),
+ lastRunStatus: text("last_run_status"),
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // The scheduler sweeps enabled automations for one user at a time.
+ (table) => [index("idx_automations_user").on(table.userId, table.enabled)],
+);
+
+/**
+ * Durable per-target trigger state. state_key scopes a trigger to what it is
+ * actually watching ("", ":/data", ":"), so
+ * a sustained-breach window can track one filesystem rather than a whole host.
+ * Living in the database rather than memory means cooldowns and dwell windows
+ * survive a restart.
+ */
+export const automationTriggerState = sqliteTable(
+ "automation_trigger_state",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ automationId: integer("automation_id")
+ .notNull()
+ .references(() => automations.id, { onDelete: "cascade" }),
+ stateKey: text("state_key").notNull(),
+ breachStartedAt: text("breach_started_at"),
+ lastFiredAt: text("last_fired_at"),
+ lastValue: real("last_value"),
+ lastObservedState: text("last_observed_state"),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ uniqueIndex("idx_automation_trigger_state_key").on(
+ table.automationId,
+ table.stateKey,
+ ),
+ ],
+);
+
+export const automationSchedules = sqliteTable(
+ "automation_schedules",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ automationId: integer("automation_id")
+ .notNull()
+ .references(() => automations.id, { onDelete: "cascade" }),
+ cron: text("cron"),
+ intervalSeconds: integer("interval_seconds"),
+ timezone: text("timezone"),
+ nextDueAt: text("next_due_at"),
+ lastTickAt: text("last_tick_at"),
+ },
+ (table) => [
+ uniqueIndex("idx_automation_schedules_automation").on(table.automationId),
+ index("idx_automation_schedules_due").on(table.nextDueAt),
+ ],
+);
+
+export const automationRuns = sqliteTable(
+ "automation_runs",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ automationId: integer("automation_id")
+ .notNull()
+ .references(() => automations.id, { onDelete: "cascade" }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ triggerType: text("trigger_type").notNull(),
+ triggerContext: text("trigger_context"),
+ status: text("status").notNull(),
+ startedAt: text("started_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ finishedAt: text("finished_at"),
+ durationMs: integer("duration_ms"),
+ error: text("error"),
+ dryRun: integer("dry_run", { mode: "boolean" }).notNull().default(false),
+ // Set when one automation invoked another, so a chain can be traced.
+ parentRunId: integer("parent_run_id"),
+ },
+ (table) => [
+ index("idx_automation_runs_automation").on(
+ table.automationId,
+ table.startedAt,
+ ),
+ index("idx_automation_runs_user").on(table.userId, table.startedAt),
+ ],
+);
+
+export const automationRunSteps = sqliteTable(
+ "automation_run_steps",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ runId: integer("run_id")
+ .notNull()
+ .references(() => automationRuns.id, { onDelete: "cascade" }),
+ stepIndex: integer("step_index").notNull(),
+ stepId: text("step_id").notNull(),
+ stepType: text("step_type").notNull(),
+ status: text("status").notNull(),
+ startedAt: text("started_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ finishedAt: text("finished_at"),
+ output: text("output"),
+ error: text("error"),
+ truncated: integer("truncated", { mode: "boolean" })
+ .notNull()
+ .default(false),
+ },
+ (table) => [
+ index("idx_automation_run_steps_run").on(table.runId, table.stepIndex),
+ ],
+);
+
+export const automationChannels = sqliteTable(
+ "automation_channels",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ automationId: integer("automation_id")
+ .notNull()
+ .references(() => automations.id, { onDelete: "cascade" }),
+ channelId: integer("channel_id")
+ .notNull()
+ .references(() => notificationChannels.id, { onDelete: "cascade" }),
+ },
+ (table) => [
+ uniqueIndex("idx_automation_channels_pair").on(
+ table.automationId,
+ table.channelId,
+ ),
+ ],
+);
+// --- automations end ---
+
// --- homepage begin ---
-export const homepageItems = sqliteTable("homepage_items", {
- id: integer("id").primaryKey({ autoIncrement: true }),
- userId: text("user_id")
- .notNull()
- .references(() => users.id, { onDelete: "cascade" }),
- typeId: text("type_id").notNull(),
- title: text("title"),
- config: text("config").notNull().default("{}"),
- folderId: integer("folder_id"),
- createdAt: text("created_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
- updatedAt: text("updated_at")
- .notNull()
- .default(sql`CURRENT_TIMESTAMP`),
-});
+export const homepageItems = sqliteTable(
+ "homepage_items",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ typeId: text("type_id").notNull(),
+ title: text("title"),
+ config: text("config").notNull().default("{}"),
+ folderId: integer("folder_id"),
+ syncId: text("sync_id").unique(),
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [index("idx_homepage_items_user_id").on(table.userId)],
+);
export const homepageLayouts = sqliteTable("homepage_layouts", {
id: integer("id").primaryKey({ autoIncrement: true }),
@@ -1088,3 +1698,241 @@ export const homepageLayouts = sqliteTable("homepage_layouts", {
.default(sql`CURRENT_TIMESTAMP`),
});
// --- homepage end ---
+
+// --- fleets begin ---
+export const fleets = sqliteTable("fleets", {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: text("name").notNull(),
+ description: text("description"),
+ color: text("color"),
+ icon: text("icon"),
+ // JSON array of { tag: string } rules, unioned with static fleetMembers at
+ // resolution time. Kept to tag-equality matching for v1.
+ tagRules: text("tag_rules"),
+ syncId: text("sync_id").unique(),
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+
+export const fleetMembers = sqliteTable(
+ "fleet_members",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ fleetId: integer("fleet_id")
+ .notNull()
+ .references(() => fleets.id, { onDelete: "cascade" }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ addedAt: text("added_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // fleet_id leads the unique pair, so listing a fleet's hosts is already
+ // served. Finding the fleets a host belongs to starts from host_id.
+ (table) => [
+ uniqueIndex("idx_fleet_members_fleet_host").on(table.fleetId, table.hostId),
+ index("idx_fleet_members_host").on(table.hostId),
+ ],
+);
+
+// Latest-only inventory snapshot per host, overwritten on each refresh - no
+// historical log, matching the "latest snapshot only" scope decision.
+export const fleetInventory = sqliteTable(
+ "fleet_inventory",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ hostId: integer("host_id")
+ .notNull()
+ .references(() => hosts.id, { onDelete: "cascade" }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ osPrettyName: text("os_pretty_name"),
+ kernel: text("kernel"),
+ architecture: text("architecture"),
+ hostname: text("hostname"),
+ uptimeSeconds: integer("uptime_seconds"),
+ ip: text("ip"),
+ packageManager: text("package_manager"),
+ collectedAt: text("collected_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ // host_id leads the unique pair; a user's whole inventory is read by user_id.
+ (table) => [
+ uniqueIndex("idx_fleet_inventory_host").on(table.hostId, table.userId),
+ index("idx_fleet_inventory_user").on(table.userId),
+ ],
+);
+// --- fleets end ---
+
+// --- workspaces begin ---
+export const userWorkspaces = sqliteTable(
+ "user_workspaces",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ name: text("name").notNull(),
+ color: text("color"),
+ icon: text("icon"),
+ // "manual" | "last_session" - exactly one last_session row per user.
+ kind: text("kind").notNull().default("manual"),
+ isDefault: integer("is_default", { mode: "boolean" })
+ .notNull()
+ .default(false),
+ // JSON-encoded WorkspacePayload: tabs, splitMode, paneTabIds, rowSizes, rowColSizes
+ payload: text("payload").notNull().default("{}"),
+ syncId: text("sync_id").unique(),
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ lastUsedAt: text("last_used_at"),
+ },
+ (table) => [index("idx_user_workspaces_user_id").on(table.userId)],
+);
+// --- workspaces end ---
+
+// --- sync begin ---
+// Records a delete for a synced entity type so the other side of a sync
+// pair (embedded desktop backend <-> connected remote server) learns about
+// the deletion instead of re-creating the row on its next pull.
+export const syncTombstones = sqliteTable("sync_tombstones", {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ entityType: text("entity_type").notNull(),
+ syncId: text("sync_id").notNull(),
+ deletedAt: text("deleted_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+});
+// --- sync end ---
+
+// --- ai begin ---
+/**
+ * A user's connection to one AI provider. api_key is encrypted at rest via
+ * FieldCrypto; it is never returned to the frontend, which only ever sees
+ * api_key_prefix for display.
+ */
+export const aiProviders = sqliteTable(
+ "ai_providers",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // ollama | anthropic | openai | gemini | openai_compatible
+ providerType: text("provider_type").notNull(),
+ label: text("label").notNull(),
+ // Required for ollama and openai_compatible, optional elsewhere.
+ baseUrl: text("base_url"),
+ apiKey: text("api_key", { length: 8192 }),
+ // First few characters, kept in the clear so the UI can identify a key.
+ apiKeyPrefix: text("api_key_prefix"),
+ defaultModel: text("default_model"),
+ enabled: integer("enabled", { mode: "boolean" }).notNull().default(true),
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ uniqueIndex("idx_ai_providers_user_label").on(table.userId, table.label),
+ ],
+);
+
+export const aiConversations = sqliteTable(
+ "ai_conversations",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ title: text("title"),
+ providerId: integer("provider_id"),
+ model: text("model"),
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ updatedAt: text("updated_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ index("idx_ai_conversations_user").on(table.userId, table.updatedAt),
+ ],
+);
+
+export const aiMessages = sqliteTable(
+ "ai_messages",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ conversationId: integer("conversation_id")
+ .notNull()
+ .references(() => aiConversations.id, { onDelete: "cascade" }),
+ // user | assistant | tool
+ role: text("role").notNull(),
+ content: text("content").notNull().default(""),
+ // Serialized tool calls and their results for this turn.
+ toolCalls: text("tool_calls"),
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ index("idx_ai_messages_conversation").on(
+ table.conversationId,
+ table.createdAt,
+ ),
+ ],
+);
+
+/**
+ * A change the assistant wants to make. Nothing here has been applied: the
+ * payload is re-validated against the tool schema at apply time and only then
+ * dispatched through the same repository logic a human action uses.
+ */
+export const aiProposals = sqliteTable(
+ "ai_proposals",
+ {
+ id: integer("id").primaryKey({ autoIncrement: true }),
+ conversationId: integer("conversation_id")
+ .notNull()
+ .references(() => aiConversations.id, { onDelete: "cascade" }),
+ userId: text("user_id")
+ .notNull()
+ .references(() => users.id, { onDelete: "cascade" }),
+ // The propose_* tool name that produced this.
+ kind: text("kind").notNull(),
+ summary: text("summary"),
+ payload: text("payload").notNull().default("{}"),
+ // pending | applied | rejected | expired
+ status: text("status").notNull().default("pending"),
+ appliedAt: text("applied_at"),
+ resultSummary: text("result_summary"),
+ createdAt: text("created_at")
+ .notNull()
+ .default(sql`CURRENT_TIMESTAMP`),
+ },
+ (table) => [
+ index("idx_ai_proposals_user").on(table.userId, table.status),
+ index("idx_ai_proposals_conversation").on(table.conversationId),
+ ],
+);
+// --- ai end ---
diff --git a/src/backend/database/repositories/ai-repository.ts b/src/backend/database/repositories/ai-repository.ts
new file mode 100644
index 0000000..cf313f7
--- /dev/null
+++ b/src/backend/database/repositories/ai-repository.ts
@@ -0,0 +1,407 @@
+import { and, desc, eq } from "drizzle-orm";
+import {
+ aiConversations,
+ aiMessages,
+ aiProposals,
+ aiProviders,
+} from "../db/schema.js";
+import { DataCrypto } from "../../utils/data-crypto.js";
+import type { DatabaseContext } from "./database-context.js";
+import { rowsAffected } from "./mutation-result.js";
+import { insertReturning } from "./returning.js";
+import { formatSqlTimestamp } from "./sql-timestamp.js";
+
+const now = (): string => formatSqlTimestamp(new Date());
+
+export type AiProviderRecord = typeof aiProviders.$inferSelect;
+export type AiConversationRecord = typeof aiConversations.$inferSelect;
+export type AiMessageRecord = typeof aiMessages.$inferSelect;
+export type AiProposalRecord = typeof aiProposals.$inferSelect;
+
+export interface AiProviderInput {
+ userId: string;
+ providerType: string;
+ label: string;
+ baseUrl?: string | null;
+ apiKey?: string | null;
+ defaultModel?: string | null;
+ enabled?: boolean;
+}
+
+/**
+ * Keeps the first few characters so the UI can tell two keys apart without
+ * ever receiving the key itself.
+ */
+export function apiKeyPrefix(apiKey: string | null | undefined): string | null {
+ if (!apiKey) return null;
+ return apiKey.slice(0, 6);
+}
+
+export class AiRepository {
+ constructor(
+ private readonly context: DatabaseContext,
+ private readonly onWrite?: () => void | Promise,
+ ) {}
+
+ /**
+ * Provider API keys are field-encrypted like any other credential. The key is
+ * derived from the row id, which does not exist until after the insert, so a
+ * new provider is written once and then re-encrypted in place with its real
+ * id -- the same approach AlertRepository uses for channel configs.
+ */
+ private userDataKey(userId: string): Buffer | null {
+ try {
+ return DataCrypto.getUserDataKey(userId);
+ } catch {
+ // Crypto is not initialized (tests, early boot); leave the value as is.
+ return null;
+ }
+ }
+
+ private encryptApiKey(
+ apiKey: string,
+ userId: string,
+ recordId: number | string,
+ ): string {
+ const userDataKey = this.userDataKey(userId);
+ if (!userDataKey) return apiKey;
+ return DataCrypto.encryptRecord(
+ "ai_providers",
+ { id: recordId, apiKey },
+ userId,
+ userDataKey,
+ ).apiKey;
+ }
+
+ private decryptApiKey(
+ apiKey: string,
+ userId: string,
+ recordId: number | string,
+ ): string {
+ const userDataKey = this.userDataKey(userId);
+ if (!userDataKey) return apiKey;
+ try {
+ return DataCrypto.decryptRecord(
+ "ai_providers",
+ { id: recordId, apiKey },
+ userId,
+ userDataKey,
+ ).apiKey;
+ } catch {
+ // Rows written before encryption was enabled are still plaintext.
+ return apiKey;
+ }
+ }
+
+ // --- providers ---
+
+ /** Never includes the key material; callers get the masked prefix only. */
+ async listProviders(userId: string): Promise {
+ const rows = await this.context.drizzle
+ .select()
+ .from(aiProviders)
+ .where(eq(aiProviders.userId, userId))
+ .orderBy(aiProviders.id);
+
+ return rows.map((row) => ({ ...row, apiKey: null }));
+ }
+
+ async findProvider(
+ id: number,
+ userId: string,
+ ): Promise {
+ const rows = await this.context.drizzle
+ .select()
+ .from(aiProviders)
+ .where(and(eq(aiProviders.id, id), eq(aiProviders.userId, userId)))
+ .limit(1);
+
+ if (!rows[0]) return null;
+ return { ...rows[0], apiKey: null };
+ }
+
+ /**
+ * The one path that returns usable key material. Only the provider adapters
+ * call this, immediately before an outbound request.
+ */
+ async findProviderWithSecret(
+ id: number,
+ userId: string,
+ ): Promise {
+ const rows = await this.context.drizzle
+ .select()
+ .from(aiProviders)
+ .where(and(eq(aiProviders.id, id), eq(aiProviders.userId, userId)))
+ .limit(1);
+
+ const row = rows[0];
+ if (!row) return null;
+ if (!row.apiKey) return row;
+ return {
+ ...row,
+ apiKey: this.decryptApiKey(row.apiKey, userId, row.id),
+ };
+ }
+
+ async createProvider(input: AiProviderInput): Promise {
+ const [created] = await insertReturning(this.context, aiProviders, {
+ userId: input.userId,
+ providerType: input.providerType,
+ label: input.label,
+ baseUrl: input.baseUrl ?? null,
+ apiKey: input.apiKey ?? null,
+ apiKeyPrefix: apiKeyPrefix(input.apiKey),
+ defaultModel: input.defaultModel ?? null,
+ enabled: input.enabled ?? true,
+ });
+
+ if (input.apiKey) {
+ const encrypted = this.encryptApiKey(
+ input.apiKey,
+ input.userId,
+ created.id,
+ );
+ if (encrypted !== input.apiKey) {
+ await this.context.drizzle
+ .update(aiProviders)
+ .set({ apiKey: encrypted })
+ .where(eq(aiProviders.id, created.id));
+ }
+ }
+
+ await this.afterWrite();
+ return { ...created, apiKey: null };
+ }
+
+ async updateProvider(
+ id: number,
+ userId: string,
+ input: Partial>,
+ ): Promise {
+ const existing = await this.findProvider(id, userId);
+ if (!existing) return null;
+
+ const updates: Record = { updatedAt: now() };
+ if (input.providerType !== undefined)
+ updates.providerType = input.providerType;
+ if (input.label !== undefined) updates.label = input.label;
+ if (input.baseUrl !== undefined) updates.baseUrl = input.baseUrl;
+ if (input.defaultModel !== undefined)
+ updates.defaultModel = input.defaultModel;
+ if (input.enabled !== undefined) updates.enabled = input.enabled;
+
+ // An empty string clears the key; undefined leaves it untouched.
+ if (input.apiKey !== undefined) {
+ if (input.apiKey) {
+ updates.apiKey = this.encryptApiKey(input.apiKey, userId, id);
+ updates.apiKeyPrefix = apiKeyPrefix(input.apiKey);
+ } else {
+ updates.apiKey = null;
+ updates.apiKeyPrefix = null;
+ }
+ }
+
+ await this.context.drizzle
+ .update(aiProviders)
+ .set(updates)
+ .where(and(eq(aiProviders.id, id), eq(aiProviders.userId, userId)));
+
+ await this.afterWrite();
+ return this.findProvider(id, userId);
+ }
+
+ async deleteProvider(id: number, userId: string): Promise {
+ const result = await this.context.drizzle
+ .delete(aiProviders)
+ .where(and(eq(aiProviders.id, id), eq(aiProviders.userId, userId)));
+
+ const deleted = rowsAffected(result) > 0;
+ if (deleted) await this.afterWrite();
+ return deleted;
+ }
+
+ // --- conversations ---
+
+ async listConversations(
+ userId: string,
+ limit = 50,
+ ): Promise {
+ return this.context.drizzle
+ .select()
+ .from(aiConversations)
+ .where(eq(aiConversations.userId, userId))
+ .orderBy(desc(aiConversations.updatedAt))
+ .limit(limit);
+ }
+
+ async findConversation(
+ id: number,
+ userId: string,
+ ): Promise {
+ const rows = await this.context.drizzle
+ .select()
+ .from(aiConversations)
+ .where(
+ and(eq(aiConversations.id, id), eq(aiConversations.userId, userId)),
+ )
+ .limit(1);
+ return rows[0] ?? null;
+ }
+
+ async createConversation(input: {
+ userId: string;
+ title?: string | null;
+ providerId?: number | null;
+ model?: string | null;
+ }): Promise {
+ const [created] = await insertReturning(this.context, aiConversations, {
+ userId: input.userId,
+ title: input.title ?? null,
+ providerId: input.providerId ?? null,
+ model: input.model ?? null,
+ });
+ await this.afterWrite();
+ return created;
+ }
+
+ async touchConversation(id: number, title?: string | null): Promise {
+ const updates: Record = { updatedAt: now() };
+ if (title) updates.title = title;
+ await this.context.drizzle
+ .update(aiConversations)
+ .set(updates)
+ .where(eq(aiConversations.id, id));
+ await this.afterWrite();
+ }
+
+ async deleteConversation(id: number, userId: string): Promise {
+ const result = await this.context.drizzle
+ .delete(aiConversations)
+ .where(
+ and(eq(aiConversations.id, id), eq(aiConversations.userId, userId)),
+ );
+ const deleted = rowsAffected(result) > 0;
+ if (deleted) await this.afterWrite();
+ return deleted;
+ }
+
+ // --- messages ---
+
+ async listMessages(conversationId: number): Promise {
+ return this.context.drizzle
+ .select()
+ .from(aiMessages)
+ .where(eq(aiMessages.conversationId, conversationId))
+ .orderBy(aiMessages.id);
+ }
+
+ async appendMessage(input: {
+ conversationId: number;
+ role: string;
+ content: string;
+ toolCalls?: string | null;
+ }): Promise {
+ const [created] = await insertReturning(this.context, aiMessages, {
+ conversationId: input.conversationId,
+ role: input.role,
+ content: input.content,
+ toolCalls: input.toolCalls ?? null,
+ });
+ await this.afterWrite();
+ return created;
+ }
+
+ // --- proposals ---
+
+ async listProposals(
+ userId: string,
+ conversationId?: number,
+ ): Promise