mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 14:15:24 +00:00
* fix: keep concurrent ssh pool connects from overwriting each other (#1619) * fix: stop auto-accepting changed jump host keys (#1620) A jump hop whose key no longer matched the pinned fingerprint was silently accepted and the pin overwritten. Background status probes reconnect to jump hosts every cycle, so a MITM on that hop got the credentials with no user interaction. Changed jump host keys now go through the same path as any other host: prompt when there is a terminal socket, otherwise refuse. * fix(electron): validate external login URL scheme and callback port (#1621) * fix(plugins): read artifact manifest with the same tar parser as the unpack (#1622) The consent check read the first manifest.json with a hand-written tar reader, while the unpack keeps the last one and also follows pax and long-name headers. An archive with two manifests could pass the check with one capability list and get granted another. Read the manifest with node-tar, count only plain files, and refuse archives that hold more than one manifest.json. * fix: only trust the server's origin in the desktop login frame (#1624) The desktop sign-in iframe accepted AUTH_SUCCESS and system browser requests from whatever page it had navigated to, and posted replies (including 2FA temp tokens) to any origin. Messages must now come from the server's origin and replies are posted to it. The web UI also treated any framing page as the desktop app and posted the JWT to it. It now also requires the Termix-Desktop user agent. * fix: check trusted proxy login against nginx's peer, not nginx (#1625) The backend only sees the bundled nginx on loopback, so the allowlist could only work by trusting 127.0.0.1, which let any client that reached nginx log in as anyone by sending the identity headers. nginx now passes its own TCP peer (before real_ip rewriting) in X-Termix-Proxy-Peer, and loopback connections are judged by that address instead. * fix: keep foreign keys on during user data import (#1626) Import credentials before hosts and remap the file's credential ids to the ones created here, so hosts and protocol logins no longer point at another server's ids. With rows written in dependency order, the import no longer turns off SQLite foreign keys on the shared connection. The uploaded file is now removed on every exit path. * fix: enforce unique usernames (#1628) * fix: enforce unique usernames Registration checked for a taken name, hashed the password, then inserted, with nothing in the schema enforcing uniqueness. Concurrent sign-ups could create two accounts with one name, after which login, password reset, proxy login and admin lookups by username picked between them arbitrarily. Add a unique index on users.username for every dialect. Existing duplicates are renamed (later rows get a -<id> suffix, the oldest keeps the name) rather than deleted. Registration and admin user creation now return the same 409 when the insert loses the race. * fix: avoid username collisions during migration * fix: don't auto-enable synced plugins signed only by a server-sent key (#1623) * fix: don't auto-enable synced plugins signed only by a server-sent key Registry keys a linked server sends still let its plugins load on the desktop, but no longer count as a signer for switching them on or copying their grants. Keys the desktop added itself keep their trust. * fix: enforce local plugin trust across remote source labels * fix: require positive local trust for synced plugin keys * fix(desktop): harden external editor and session cookie IPC (#1627) * fix(desktop): stop the renderer choosing the external editor binary or reading the session cookie open-external-editor now launches only the editor saved from a file dialog and refuses to hand executable file types to the OS opener. The unused get-session-cookie and wait-session-cookie channels, which returned the httpOnly jwt, are removed. * fix: validate setting keys before editor authorization * fix(sidebar): sort hosts by IP address numerically (#1629) * fix(desktop): find spawn-helper in universal macOS builds (#1630) The universal build ships app-arm64.asar and app-x64.asar instead of app.asar, so node-pty's helper path rewrite never pointed at the unpacked copy and every local terminal failed with posix_spawnp failed. * fix(sync): send shared hosts with text columns in their stored form (#1631) resolveHostById turns forceKeyboardInteractive into a boolean, and the shared-host export passed it on as is. A desktop could not bind the boolean into the text column, so every shared host failed to apply. * fix: drop ssh_data.vault_profile_id so removing the vault plugin keeps hosts writable (#1633) The vault plugin renames vault_profiles to p_vault_profiles, and SQLite rewrites ssh_data's foreign key to follow it. Uninstalling the plugin then dropped p_vault_profiles and left ssh_data pointing at a missing table, so creating, cloning and deleting hosts failed with "no such table: main.p_vault_profiles". Postgres and MySQL refused the uninstall instead. The column was already copied into the vault plugin's host settings by 2.9, so retire it on every engine. The SQLite boot drop also repairs databases already in the broken state; MySQL drops the column's foreign key first. * fix(sync): let a linked desktop enable mirrored plugins it does not trust on its own (#1632) * fix(sync): let a linked desktop enable mirrored plugins it does not trust on its own * fix(sync): switch off an untrusted mirrored plugin when the server updates it * fix: require local consent for mirrored plugin activation * docs: describe consent fields on the plugin state endpoint * fix(i18n): keep Indonesian technical terms consistent (#1636) Use the English terms Indonesian users know for tunnel, snippet, deploy, file manager, remote desktop, jump host, passphrase, sidebar, toolbar, endpoint, browser and SSH agent, instead of mixing literal translations (terowongan, cuplikan, terapkan, bilah sisi, titik akhir, ...) with the English words. Match the split shortcuts to the split screen menu. Also fix the user data export description, which said secrets are encrypted while the English says they are decrypted. * fix(settings): leave user manage view when switching admin sections (#1649) The admin panel stays mounted across Settings pages, so an open user manage view kept replacing every other admin section until Back to users was clicked. Reset it whenever the selected section changes. * fix(sync): don't delete a local row when the server can't send its copy (#1650) * fix(sync): don't delete a local row when the server can't send its copy A push conflict on a live record whose server row failed to serialize came back as row: null, deleted: false, and the desktop treated that as a delete. The server now rejects that op as unavailable, the desktop never deletes on a conflict without a row, and serialization failures are logged. * fix(sync): retry temporarily unavailable records * fix: smooth host editor jumps to lower sections * chore: add changelog entries for 26.10.2 fixes * fix: stop building ssh2 native crypto in the docker image (#1644) * chore: test that an update keeps a changed auth type (#1601) * feat: option to hide the sidebar after opening a host (#1652) * feat: sort the dashboard host status card (Plugin-Host-Metrics#6) * fix: let the hover side menu overlay content instead of resizing it (Plugin-Remote-Desktop#2) * fix: say the server is down and keep retrying instead of a database error (#1637) * fix: show why a client tunnel failed to start (Plugin-Tunnels#2) * fix(sdk): skip comment-only chunks when splitting migrations * feat: setting to let the hover side menu push content again * fix: use the vite proxy for plugin sockets on any dev port * feat(sdk): let a plugin raise its public route rate limit * chore: update translations * chore: add the overview video to the readme * chore: update the overview video and add a play button to its thumbnail * feat: plugin builds bundle worker entries and import wasm and fonts as bytes * feat: plugin packs include LICENSE and NOTICE * chore: drop guacd from compose files and dev runner * chore: update remote desktop origin comment for the built-in engine * fix: show plugin names and descriptions in the UI language (#1658) * fix: show plugin names and descriptions in the UI language Read plugin.name and plugin.description from each plugin's own locale namespace, falling back to the manifest, everywhere core shows a plugin's name: the Plugins manager, onboarding picker, host editor tabs and sections, host filters and bulk actions, beta updates, interface presets and plugin crash/loading notices. * docs(sdk): document plugin.name and plugin.description locale keys --------- Co-authored-by: ZacharyZcR <zkl205305@gmail.com> * fix(hosts): reject or infer a missing authType on host create (#1664) Creating an SSH host through the API without authType hit the NOT NULL auth_type column and came back as a 500. The create route now infers the type from the credential, key or password in the body, falls back to the host defaults, and otherwise answers 400. A non-string authType is a 400 on create and update. * chore: changelog for merged plugin name and host auth type PRs * fix: move macOS split pane navigation to Cmd+Option+Arrow * fix: pick a free port for the desktop backend when 30001 is taken (#1663) * feat: build the Windows desktop app for ARM64 (#1615) * fix(sync): keep the changes cursor within the 32-bit seq column (#1665) The desktop learned the server's entity types by asking for changes after Number.MAX_SAFE_INTEGER. sync_records.seq is a 32-bit integer on Postgres, which rejects that bound value, so every pass needing the probe failed with 22003 out of range. The server now clamps the cursor to the largest seq the column holds and answers 400 for a cursor or limit that is not a non-negative integer. The desktop asks for a one-row page from its saved cursor instead. * fix(audit): coalesce identical plugin routine audits so they cannot flush the log (#1667) Successful plugin_as_user and plugin_service_* entries written by a plugin with the same user, action, resource and details are recorded once per 10 minutes. Failures and every other action are still written each time. * feat(plugins): publish host.created when a host is added (#1668) Plugins that keep an inventory of hosts had no way to hear about a new one short of polling. Core now publishes host.created with the same { hostId, userId } payload as host.updated wherever a host row is created: the host create route, ctx.hosts.create, JSON and SSH config bulk import, database file import, and sync writing a host it did not have yet. * fix: show the login for signed-out full-screen view links and return to them (#1669) A ?view= link opened without a session spun forever: the gate rendered the bare view when the session check failed, so the plugin runtime never started and the view never registered. A regular browser now keeps the link in sessionStorage, shows the normal login and opens the link again after any login, including redirect logins. Only same-origin paths with a view are restored. The desktop app, embedded sign-in frames and guest views keep their current behavior. * fix(desktop): apply linked server proxy headers and certificate exception to WebSockets (#1670) * fix(desktop): send linked server proxy headers on WebSocket upgrades isLinkedOrigin compared the request origin with the link's http(s) origin, so the terminal WebSocket (wss://host/...) never matched and its upgrade went out without the proxy headers and basic auth. Behind a forward-auth proxy that upgrade was redirected to the login and the terminal closed with "connection closed unexpectedly". ws and wss now count as http and https for the comparison, the same mapping the WebSocket handshake itself uses, with host and port still matched exactly. * fix(desktop): allow a linked server's self-signed certificate for its WebSockets isInvalidCertificateAllowedForUrl compared the URL with a local getOrigin copy, so wss://host never matched the link's https://host origin and an allowed self-signed certificate did not cover the terminal and tunnel sockets. It now uses linkedServer.isLinkedOrigin, which maps ws and wss the same way as the proxy headers, and the local copy is removed. * feat(sdk): let plugins mint a short-lived user session and read a user's locale (#1666) ctx.auth.issueUserToken(userId, { purpose, ttlSeconds }) gives background work a session for calling Termix's own API as an existing user. It needs users:impersonate, defaults to 300s and is capped at 900s, is stored as a normal session row marked as plugin-issued, and every issue is audited. Such sessions are refused on routes that change the user's password, second factors, API keys or linked logins. ctx.users.getLocale(userId) reads the user's UI language under users:read. SDK 1.0.11, plugin API 1.3.0. * chore: changelog for merged sync, audit, event and desktop PRs * feat: add shell.rightEdge slot so plugin panels can push the page over * chore: pin bundled plugins to the latest releases * chore: lint, format, and bump version to 26.10.2 --------- Co-authored-by: ZacharyZcR <zacharyzcr1984@gmail.com> Co-authored-by: Ferdina Kusumah <19812460+FerdinaKusumah@users.noreply.github.com> Co-authored-by: ZacharyZcR <zkl205305@gmail.com> Co-authored-by: Lukas <80832688+0skater0@users.noreply.github.com>
4779 lines
123 KiB
JSON
4779 lines
123 KiB
JSON
{
|
|
"id": "788b2d3a-f430-4726-b4ea-4958e1ed5d24",
|
|
"prevId": "75755c44-75cb-4871-b998-de818b8dbc96",
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"tables": {
|
|
"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": "text",
|
|
"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": {
|
|
"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.credential_access": {
|
|
"name": "credential_access",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"credential_id": {
|
|
"name": "credential_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": "'use'"
|
|
},
|
|
"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": {
|
|
"idx_credential_access_user_id": {
|
|
"name": "idx_credential_access_user_id",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_credential_access_role_id": {
|
|
"name": "idx_credential_access_role_id",
|
|
"columns": [
|
|
{
|
|
"expression": "role_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_credential_access_credential_id": {
|
|
"name": "idx_credential_access_credential_id",
|
|
"columns": [
|
|
{
|
|
"expression": "credential_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"credential_access_credential_id_ssh_credentials_id_fk": {
|
|
"name": "credential_access_credential_id_ssh_credentials_id_fk",
|
|
"tableFrom": "credential_access",
|
|
"tableTo": "ssh_credentials",
|
|
"columnsFrom": [
|
|
"credential_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"credential_access_user_id_users_id_fk": {
|
|
"name": "credential_access_user_id_users_id_fk",
|
|
"tableFrom": "credential_access",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"credential_access_role_id_roles_id_fk": {
|
|
"name": "credential_access_role_id_roles_id_fk",
|
|
"tableFrom": "credential_access",
|
|
"tableTo": "roles",
|
|
"columnsFrom": [
|
|
"role_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"credential_access_granted_by_users_id_fk": {
|
|
"name": "credential_access_granted_by_users_id_fk",
|
|
"tableFrom": "credential_access",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"granted_by"
|
|
],
|
|
"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.folder_access": {
|
|
"name": "folder_access",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"owner_user_id": {
|
|
"name": "owner_user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"folder": {
|
|
"name": "folder",
|
|
"type": "varchar(255)",
|
|
"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"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_folder_access_owner_folder": {
|
|
"name": "idx_folder_access_owner_folder",
|
|
"columns": [
|
|
{
|
|
"expression": "owner_user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "folder",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"folder_access_owner_user_id_users_id_fk": {
|
|
"name": "folder_access_owner_user_id_users_id_fk",
|
|
"tableFrom": "folder_access",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"owner_user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"folder_access_user_id_users_id_fk": {
|
|
"name": "folder_access_user_id_users_id_fk",
|
|
"tableFrom": "folder_access",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"folder_access_role_id_roles_id_fk": {
|
|
"name": "folder_access_role_id_roles_id_fk",
|
|
"tableFrom": "folder_access",
|
|
"tableTo": "roles",
|
|
"columnsFrom": [
|
|
"role_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"folder_access_granted_by_users_id_fk": {
|
|
"name": "folder_access_granted_by_users_id_fk",
|
|
"tableFrom": "folder_access",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"granted_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"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_defaults": {
|
|
"name": "host_defaults",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"level": {
|
|
"name": "level",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"scope_key": {
|
|
"name": "scope_key",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"folder_id": {
|
|
"name": "folder_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"namespace": {
|
|
"name": "namespace",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"key": {
|
|
"name": "key",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"value": {
|
|
"name": "value",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"updated_by": {
|
|
"name": "updated_by",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_host_defaults_scope_key": {
|
|
"name": "idx_host_defaults_scope_key",
|
|
"columns": [
|
|
{
|
|
"expression": "scope_key",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "namespace",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "key",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_host_defaults_user": {
|
|
"name": "idx_host_defaults_user",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_host_defaults_folder": {
|
|
"name": "idx_host_defaults_folder",
|
|
"columns": [
|
|
{
|
|
"expression": "folder_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"host_defaults_user_id_users_id_fk": {
|
|
"name": "host_defaults_user_id_users_id_fk",
|
|
"tableFrom": "host_defaults",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"host_defaults_folder_id_ssh_folders_id_fk": {
|
|
"name": "host_defaults_folder_id_ssh_folders_id_fk",
|
|
"tableFrom": "host_defaults",
|
|
"tableTo": "ssh_folders",
|
|
"columnsFrom": [
|
|
"folder_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.host_protocol_auth": {
|
|
"name": "host_protocol_auth",
|
|
"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
|
|
},
|
|
"auth_type": {
|
|
"name": "auth_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'direct'"
|
|
},
|
|
"credential_id": {
|
|
"name": "credential_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"username": {
|
|
"name": "username",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"password": {
|
|
"name": "password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"fields": {
|
|
"name": "fields",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"secret_fields": {
|
|
"name": "secret_fields",
|
|
"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_host_protocol_auth_host_protocol": {
|
|
"name": "idx_host_protocol_auth_host_protocol",
|
|
"columns": [
|
|
{
|
|
"expression": "host_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "protocol",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_host_protocol_auth_user": {
|
|
"name": "idx_host_protocol_auth_user",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_host_protocol_auth_credential": {
|
|
"name": "idx_host_protocol_auth_credential",
|
|
"columns": [
|
|
{
|
|
"expression": "credential_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"host_protocol_auth_host_id_ssh_data_id_fk": {
|
|
"name": "host_protocol_auth_host_id_ssh_data_id_fk",
|
|
"tableFrom": "host_protocol_auth",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"host_protocol_auth_user_id_users_id_fk": {
|
|
"name": "host_protocol_auth_user_id_users_id_fk",
|
|
"tableFrom": "host_protocol_auth",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"host_protocol_auth_credential_id_ssh_credentials_id_fk": {
|
|
"name": "host_protocol_auth_credential_id_ssh_credentials_id_fk",
|
|
"tableFrom": "host_protocol_auth",
|
|
"tableTo": "ssh_credentials",
|
|
"columnsFrom": [
|
|
"credential_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"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": "text",
|
|
"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
|
|
},
|
|
"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
|
|
},
|
|
"credential_id": {
|
|
"name": "credential_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"override_credential_username": {
|
|
"name": "override_credential_username",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"jump_hosts": {
|
|
"name": "jump_hosts",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"status_check_enabled": {
|
|
"name": "status_check_enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"status_check_interval": {
|
|
"name": "status_check_interval",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"ssh_options": {
|
|
"name": "ssh_options",
|
|
"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
|
|
},
|
|
"ssh_port": {
|
|
"name": "ssh_port",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"default": 22
|
|
},
|
|
"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
|
|
},
|
|
"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
|
|
},
|
|
"local_only": {
|
|
"name": "local_only",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"shared_source": {
|
|
"name": "shared_source",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"default_overrides": {
|
|
"name": "default_overrides",
|
|
"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_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"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"ssh_data_sync_id_unique": {
|
|
"name": "ssh_data_sync_id_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"sync_id"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.plugin_install_counts": {
|
|
"name": "plugin_install_counts",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"plugin_id": {
|
|
"name": "plugin_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"registry_id": {
|
|
"name": "registry_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"count": {
|
|
"name": "count",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_plugin_install_counts_plugin_registry": {
|
|
"name": "idx_plugin_install_counts_plugin_registry",
|
|
"columns": [
|
|
{
|
|
"expression": "plugin_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "registry_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.plugin_migrations": {
|
|
"name": "plugin_migrations",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"plugin_id": {
|
|
"name": "plugin_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"migration_id": {
|
|
"name": "migration_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"checksum": {
|
|
"name": "checksum",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"applied_at": {
|
|
"name": "applied_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_plugin_migrations_plugin_migration": {
|
|
"name": "idx_plugin_migrations_plugin_migration",
|
|
"columns": [
|
|
{
|
|
"expression": "plugin_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "migration_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"plugin_migrations_plugin_id_plugins_id_fk": {
|
|
"name": "plugin_migrations_plugin_id_plugins_id_fk",
|
|
"tableFrom": "plugin_migrations",
|
|
"tableTo": "plugins",
|
|
"columnsFrom": [
|
|
"plugin_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.plugin_permission_grants": {
|
|
"name": "plugin_permission_grants",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"plugin_id": {
|
|
"name": "plugin_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"capability": {
|
|
"name": "capability",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"granted_at": {
|
|
"name": "granted_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
},
|
|
"granted_by": {
|
|
"name": "granted_by",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"source": {
|
|
"name": "source",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'admin'"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_plugin_permission_grants_plugin_capability": {
|
|
"name": "idx_plugin_permission_grants_plugin_capability",
|
|
"columns": [
|
|
{
|
|
"expression": "plugin_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "capability",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"plugin_permission_grants_plugin_id_plugins_id_fk": {
|
|
"name": "plugin_permission_grants_plugin_id_plugins_id_fk",
|
|
"tableFrom": "plugin_permission_grants",
|
|
"tableTo": "plugins",
|
|
"columnsFrom": [
|
|
"plugin_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"plugin_permission_grants_granted_by_users_id_fk": {
|
|
"name": "plugin_permission_grants_granted_by_users_id_fk",
|
|
"tableFrom": "plugin_permission_grants",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"granted_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.plugin_registries": {
|
|
"name": "plugin_registries",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"url": {
|
|
"name": "url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"kind": {
|
|
"name": "kind",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'community'"
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": true
|
|
},
|
|
"signing_key": {
|
|
"name": "signing_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"last_checked_at": {
|
|
"name": "last_checked_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"last_index_hash": {
|
|
"name": "last_index_hash",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.plugin_settings": {
|
|
"name": "plugin_settings",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"plugin_id": {
|
|
"name": "plugin_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"scope": {
|
|
"name": "scope",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"scope_id": {
|
|
"name": "scope_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"key": {
|
|
"name": "key",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"value": {
|
|
"name": "value",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"encrypted": {
|
|
"name": "encrypted",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_plugin_settings_scope_key": {
|
|
"name": "idx_plugin_settings_scope_key",
|
|
"columns": [
|
|
{
|
|
"expression": "plugin_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "scope",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "scope_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "key",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_plugin_settings_plugin_scope": {
|
|
"name": "idx_plugin_settings_plugin_scope",
|
|
"columns": [
|
|
{
|
|
"expression": "plugin_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "scope",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"plugin_settings_plugin_id_plugins_id_fk": {
|
|
"name": "plugin_settings_plugin_id_plugins_id_fk",
|
|
"tableFrom": "plugin_settings",
|
|
"tableTo": "plugins",
|
|
"columnsFrom": [
|
|
"plugin_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.plugin_storage": {
|
|
"name": "plugin_storage",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"plugin_id": {
|
|
"name": "plugin_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"key": {
|
|
"name": "key",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"value": {
|
|
"name": "value",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_plugin_storage_plugin_key": {
|
|
"name": "idx_plugin_storage_plugin_key",
|
|
"columns": [
|
|
{
|
|
"expression": "plugin_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "key",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"plugin_storage_plugin_id_plugins_id_fk": {
|
|
"name": "plugin_storage_plugin_id_plugins_id_fk",
|
|
"tableFrom": "plugin_storage",
|
|
"tableTo": "plugins",
|
|
"columnsFrom": [
|
|
"plugin_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.plugins": {
|
|
"name": "plugins",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"version": {
|
|
"name": "version",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"tier": {
|
|
"name": "tier",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'available'"
|
|
},
|
|
"source": {
|
|
"name": "source",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'community'"
|
|
},
|
|
"registry_id": {
|
|
"name": "registry_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"state": {
|
|
"name": "state",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'disabled'"
|
|
},
|
|
"last_error": {
|
|
"name": "last_error",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"installed_at": {
|
|
"name": "installed_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
},
|
|
"auto_update": {
|
|
"name": "auto_update",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"pinned_version": {
|
|
"name": "pinned_version",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"channel": {
|
|
"name": "channel",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'stable'"
|
|
},
|
|
"manifest_json": {
|
|
"name": "manifest_json",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_plugins_registry_id": {
|
|
"name": "idx_plugins_registry_id",
|
|
"columns": [
|
|
{
|
|
"expression": "registry_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.rbac_applied_defaults": {
|
|
"name": "rbac_applied_defaults",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"role_name": {
|
|
"name": "role_name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"permission": {
|
|
"name": "permission",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"applied_at": {
|
|
"name": "applied_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_rbac_applied_defaults_role_permission": {
|
|
"name": "idx_rbac_applied_defaults_role_permission",
|
|
"columns": [
|
|
{
|
|
"expression": "role_name",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "permission",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.rbac_known_permissions": {
|
|
"name": "rbac_known_permissions",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"permission": {
|
|
"name": "permission",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"plugin_id": {
|
|
"name": "plugin_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"first_seen_at": {
|
|
"name": "first_seen_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_rbac_known_permissions_permission": {
|
|
"name": "idx_rbac_known_permissions_permission",
|
|
"columns": [
|
|
{
|
|
"expression": "permission",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"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.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
|
|
},
|
|
"external_session_ref": {
|
|
"name": "external_session_ref",
|
|
"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_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_credential_secrets": {
|
|
"name": "shared_credential_secrets",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"credential_access_id": {
|
|
"name": "credential_access_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"target_user_id": {
|
|
"name": "target_user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"credential_id": {
|
|
"name": "credential_id",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"encrypted_username": {
|
|
"name": "encrypted_username",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"auth_type": {
|
|
"name": "auth_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'password'"
|
|
},
|
|
"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
|
|
},
|
|
"key_type": {
|
|
"name": "key_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"public_key": {
|
|
"name": "public_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cert_public_key": {
|
|
"name": "cert_public_key",
|
|
"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_credential_secrets_scope": {
|
|
"name": "idx_shared_credential_secrets_scope",
|
|
"columns": [
|
|
{
|
|
"expression": "credential_access_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "target_user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_shared_credential_secrets_target": {
|
|
"name": "idx_shared_credential_secrets_target",
|
|
"columns": [
|
|
{
|
|
"expression": "target_user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "credential_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"shared_credential_secrets_target_user_id_users_id_fk": {
|
|
"name": "shared_credential_secrets_target_user_id_users_id_fk",
|
|
"tableFrom": "shared_credential_secrets",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"target_user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"shared_credential_secrets_credential_id_ssh_credentials_id_fk": {
|
|
"name": "shared_credential_secrets_credential_id_ssh_credentials_id_fk",
|
|
"tableFrom": "shared_credential_secrets",
|
|
"tableTo": "ssh_credentials",
|
|
"columnsFrom": [
|
|
"credential_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"shared_cred_secrets_access_id_fk": {
|
|
"name": "shared_cred_secrets_access_id_fk",
|
|
"tableFrom": "shared_credential_secrets",
|
|
"tableTo": "credential_access",
|
|
"columnsFrom": [
|
|
"credential_access_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"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
|
|
},
|
|
"encrypted_fields": {
|
|
"name": "encrypted_fields",
|
|
"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.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": "text",
|
|
"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
|
|
},
|
|
"shared_source": {
|
|
"name": "shared_source",
|
|
"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_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": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"color": {
|
|
"name": "color",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"icon": {
|
|
"name": "icon",
|
|
"type": "text",
|
|
"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
|
|
},
|
|
"local_only": {
|
|
"name": "local_only",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 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"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {
|
|
"ssh_folders_sync_id_unique": {
|
|
"name": "ssh_folders_sync_id_unique",
|
|
"nullsNotDistinct": false,
|
|
"columns": [
|
|
"sync_id"
|
|
]
|
|
}
|
|
},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.sync_conflicts": {
|
|
"name": "sync_conflicts",
|
|
"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": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"local_row": {
|
|
"name": "local_row",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"server_revision": {
|
|
"name": "server_revision",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_sync_conflicts_user": {
|
|
"name": "idx_sync_conflicts_user",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"sync_conflicts_user_id_users_id_fk": {
|
|
"name": "sync_conflicts_user_id_users_id_fk",
|
|
"tableFrom": "sync_conflicts",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.sync_link": {
|
|
"name": "sync_link",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"server_url": {
|
|
"name": "server_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"server_name": {
|
|
"name": "server_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"server_version": {
|
|
"name": "server_version",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"session_token": {
|
|
"name": "session_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"custom_headers": {
|
|
"name": "custom_headers",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"basic_auth": {
|
|
"name": "basic_auth",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"allow_invalid_certificate": {
|
|
"name": "allow_invalid_certificate",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"remote_user_id": {
|
|
"name": "remote_user_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"remote_username": {
|
|
"name": "remote_username",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"account": {
|
|
"name": "account",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"scope": {
|
|
"name": "scope",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"known_types": {
|
|
"name": "known_types",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"cursor": {
|
|
"name": "cursor",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "'idle'"
|
|
},
|
|
"last_error": {
|
|
"name": "last_error",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"linked_at": {
|
|
"name": "linked_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
},
|
|
"last_sync_at": {
|
|
"name": "last_sync_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"sync_link_user_id_users_id_fk": {
|
|
"name": "sync_link_user_id_users_id_fk",
|
|
"tableFrom": "sync_link",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
},
|
|
"public.sync_records": {
|
|
"name": "sync_records",
|
|
"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": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"sync_id": {
|
|
"name": "sync_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"revision": {
|
|
"name": "revision",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"seq": {
|
|
"name": "seq",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": 0
|
|
},
|
|
"hash": {
|
|
"name": "hash",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"deleted": {
|
|
"name": "deleted",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": false
|
|
},
|
|
"error": {
|
|
"name": "error",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"error_hash": {
|
|
"name": "error_hash",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_sync_records_user_entity_sync": {
|
|
"name": "idx_sync_records_user_entity_sync",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "entity_type",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "sync_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_sync_records_user_seq": {
|
|
"name": "idx_sync_records_user_seq",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "seq",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"sync_records_user_id_users_id_fk": {
|
|
"name": "sync_records_user_id_users_id_fk",
|
|
"tableFrom": "sync_records",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_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": {
|
|
"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_external_identities": {
|
|
"name": "user_external_identities",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"provider_id": {
|
|
"name": "provider_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"subject": {
|
|
"name": "subject",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_user_external_identities_provider_subject": {
|
|
"name": "idx_user_external_identities_provider_subject",
|
|
"columns": [
|
|
{
|
|
"expression": "provider_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "subject",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
},
|
|
"idx_user_external_identities_user": {
|
|
"name": "idx_user_external_identities_user",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": false,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"user_external_identities_user_id_users_id_fk": {
|
|
"name": "user_external_identities_user_id_users_id_fk",
|
|
"tableFrom": "user_external_identities",
|
|
"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_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
|
|
},
|
|
"show_pin_app_rail_button": {
|
|
"name": "show_pin_app_rail_button",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false
|
|
},
|
|
"folders_collapsed": {
|
|
"name": "folders_collapsed",
|
|
"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_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_second_factors": {
|
|
"name": "user_second_factors",
|
|
"schema": "",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "serial",
|
|
"primaryKey": true,
|
|
"notNull": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"plugin_id": {
|
|
"name": "plugin_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"factor_id": {
|
|
"name": "factor_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true
|
|
},
|
|
"enrolled_at": {
|
|
"name": "enrolled_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_user_second_factors_user_factor": {
|
|
"name": "idx_user_second_factors_user_factor",
|
|
"columns": [
|
|
{
|
|
"expression": "user_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "plugin_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
},
|
|
{
|
|
"expression": "factor_id",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"user_second_factors_user_id_users_id_fk": {
|
|
"name": "user_second_factors_user_id_users_id_fk",
|
|
"tableFrom": "user_second_factors",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"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": "varchar(255)",
|
|
"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
|
|
},
|
|
"registered_at": {
|
|
"name": "registered_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"default": "CURRENT_TIMESTAMP"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_users_username": {
|
|
"name": "idx_users_username",
|
|
"columns": [
|
|
{
|
|
"expression": "username",
|
|
"isExpression": false,
|
|
"asc": true,
|
|
"nulls": "last"
|
|
}
|
|
],
|
|
"isUnique": true,
|
|
"concurrently": false,
|
|
"method": "btree",
|
|
"with": {}
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"policies": {},
|
|
"checkConstraints": {},
|
|
"isRLSEnabled": false
|
|
}
|
|
},
|
|
"enums": {},
|
|
"schemas": {},
|
|
"sequences": {},
|
|
"roles": {},
|
|
"policies": {},
|
|
"views": {},
|
|
"_meta": {
|
|
"columns": {},
|
|
"schemas": {},
|
|
"tables": {}
|
|
}
|
|
} |