mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-08-29 18:31:33 +00:00
* groundwork for postgres and mysql backends #1127 made the repository layer dialect-agnostic. This adds the pieces needed to actually target a second engine, as a foundation only — nothing is wired up and sqlite remains the sole runtime path. - DatabaseDialect covers sqlite, postgres and mysql, resolved from DATABASE_DIALECT and defaulting to sqlite so nothing changes for existing deployments or the desktop build - a column kit holding the per-dialect type choices in one file: booleans are integers on sqlite and native elsewhere, autoincrement differs three ways, and MySQL cannot index unbounded TEXT so key columns need varchar - settings and users declared for all three dialects as a proof slice, chosen because between them they use every construct the real schema does - pg and mysql2 added as dependencies The tests build real queries for all three engines without a server, asserting identifier quoting, placeholder style and boolean storage, so the property the repositories depend on is verified rather than assumed. * verify foreign keys and unique constraints port across dialects The first slice only covered plain columns. The real schema also has 92 foreign keys (80 cascade, 12 set null) and 14 unique columns, so the approach is only viable if those survive the port. Adds audit_logs and ssh_folders to the proof slice: one nullable reference with ON DELETE SET NULL, one required reference with ON DELETE CASCADE, a unique column, and an autoincrement surrogate key — which is spelled three different ways underneath (integer primary key autoincrement, serial, int auto_increment). All of it holds. Worth noting for whoever picks this up: getTableConfig is dialect-specific and silently fails on a table from another dialect, so the test uses each engine's own. * generate the postgres and mysql schemas instead of hand-writing them The proof slice showed the constructs port, but left the maintenance question open. Three hand-written copies of 52 tables is the wrong answer: with foreign keys the copies cross-reference each other, so a renamed table has to land in three places consistently or a key silently points at the wrong one. The mapping is mechanical, so a script does it. schema.ts stays the single source of truth and schema.pg.ts / schema.mysql.ts are derived, covering all 52 tables — the column kit and the two-table portable slice are gone, since the generator now holds those decisions. The transforms are the ones the kit enumerated: integer-backed booleans become native, autoincrement keys become serial or int auto_increment, real becomes double precision or double, and any column that is a primary key, is unique, or sits on either end of a foreign key becomes varchar because MySQL cannot index unbounded TEXT. > termix@2.6.0 lint > node scripts/generate-dialect-schema.cjs --check && eslint . /mnt/c/Users/29037/WebstormProjects/Termix/src/backend/database/routes/homepage-favicon-routes.ts 99:12 warning 'err' is defined but never used unused-imports/no-unused-vars /mnt/c/Users/29037/WebstormProjects/Termix/src/backend/database/routes/homepage-ping-routes.ts 123:12 warning 'err' is defined but never used unused-imports/no-unused-vars /mnt/c/Users/29037/WebstormProjects/Termix/src/backend/database/routes/homepage-rss-routes.ts 144:12 warning 'err' is defined but never used unused-imports/no-unused-vars /mnt/c/Users/29037/WebstormProjects/Termix/src/backend/database/routes/session-log-routes.ts 46:16 warning 'canAccessRecording' is defined but never used. Allowed unused vars must match /^_/u unused-imports/no-unused-vars /mnt/c/Users/29037/WebstormProjects/Termix/src/backend/hosts/vault-signer-core.ts 55:12 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any 75:13 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any /mnt/c/Users/29037/WebstormProjects/Termix/src/backend/tests/hosts/auth-manager.test.ts 18:73 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any /mnt/c/Users/29037/WebstormProjects/Termix/src/backend/tests/utils/shared-host-secrets-manager.test.ts 7:6 warning 'SecretRow' is defined but never used. Allowed unused vars must match /^_/u unused-imports/no-unused-vars /mnt/c/Users/29037/WebstormProjects/Termix/src/backend/utils/auth-manager.ts 510:13 warning 'affectedUsers' is assigned a value but never used. Allowed unused vars must match /^_/u unused-imports/no-unused-vars /mnt/c/Users/29037/WebstormProjects/Termix/src/backend/utils/notification-sender.ts 48:12 warning 'firstErr' is defined but never used unused-imports/no-unused-vars /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/api/ssh-file-operations-api.ts 35:10 warning 'buildFileManagerUrl' is defined but never used. Allowed unused vars must match /^_/u unused-imports/no-unused-vars /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/components/folder-style.tsx 61:14 warning Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components 116:14 warning Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components 121:14 warning Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components 149:17 warning Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/components/proxmox/ProxmoxDiscoverDialog.tsx 109:19 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any 190:19 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/homepage/HomepageCanvas.tsx 345:15 warning Empty block statement no-empty 388:15 warning Empty block statement no-empty 415:15 warning Empty block statement no-empty /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/homepage/dialogs/SingleHostEditForm.tsx 24:6 warning React Hook useEffect has a missing dependency: 'filter'. Either include it or remove the dependency array. If 'setHosts' needs the current value of 'filter', you can also switch to useReducer instead of useState and read 'filter' in the reducer react-hooks/exhaustive-deps /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/homepage/widgets/AlertFeedWidget.tsx 93:6 warning React Hook useEffect has a missing dependency: 'fetchData'. Either include it or remove the dependency array react-hooks/exhaustive-deps /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/homepage/widgets/CustomApiWidget.tsx 77:6 warning React Hook useEffect has a missing dependency: 'fetchData'. Either include it or remove the dependency array react-hooks/exhaustive-deps /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/homepage/widgets/DockerActivityWidget.tsx 50:6 warning React Hook useEffect has a missing dependency: 'fetchData'. Either include it or remove the dependency array react-hooks/exhaustive-deps /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/homepage/widgets/DockerWidget.tsx 16:10 warning Fast refresh only works when a file has exports. Move your component(s) to a separate file react-refresh/only-export-components /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/homepage/widgets/FileManagerWidget.tsx 16:10 warning Fast refresh only works when a file has exports. Move your component(s) to a separate file react-refresh/only-export-components /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/homepage/widgets/HostGridWidget.tsx 61:6 warning React Hook useCallback has a missing dependency: 'hostIds'. Either include it or remove the dependency array react-hooks/exhaustive-deps 61:7 warning React Hook useCallback has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked react-hooks/exhaustive-deps /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/homepage/widgets/MetricsChartWidget.tsx 168:6 warning React Hook useEffect has a missing dependency: 'fetchData'. Either include it or remove the dependency array react-hooks/exhaustive-deps /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/homepage/widgets/PingStatusWidget.tsx 79:6 warning React Hook useEffect has a missing dependency: 'fetchAll'. Either include it or remove the dependency array react-hooks/exhaustive-deps 79:7 warning React Hook useEffect has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked react-hooks/exhaustive-deps /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/homepage/widgets/QuickConnectWidget.tsx 64:10 warning Fast refresh only works when a file has exports. Move your component(s) to a separate file react-refresh/only-export-components /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/homepage/widgets/RecentActivityWidget.tsx 82:6 warning React Hook useEffect has a missing dependency: 'fetchData'. Either include it or remove the dependency array react-hooks/exhaustive-deps 82:17 warning React Hook useEffect has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked react-hooks/exhaustive-deps /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/homepage/widgets/SshQuickConnectWidget.tsx 67:6 warning React Hook useCallback has a missing dependency: 'hostIds'. Either include it or remove the dependency array react-hooks/exhaustive-deps 67:7 warning React Hook useCallback has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked react-hooks/exhaustive-deps 99:17 warning 'online' is assigned a value but never used. Allowed unused vars must match /^_/u unused-imports/no-unused-vars /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/homepage/widgets/SshTerminalWidget.tsx 17:10 warning Fast refresh only works when a file has exports. Move your component(s) to a separate file react-refresh/only-export-components /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/homepage/widgets/SystemOverviewWidget.tsx 72:6 warning React Hook useEffect has a missing dependency: 'fetchData'. Either include it or remove the dependency array react-hooks/exhaustive-deps /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/homepage/widgets/TunnelWidget.tsx 15:10 warning Fast refresh only works when a file has exports. Move your component(s) to a separate file react-refresh/only-export-components /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/features/host-metrics/cards/CpuCard.tsx 14:10 warning 'computeChartData' is defined but never used. Allowed unused vars must match /^_/u unused-imports/no-unused-vars /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/sidebar/FolderPathPicker.tsx 15:17 warning Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components 22:17 warning Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components react-refresh/only-export-components /mnt/c/Users/29037/WebstormProjects/Termix/src/ui/sidebar/HostsPanel.tsx 601:52 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any ✖ 44 problems (0 errors, 44 warnings) now fails if the generated files are out of date, so editing the schema without regenerating cannot reach main. * select durability behaviour per dialect, and document the backends The onWrite hook every repository receives exists to serialise the in-memory SQLite database back to its encrypted file. On a client-server engine a committed write is already durable and there is nothing to flush, so the factory now installs no hook at all rather than one that does nothing. Repositories call it as this.onWrite?.(), so none of the 43 of them change. Also adds docs/database-backends.md, mostly to be explicit about encryption, which is the part most likely to be misread. Field-level encryption is identical on all three engines and covers every credential. Whole-file encryption has no equivalent on Postgres or MySQL, so host names, snippet contents, audit entries and backups are only as protected as the storage underneath them — that is the operator's responsibility and the docs should not imply otherwise. * generate DDL with drizzle-kit, and give settings a synchronous path Two of the three remaining blockers. DDL: db/index.ts hand-writes 67 CREATE TABLE statements and 122 ADD COLUMN migrations, all in SQLite dialect. Rather than port them, drizzle-kit now generates migrations from the schema modules — 817 lines for Postgres, 869 for MySQL, with the type mapping already correct because the schemas it reads are themselves generated. > termix@2.6.0 schema:migrations > drizzle-kit generate --config=drizzle.config.pg.ts && drizzle-kit generate --config=drizzle.config.mysql.ts Reading config file '/mnt/c/Users/29037/WebstormProjects/Termix/drizzle.config.pg.ts' 52 tables alert_firings 11 columns 0 indexes 2 fks alert_rule_channels 3 columns 0 indexes 2 fks alert_rules 11 columns 0 indexes 2 fks api_keys 9 columns 0 indexes 1 fks audit_logs 13 columns 0 indexes 1 fks c2s_tunnel_presets 8 columns 0 indexes 1 fks command_history 5 columns 0 indexes 2 fks dashboard_service_links 8 columns 0 indexes 1 fks dismissed_alerts 4 columns 0 indexes 1 fks file_manager_pinned 6 columns 0 indexes 2 fks file_manager_recent 6 columns 0 indexes 2 fks file_manager_shortcuts 6 columns 0 indexes 2 fks homepage_items 9 columns 0 indexes 1 fks homepage_layouts 4 columns 0 indexes 1 fks host_access 11 columns 0 indexes 5 fks host_health_checks 7 columns 0 indexes 2 fks host_health_history 8 columns 0 indexes 2 fks host_metrics_history 8 columns 0 indexes 1 fks host_metrics_preferences 6 columns 0 indexes 2 fks ssh_data 94 columns 0 indexes 6 fks network_topology 5 columns 0 indexes 1 fks notification_channels 7 columns 0 indexes 1 fks opkssh_tokens 12 columns 0 indexes 2 fks recent_activity 6 columns 0 indexes 2 fks roles 8 columns 0 indexes 0 fks session_recordings 15 columns 0 indexes 3 fks session_share_participants 6 columns 0 indexes 2 fks session_shares 15 columns 0 indexes 3 fks sessions 11 columns 0 indexes 1 fks settings 2 columns 0 indexes 0 fks shared_host_secrets 15 columns 0 indexes 3 fks snippet_access 8 columns 0 indexes 4 fks snippet_folders 8 columns 0 indexes 1 fks snippets 11 columns 0 indexes 1 fks ssh_credential_usage 5 columns 0 indexes 3 fks ssh_credentials 21 columns 0 indexes 1 fks ssh_folders 9 columns 0 indexes 2 fks sso_providers 8 columns 0 indexes 0 fks sync_tombstones 5 columns 0 indexes 1 fks termix_identities 6 columns 0 indexes 1 fks termix_identity_ca 8 columns 0 indexes 2 fks termix_identity_keys 12 columns 0 indexes 3 fks tmux_session_tags 6 columns 0 indexes 2 fks transfer_recent 7 columns 0 indexes 3 fks trusted_devices 8 columns 0 indexes 1 fks user_open_tabs 9 columns 0 indexes 2 fks user_preferences 23 columns 0 indexes 1 fks user_roles 5 columns 0 indexes 3 fks users 20 columns 0 indexes 0 fks vault_profiles 18 columns 0 indexes 1 fks vault_tokens 8 columns 0 indexes 2 fks webauthn_credentials 12 columns 0 indexes 1 fks No schema changes, nothing to migrate 😴 Reading config file '/mnt/c/Users/29037/WebstormProjects/Termix/drizzle.config.mysql.ts' Reading schema files: /mnt/c/Users/29037/WebstormProjects/Termix/src/backend/database/db/schema.mysql.ts 52 tables alert_firings 11 columns 0 indexes 2 fks alert_rule_channels 3 columns 0 indexes 2 fks alert_rules 11 columns 0 indexes 2 fks api_keys 9 columns 0 indexes 1 fks audit_logs 13 columns 0 indexes 1 fks c2s_tunnel_presets 8 columns 0 indexes 1 fks command_history 5 columns 0 indexes 2 fks dashboard_service_links 8 columns 0 indexes 1 fks dismissed_alerts 4 columns 0 indexes 1 fks file_manager_pinned 6 columns 0 indexes 2 fks file_manager_recent 6 columns 0 indexes 2 fks file_manager_shortcuts 6 columns 0 indexes 2 fks homepage_items 9 columns 0 indexes 1 fks homepage_layouts 4 columns 0 indexes 1 fks host_access 11 columns 0 indexes 5 fks host_health_checks 7 columns 0 indexes 2 fks host_health_history 8 columns 0 indexes 2 fks host_metrics_history 8 columns 0 indexes 1 fks host_metrics_preferences 6 columns 0 indexes 2 fks ssh_data 94 columns 0 indexes 6 fks network_topology 5 columns 0 indexes 1 fks notification_channels 7 columns 0 indexes 1 fks opkssh_tokens 12 columns 0 indexes 2 fks recent_activity 6 columns 0 indexes 2 fks roles 8 columns 0 indexes 0 fks session_recordings 15 columns 0 indexes 3 fks session_share_participants 6 columns 0 indexes 2 fks session_shares 15 columns 0 indexes 3 fks sessions 11 columns 0 indexes 1 fks settings 2 columns 0 indexes 0 fks shared_host_secrets 15 columns 0 indexes 3 fks snippet_access 8 columns 0 indexes 4 fks snippet_folders 8 columns 0 indexes 1 fks snippets 11 columns 0 indexes 1 fks ssh_credential_usage 5 columns 0 indexes 3 fks ssh_credentials 21 columns 0 indexes 1 fks ssh_folders 9 columns 0 indexes 2 fks sso_providers 8 columns 0 indexes 0 fks sync_tombstones 5 columns 0 indexes 1 fks termix_identities 6 columns 0 indexes 1 fks termix_identity_ca 8 columns 0 indexes 2 fks termix_identity_keys 12 columns 0 indexes 3 fks tmux_session_tags 6 columns 0 indexes 2 fks transfer_recent 7 columns 0 indexes 3 fks trusted_devices 8 columns 0 indexes 1 fks user_open_tabs 9 columns 0 indexes 2 fks user_preferences 23 columns 0 indexes 1 fks user_roles 5 columns 0 indexes 3 fks users 20 columns 0 indexes 0 fks vault_profiles 18 columns 0 indexes 1 fks vault_tokens 8 columns 0 indexes 2 fks webauthn_credentials 12 columns 0 indexes 1 fks No schema changes, nothing to migrate 😴 regenerates both. Settings: 27 call sites read settings synchronously, during startup and inside request handlers. better-sqlite3 can do that; Postgres and MySQL cannot, and making all 27 async would push await through code that has no reason to be asynchronous. Settings are a handful of rarely-changing rows read constantly, so they are cached in full — primed at startup, kept in step by SettingsRepository on every set/delete/deleteLike. SQLite keeps reading the database directly and stays authoritative; only the other engines use the cache. Opening a connection is still not done. DatabaseContext.drizzle is typed as BetterSQLite3Database and 43 repositories depend on that inference; the three drizzle instance types are not interchangeable, so widening it is a design decision rather than a mechanical change. * exclude drizzle-kit output from prettier The generated migrations and snapshots are tool output; their formatting is drizzle-kit's to decide, and prettier cannot parse the .sql files at all. * absorb the RETURNING gap so mysql stays reachable MySQL has no RETURNING clause and drizzle's mysql-core does not expose the method, while 156 call sites here read the result of a write. That is the real blocker for MySQL, not the connection layer. Classifying those call sites showed the split is favourable: 92 of them only read .length, which every engine reports — as a returned array on sqlite and postgres, as affectedRows on MySQL. rowsAffected() reads both shapes, so those sites need no change in query shape. insertedId() does the same for the autoincrement key, which MySQL reports as insertId. What is left is the ~34 sites that genuinely consume the returned rows. Those cannot be emulated without reading first, which needs a transaction to stay correct under concurrency, so they will be handled individually rather than behind a helper that quietly adds a round trip. supportsReturning() is the seam for that. Identifying the mysql2 result by its own fields rather than by array shape matters: it hands back [ResultSetHeader, fields], which is an array, so shape alone cannot tell it apart from a returning() result. * name the portable database type, and open remote connections Two pieces of the connection layer. drizzle's three Database classes share no base class and their signatures are incompatible, so there is no honest type that covers all three: a union is not callable and a generic would have to be threaded through 43 repositories and every method on them. DatabaseContext.drizzle is now PortableDatabase, still the SQLite type underneath, but named and documented as the deliberate approximation it is. What makes it safe is that the equivalence is asserted in multi-dialect.test.ts rather than assumed, and the one place the surfaces truly differ — RETURNING — is handled explicitly in mutation-result.ts. connect.ts opens Postgres and MySQL from DATABASE_URL, with the schema module and driver imported lazily so neither is loaded on a SQLite deployment. The URL scheme is checked against the configured dialect first: a postgres:// URL with DATABASE_DIALECT=mysql otherwise surfaces as a driver error deep in a stack that never mentions the actual misconfiguration. * open postgres and mysql at startup * count writes without RETURNING * read affected rows without RETURNING on mysql * insert without RETURNING, and split the sync transactions * stop pretending the generated schemas are used at runtime * run the dialect checks in CI * mysql rejects a bare CURRENT_TIMESTAMP default on text * make the read-back mismatch loud, and stop the next bare returning() * run the repository tests on the real schema * skip the byte-level assertions off sqlite * move generated ids past the seeded ones * keep the export order the same on every engine * stop reading better-sqlite3 fields off every write * read counts as numbers, not whatever the driver returns * make the fixture usable against a live server * upsert on the engine that has no ON CONFLICT * run the repository suite on all three engines in CI * mysql cannot index a text column without a length * document how to actually run on postgres or mysql * keep the sqlite-era migrations off the other engines * concat strings in a way mysql agrees with * run every repository test on every engine * bound how long replicas can disagree about settings * generate the sqlite migrations alongside the others
6330 lines
163 KiB
JSON
6330 lines
163 KiB
JSON
{
|
|
"version": "5",
|
|
"dialect": "mysql",
|
|
"id": "4d859368-b714-4d2c-aa81-109dd9569380",
|
|
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
"tables": {
|
|
"alert_firings": {
|
|
"name": "alert_firings",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"rule_id": {
|
|
"name": "rule_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_name": {
|
|
"name": "host_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"fired_at": {
|
|
"name": "fired_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"resolved_at": {
|
|
"name": "resolved_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"value": {
|
|
"name": "value",
|
|
"type": "double",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"message": {
|
|
"name": "message",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"severity": {
|
|
"name": "severity",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "('warning')"
|
|
},
|
|
"acknowledged": {
|
|
"name": "acknowledged",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"alert_firings_user_id_users_id_fk": {
|
|
"name": "alert_firings_user_id_users_id_fk",
|
|
"tableFrom": "alert_firings",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"alert_firings_rule_id_alert_rules_id_fk": {
|
|
"name": "alert_firings_rule_id_alert_rules_id_fk",
|
|
"tableFrom": "alert_firings",
|
|
"tableTo": "alert_rules",
|
|
"columnsFrom": [
|
|
"rule_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"alert_firings_id": {
|
|
"name": "alert_firings_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"alert_rule_channels": {
|
|
"name": "alert_rule_channels",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"rule_id": {
|
|
"name": "rule_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"channel_id": {
|
|
"name": "channel_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"alert_rule_channels_rule_id_alert_rules_id_fk": {
|
|
"name": "alert_rule_channels_rule_id_alert_rules_id_fk",
|
|
"tableFrom": "alert_rule_channels",
|
|
"tableTo": "alert_rules",
|
|
"columnsFrom": [
|
|
"rule_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"alert_rule_channels_channel_id_notification_channels_id_fk": {
|
|
"name": "alert_rule_channels_channel_id_notification_channels_id_fk",
|
|
"tableFrom": "alert_rule_channels",
|
|
"tableTo": "notification_channels",
|
|
"columnsFrom": [
|
|
"channel_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"alert_rule_channels_id": {
|
|
"name": "alert_rule_channels_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"alert_rules": {
|
|
"name": "alert_rules",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"trigger_type": {
|
|
"name": "trigger_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"threshold_value": {
|
|
"name": "threshold_value",
|
|
"type": "double",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"threshold_duration_seconds": {
|
|
"name": "threshold_duration_seconds",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"cooldown_minutes": {
|
|
"name": "cooldown_minutes",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 15
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"alert_rules_user_id_users_id_fk": {
|
|
"name": "alert_rules_user_id_users_id_fk",
|
|
"tableFrom": "alert_rules",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"alert_rules_host_id_ssh_data_id_fk": {
|
|
"name": "alert_rules_host_id_ssh_data_id_fk",
|
|
"tableFrom": "alert_rules",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"alert_rules_id": {
|
|
"name": "alert_rules_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"api_keys": {
|
|
"name": "api_keys",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"token_hash": {
|
|
"name": "token_hash",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"token_prefix": {
|
|
"name": "token_prefix",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"last_used_at": {
|
|
"name": "last_used_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"is_active": {
|
|
"name": "is_active",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": true
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"api_keys_user_id_users_id_fk": {
|
|
"name": "api_keys_user_id_users_id_fk",
|
|
"tableFrom": "api_keys",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"api_keys_id": {
|
|
"name": "api_keys_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"audit_logs": {
|
|
"name": "audit_logs",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"username": {
|
|
"name": "username",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"action": {
|
|
"name": "action",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"resource_type": {
|
|
"name": "resource_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"resource_id": {
|
|
"name": "resource_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"resource_name": {
|
|
"name": "resource_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"details": {
|
|
"name": "details",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"ip_address": {
|
|
"name": "ip_address",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"user_agent": {
|
|
"name": "user_agent",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"success": {
|
|
"name": "success",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"error_message": {
|
|
"name": "error_message",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"timestamp": {
|
|
"name": "timestamp",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"audit_logs_user_id_users_id_fk": {
|
|
"name": "audit_logs_user_id_users_id_fk",
|
|
"tableFrom": "audit_logs",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"audit_logs_id": {
|
|
"name": "audit_logs_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"c2s_tunnel_presets": {
|
|
"name": "c2s_tunnel_presets",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"config": {
|
|
"name": "config",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"platform": {
|
|
"name": "platform",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"computer_name": {
|
|
"name": "computer_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"c2s_tunnel_presets_user_id_users_id_fk": {
|
|
"name": "c2s_tunnel_presets_user_id_users_id_fk",
|
|
"tableFrom": "c2s_tunnel_presets",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"c2s_tunnel_presets_id": {
|
|
"name": "c2s_tunnel_presets_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"command_history": {
|
|
"name": "command_history",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"command": {
|
|
"name": "command",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"executed_at": {
|
|
"name": "executed_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"command_history_user_id_users_id_fk": {
|
|
"name": "command_history_user_id_users_id_fk",
|
|
"tableFrom": "command_history",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"command_history_host_id_ssh_data_id_fk": {
|
|
"name": "command_history_host_id_ssh_data_id_fk",
|
|
"tableFrom": "command_history",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"command_history_id": {
|
|
"name": "command_history_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"dashboard_service_links": {
|
|
"name": "dashboard_service_links",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"label": {
|
|
"name": "label",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"url": {
|
|
"name": "url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"order": {
|
|
"name": "order",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"sync_id": {
|
|
"name": "sync_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"dashboard_service_links_user_id_users_id_fk": {
|
|
"name": "dashboard_service_links_user_id_users_id_fk",
|
|
"tableFrom": "dashboard_service_links",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"dashboard_service_links_id": {
|
|
"name": "dashboard_service_links_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"dashboard_service_links_sync_id_unique": {
|
|
"name": "dashboard_service_links_sync_id_unique",
|
|
"columns": [
|
|
"sync_id"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"dismissed_alerts": {
|
|
"name": "dismissed_alerts",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"alert_id": {
|
|
"name": "alert_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"dismissed_at": {
|
|
"name": "dismissed_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"dismissed_alerts_user_id_users_id_fk": {
|
|
"name": "dismissed_alerts_user_id_users_id_fk",
|
|
"tableFrom": "dismissed_alerts",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"dismissed_alerts_id": {
|
|
"name": "dismissed_alerts_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"file_manager_pinned": {
|
|
"name": "file_manager_pinned",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"path": {
|
|
"name": "path",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"pinned_at": {
|
|
"name": "pinned_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"file_manager_pinned_user_id_users_id_fk": {
|
|
"name": "file_manager_pinned_user_id_users_id_fk",
|
|
"tableFrom": "file_manager_pinned",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"file_manager_pinned_host_id_ssh_data_id_fk": {
|
|
"name": "file_manager_pinned_host_id_ssh_data_id_fk",
|
|
"tableFrom": "file_manager_pinned",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"file_manager_pinned_id": {
|
|
"name": "file_manager_pinned_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"file_manager_recent": {
|
|
"name": "file_manager_recent",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"path": {
|
|
"name": "path",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"last_opened": {
|
|
"name": "last_opened",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"file_manager_recent_user_id_users_id_fk": {
|
|
"name": "file_manager_recent_user_id_users_id_fk",
|
|
"tableFrom": "file_manager_recent",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"file_manager_recent_host_id_ssh_data_id_fk": {
|
|
"name": "file_manager_recent_host_id_ssh_data_id_fk",
|
|
"tableFrom": "file_manager_recent",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"file_manager_recent_id": {
|
|
"name": "file_manager_recent_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"file_manager_shortcuts": {
|
|
"name": "file_manager_shortcuts",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"path": {
|
|
"name": "path",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"file_manager_shortcuts_user_id_users_id_fk": {
|
|
"name": "file_manager_shortcuts_user_id_users_id_fk",
|
|
"tableFrom": "file_manager_shortcuts",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"file_manager_shortcuts_host_id_ssh_data_id_fk": {
|
|
"name": "file_manager_shortcuts_host_id_ssh_data_id_fk",
|
|
"tableFrom": "file_manager_shortcuts",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"file_manager_shortcuts_id": {
|
|
"name": "file_manager_shortcuts_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"homepage_items": {
|
|
"name": "homepage_items",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"type_id": {
|
|
"name": "type_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"config": {
|
|
"name": "config",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "('{}')"
|
|
},
|
|
"folder_id": {
|
|
"name": "folder_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sync_id": {
|
|
"name": "sync_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"homepage_items_user_id_users_id_fk": {
|
|
"name": "homepage_items_user_id_users_id_fk",
|
|
"tableFrom": "homepage_items",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"homepage_items_id": {
|
|
"name": "homepage_items_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"homepage_items_sync_id_unique": {
|
|
"name": "homepage_items_sync_id_unique",
|
|
"columns": [
|
|
"sync_id"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"homepage_layouts": {
|
|
"name": "homepage_layouts",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"layout": {
|
|
"name": "layout",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "('{}')"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"homepage_layouts_user_id_users_id_fk": {
|
|
"name": "homepage_layouts_user_id_users_id_fk",
|
|
"tableFrom": "homepage_layouts",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"homepage_layouts_id": {
|
|
"name": "homepage_layouts_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"homepage_layouts_user_id_unique": {
|
|
"name": "homepage_layouts_user_id_unique",
|
|
"columns": [
|
|
"user_id"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"host_access": {
|
|
"name": "host_access",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"role_id": {
|
|
"name": "role_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"granted_by": {
|
|
"name": "granted_by",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"permission_level": {
|
|
"name": "permission_level",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "('connect')"
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"last_accessed_at": {
|
|
"name": "last_accessed_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"access_count": {
|
|
"name": "access_count",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"override_credential_id": {
|
|
"name": "override_credential_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"host_access_host_id_ssh_data_id_fk": {
|
|
"name": "host_access_host_id_ssh_data_id_fk",
|
|
"tableFrom": "host_access",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"host_access_user_id_users_id_fk": {
|
|
"name": "host_access_user_id_users_id_fk",
|
|
"tableFrom": "host_access",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"host_access_role_id_roles_id_fk": {
|
|
"name": "host_access_role_id_roles_id_fk",
|
|
"tableFrom": "host_access",
|
|
"tableTo": "roles",
|
|
"columnsFrom": [
|
|
"role_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"host_access_granted_by_users_id_fk": {
|
|
"name": "host_access_granted_by_users_id_fk",
|
|
"tableFrom": "host_access",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"granted_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"host_access_override_credential_id_ssh_credentials_id_fk": {
|
|
"name": "host_access_override_credential_id_ssh_credentials_id_fk",
|
|
"tableFrom": "host_access",
|
|
"tableTo": "ssh_credentials",
|
|
"columnsFrom": [
|
|
"override_credential_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"host_access_id": {
|
|
"name": "host_access_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"host_health_checks": {
|
|
"name": "host_health_checks",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"checks": {
|
|
"name": "checks",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"interval_seconds": {
|
|
"name": "interval_seconds",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 300
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_host_health_checks_user_host": {
|
|
"name": "idx_host_health_checks_user_host",
|
|
"columns": [
|
|
"user_id",
|
|
"host_id"
|
|
],
|
|
"isUnique": true
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"host_health_checks_user_id_users_id_fk": {
|
|
"name": "host_health_checks_user_id_users_id_fk",
|
|
"tableFrom": "host_health_checks",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"host_health_checks_host_id_ssh_data_id_fk": {
|
|
"name": "host_health_checks_host_id_ssh_data_id_fk",
|
|
"tableFrom": "host_health_checks",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"host_health_checks_id": {
|
|
"name": "host_health_checks_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"host_health_history": {
|
|
"name": "host_health_history",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"check_id": {
|
|
"name": "check_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"ts": {
|
|
"name": "ts",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"ok": {
|
|
"name": "ok",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"latency_ms": {
|
|
"name": "latency_ms",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"detail": {
|
|
"name": "detail",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"host_health_history_user_id_users_id_fk": {
|
|
"name": "host_health_history_user_id_users_id_fk",
|
|
"tableFrom": "host_health_history",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"host_health_history_host_id_ssh_data_id_fk": {
|
|
"name": "host_health_history_host_id_ssh_data_id_fk",
|
|
"tableFrom": "host_health_history",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"host_health_history_id": {
|
|
"name": "host_health_history_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"host_metrics_history": {
|
|
"name": "host_metrics_history",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"ts": {
|
|
"name": "ts",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"cpu_percent": {
|
|
"name": "cpu_percent",
|
|
"type": "double",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"mem_percent": {
|
|
"name": "mem_percent",
|
|
"type": "double",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"disk_percent": {
|
|
"name": "disk_percent",
|
|
"type": "double",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"net_rx_bytes": {
|
|
"name": "net_rx_bytes",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"net_tx_bytes": {
|
|
"name": "net_tx_bytes",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"host_metrics_history_host_id_ssh_data_id_fk": {
|
|
"name": "host_metrics_history_host_id_ssh_data_id_fk",
|
|
"tableFrom": "host_metrics_history",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"host_metrics_history_id": {
|
|
"name": "host_metrics_history_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"host_metrics_preferences": {
|
|
"name": "host_metrics_preferences",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"layout": {
|
|
"name": "layout",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_host_metrics_prefs_user_host": {
|
|
"name": "idx_host_metrics_prefs_user_host",
|
|
"columns": [
|
|
"user_id",
|
|
"host_id"
|
|
],
|
|
"isUnique": true
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"host_metrics_preferences_user_id_users_id_fk": {
|
|
"name": "host_metrics_preferences_user_id_users_id_fk",
|
|
"tableFrom": "host_metrics_preferences",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"host_metrics_preferences_host_id_ssh_data_id_fk": {
|
|
"name": "host_metrics_preferences_host_id_ssh_data_id_fk",
|
|
"tableFrom": "host_metrics_preferences",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"host_metrics_preferences_id": {
|
|
"name": "host_metrics_preferences_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"ssh_data": {
|
|
"name": "ssh_data",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"connection_type": {
|
|
"name": "connection_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "('ssh')"
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"ip": {
|
|
"name": "ip",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"port": {
|
|
"name": "port",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"username": {
|
|
"name": "username",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"folder": {
|
|
"name": "folder",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"tags": {
|
|
"name": "tags",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"pin": {
|
|
"name": "pin",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"auth_type": {
|
|
"name": "auth_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"use_warpgate": {
|
|
"name": "use_warpgate",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"force_keyboard_interactive": {
|
|
"name": "force_keyboard_interactive",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"password": {
|
|
"name": "password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"key": {
|
|
"name": "key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"key_password": {
|
|
"name": "key_password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"key_type": {
|
|
"name": "key_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sudo_password": {
|
|
"name": "sudo_password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"autostart_password": {
|
|
"name": "autostart_password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"autostart_key": {
|
|
"name": "autostart_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"autostart_key_password": {
|
|
"name": "autostart_key_password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"credential_id": {
|
|
"name": "credential_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"override_credential_username": {
|
|
"name": "override_credential_username",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"vault_profile_id": {
|
|
"name": "vault_profile_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"enable_terminal": {
|
|
"name": "enable_terminal",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"enable_session_logging": {
|
|
"name": "enable_session_logging",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"allow_session_sharing": {
|
|
"name": "allow_session_sharing",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"enable_command_history": {
|
|
"name": "enable_command_history",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"enable_tunnel": {
|
|
"name": "enable_tunnel",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"tunnel_connections": {
|
|
"name": "tunnel_connections",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"jump_hosts": {
|
|
"name": "jump_hosts",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"enable_file_manager": {
|
|
"name": "enable_file_manager",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"scp_legacy": {
|
|
"name": "scp_legacy",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"enable_docker": {
|
|
"name": "enable_docker",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"enable_tmux_monitor": {
|
|
"name": "enable_tmux_monitor",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"show_terminal_in_sidebar": {
|
|
"name": "show_terminal_in_sidebar",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"show_file_manager_in_sidebar": {
|
|
"name": "show_file_manager_in_sidebar",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"show_tunnel_in_sidebar": {
|
|
"name": "show_tunnel_in_sidebar",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"show_docker_in_sidebar": {
|
|
"name": "show_docker_in_sidebar",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"show_server_stats_in_sidebar": {
|
|
"name": "show_server_stats_in_sidebar",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"default_path": {
|
|
"name": "default_path",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"stats_config": {
|
|
"name": "stats_config",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"docker_config": {
|
|
"name": "docker_config",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"enable_proxmox": {
|
|
"name": "enable_proxmox",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"proxmox_config": {
|
|
"name": "proxmox_config",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"terminal_config": {
|
|
"name": "terminal_config",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"quick_actions": {
|
|
"name": "quick_actions",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"notes": {
|
|
"name": "notes",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"enable_ssh": {
|
|
"name": "enable_ssh",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"enable_rdp": {
|
|
"name": "enable_rdp",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"enable_vnc": {
|
|
"name": "enable_vnc",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"enable_telnet": {
|
|
"name": "enable_telnet",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"ssh_port": {
|
|
"name": "ssh_port",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": 22
|
|
},
|
|
"rdp_port": {
|
|
"name": "rdp_port",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": 3389
|
|
},
|
|
"vnc_port": {
|
|
"name": "vnc_port",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": 5900
|
|
},
|
|
"telnet_port": {
|
|
"name": "telnet_port",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": 23
|
|
},
|
|
"rdp_credential_id": {
|
|
"name": "rdp_credential_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"rdp_user": {
|
|
"name": "rdp_user",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"rdp_password": {
|
|
"name": "rdp_password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"rdp_domain": {
|
|
"name": "rdp_domain",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"rdp_security": {
|
|
"name": "rdp_security",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"rdp_ignore_cert": {
|
|
"name": "rdp_ignore_cert",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"vnc_credential_id": {
|
|
"name": "vnc_credential_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"vnc_password": {
|
|
"name": "vnc_password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"vnc_user": {
|
|
"name": "vnc_user",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"telnet_user": {
|
|
"name": "telnet_user",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"telnet_password": {
|
|
"name": "telnet_password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"telnet_credential_id": {
|
|
"name": "telnet_credential_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"rdp_auth_type": {
|
|
"name": "rdp_auth_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"vnc_auth_type": {
|
|
"name": "vnc_auth_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"telnet_auth_type": {
|
|
"name": "telnet_auth_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"domain": {
|
|
"name": "domain",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"security": {
|
|
"name": "security",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"ignore_cert": {
|
|
"name": "ignore_cert",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"guacamole_config": {
|
|
"name": "guacamole_config",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"use_socks5": {
|
|
"name": "use_socks5",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"socks5_host": {
|
|
"name": "socks5_host",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"socks5_port": {
|
|
"name": "socks5_port",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"socks5_username": {
|
|
"name": "socks5_username",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"socks5_password": {
|
|
"name": "socks5_password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"socks5_proxy_chain": {
|
|
"name": "socks5_proxy_chain",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"connection_origin": {
|
|
"name": "connection_origin",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"mac_address": {
|
|
"name": "mac_address",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"wol_broadcast_address": {
|
|
"name": "wol_broadcast_address",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"port_knock_sequence": {
|
|
"name": "port_knock_sequence",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"host_key_fingerprint": {
|
|
"name": "host_key_fingerprint",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"host_key_type": {
|
|
"name": "host_key_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"host_key_algorithm": {
|
|
"name": "host_key_algorithm",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "('sha256')"
|
|
},
|
|
"host_key_first_seen": {
|
|
"name": "host_key_first_seen",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"host_key_last_verified": {
|
|
"name": "host_key_last_verified",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"host_key_changed_count": {
|
|
"name": "host_key_changed_count",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"sync_id": {
|
|
"name": "sync_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"ssh_data_user_id_users_id_fk": {
|
|
"name": "ssh_data_user_id_users_id_fk",
|
|
"tableFrom": "ssh_data",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"ssh_data_credential_id_ssh_credentials_id_fk": {
|
|
"name": "ssh_data_credential_id_ssh_credentials_id_fk",
|
|
"tableFrom": "ssh_data",
|
|
"tableTo": "ssh_credentials",
|
|
"columnsFrom": [
|
|
"credential_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"ssh_data_vault_profile_id_vault_profiles_id_fk": {
|
|
"name": "ssh_data_vault_profile_id_vault_profiles_id_fk",
|
|
"tableFrom": "ssh_data",
|
|
"tableTo": "vault_profiles",
|
|
"columnsFrom": [
|
|
"vault_profile_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"ssh_data_rdp_credential_id_ssh_credentials_id_fk": {
|
|
"name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk",
|
|
"tableFrom": "ssh_data",
|
|
"tableTo": "ssh_credentials",
|
|
"columnsFrom": [
|
|
"rdp_credential_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"ssh_data_vnc_credential_id_ssh_credentials_id_fk": {
|
|
"name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk",
|
|
"tableFrom": "ssh_data",
|
|
"tableTo": "ssh_credentials",
|
|
"columnsFrom": [
|
|
"vnc_credential_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"ssh_data_telnet_credential_id_ssh_credentials_id_fk": {
|
|
"name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk",
|
|
"tableFrom": "ssh_data",
|
|
"tableTo": "ssh_credentials",
|
|
"columnsFrom": [
|
|
"telnet_credential_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"ssh_data_id": {
|
|
"name": "ssh_data_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"ssh_data_sync_id_unique": {
|
|
"name": "ssh_data_sync_id_unique",
|
|
"columns": [
|
|
"sync_id"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"network_topology": {
|
|
"name": "network_topology",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"topology": {
|
|
"name": "topology",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"network_topology_user_id_users_id_fk": {
|
|
"name": "network_topology_user_id_users_id_fk",
|
|
"tableFrom": "network_topology",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"network_topology_id": {
|
|
"name": "network_topology_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"notification_channels": {
|
|
"name": "notification_channels",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"config": {
|
|
"name": "config",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"notification_channels_user_id_users_id_fk": {
|
|
"name": "notification_channels_user_id_users_id_fk",
|
|
"tableFrom": "notification_channels",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"notification_channels_id": {
|
|
"name": "notification_channels_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"opkssh_tokens": {
|
|
"name": "opkssh_tokens",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"ssh_cert": {
|
|
"name": "ssh_cert",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"private_key": {
|
|
"name": "private_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"email": {
|
|
"name": "email",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sub": {
|
|
"name": "sub",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"issuer": {
|
|
"name": "issuer",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"audience": {
|
|
"name": "audience",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"last_used": {
|
|
"name": "last_used",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_opkssh_tokens_user_host": {
|
|
"name": "idx_opkssh_tokens_user_host",
|
|
"columns": [
|
|
"user_id",
|
|
"host_id"
|
|
],
|
|
"isUnique": true
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"opkssh_tokens_user_id_users_id_fk": {
|
|
"name": "opkssh_tokens_user_id_users_id_fk",
|
|
"tableFrom": "opkssh_tokens",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"opkssh_tokens_host_id_ssh_data_id_fk": {
|
|
"name": "opkssh_tokens_host_id_ssh_data_id_fk",
|
|
"tableFrom": "opkssh_tokens",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"opkssh_tokens_id": {
|
|
"name": "opkssh_tokens_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"recent_activity": {
|
|
"name": "recent_activity",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_name": {
|
|
"name": "host_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"timestamp": {
|
|
"name": "timestamp",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"recent_activity_user_id_users_id_fk": {
|
|
"name": "recent_activity_user_id_users_id_fk",
|
|
"tableFrom": "recent_activity",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"recent_activity_host_id_ssh_data_id_fk": {
|
|
"name": "recent_activity_host_id_ssh_data_id_fk",
|
|
"tableFrom": "recent_activity",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"recent_activity_id": {
|
|
"name": "recent_activity_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"roles": {
|
|
"name": "roles",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"display_name": {
|
|
"name": "display_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"is_system": {
|
|
"name": "is_system",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"permissions": {
|
|
"name": "permissions",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"roles_id": {
|
|
"name": "roles_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"roles_name_unique": {
|
|
"name": "roles_name_unique",
|
|
"columns": [
|
|
"name"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"session_recordings": {
|
|
"name": "session_recordings",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"username": {
|
|
"name": "username",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"access_id": {
|
|
"name": "access_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"started_at": {
|
|
"name": "started_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"ended_at": {
|
|
"name": "ended_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"duration": {
|
|
"name": "duration",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"commands": {
|
|
"name": "commands",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"dangerous_actions": {
|
|
"name": "dangerous_actions",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"recording_path": {
|
|
"name": "recording_path",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"protocol": {
|
|
"name": "protocol",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'ssh'"
|
|
},
|
|
"format": {
|
|
"name": "format",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "('text')"
|
|
},
|
|
"terminated_by_owner": {
|
|
"name": "terminated_by_owner",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"termination_reason": {
|
|
"name": "termination_reason",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"session_recordings_host_id_ssh_data_id_fk": {
|
|
"name": "session_recordings_host_id_ssh_data_id_fk",
|
|
"tableFrom": "session_recordings",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"session_recordings_user_id_users_id_fk": {
|
|
"name": "session_recordings_user_id_users_id_fk",
|
|
"tableFrom": "session_recordings",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
},
|
|
"session_recordings_access_id_host_access_id_fk": {
|
|
"name": "session_recordings_access_id_host_access_id_fk",
|
|
"tableFrom": "session_recordings",
|
|
"tableTo": "host_access",
|
|
"columnsFrom": [
|
|
"access_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"session_recordings_id": {
|
|
"name": "session_recordings_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"session_share_participants": {
|
|
"name": "session_share_participants",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"share_id": {
|
|
"name": "share_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"guest_label": {
|
|
"name": "guest_label",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"joined_at": {
|
|
"name": "joined_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"left_at": {
|
|
"name": "left_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"session_share_participants_share_id_session_shares_id_fk": {
|
|
"name": "session_share_participants_share_id_session_shares_id_fk",
|
|
"tableFrom": "session_share_participants",
|
|
"tableTo": "session_shares",
|
|
"columnsFrom": [
|
|
"share_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"session_share_participants_user_id_users_id_fk": {
|
|
"name": "session_share_participants_user_id_users_id_fk",
|
|
"tableFrom": "session_share_participants",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"session_share_participants_id": {
|
|
"name": "session_share_participants_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"session_shares": {
|
|
"name": "session_shares",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"owner_user_id": {
|
|
"name": "owner_user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"protocol": {
|
|
"name": "protocol",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"session_id": {
|
|
"name": "session_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"tab_instance_id": {
|
|
"name": "tab_instance_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"share_type": {
|
|
"name": "share_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"target_user_id": {
|
|
"name": "target_user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"link_token": {
|
|
"name": "link_token",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"permission_level": {
|
|
"name": "permission_level",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "('read-only')"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"revoked_at": {
|
|
"name": "revoked_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"last_joined_at": {
|
|
"name": "last_joined_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"join_count": {
|
|
"name": "join_count",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"session_shares_host_id_ssh_data_id_fk": {
|
|
"name": "session_shares_host_id_ssh_data_id_fk",
|
|
"tableFrom": "session_shares",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"session_shares_owner_user_id_users_id_fk": {
|
|
"name": "session_shares_owner_user_id_users_id_fk",
|
|
"tableFrom": "session_shares",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"owner_user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"session_shares_target_user_id_users_id_fk": {
|
|
"name": "session_shares_target_user_id_users_id_fk",
|
|
"tableFrom": "session_shares",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"target_user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"session_shares_id": {
|
|
"name": "session_shares_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"session_shares_link_token_unique": {
|
|
"name": "session_shares_link_token_unique",
|
|
"columns": [
|
|
"link_token"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"sessions": {
|
|
"name": "sessions",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"jwt_token": {
|
|
"name": "jwt_token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"device_type": {
|
|
"name": "device_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"device_info": {
|
|
"name": "device_info",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"oidc_sub": {
|
|
"name": "oidc_sub",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"oidc_sid": {
|
|
"name": "oidc_sid",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sso_provider_id": {
|
|
"name": "sso_provider_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"last_active_at": {
|
|
"name": "last_active_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"sessions_user_id_users_id_fk": {
|
|
"name": "sessions_user_id_users_id_fk",
|
|
"tableFrom": "sessions",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"sessions_id": {
|
|
"name": "sessions_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"settings": {
|
|
"name": "settings",
|
|
"columns": {
|
|
"key": {
|
|
"name": "key",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"value": {
|
|
"name": "value",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"settings_key": {
|
|
"name": "settings_key",
|
|
"columns": [
|
|
"key"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"shared_host_secrets": {
|
|
"name": "shared_host_secrets",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"host_access_id": {
|
|
"name": "host_access_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"target_user_id": {
|
|
"name": "target_user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"protocol": {
|
|
"name": "protocol",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'ssh'"
|
|
},
|
|
"source_type": {
|
|
"name": "source_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "('credential')"
|
|
},
|
|
"original_credential_id": {
|
|
"name": "original_credential_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"encrypted_username": {
|
|
"name": "encrypted_username",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"encrypted_auth_type": {
|
|
"name": "encrypted_auth_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"encrypted_password": {
|
|
"name": "encrypted_password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"encrypted_key": {
|
|
"name": "encrypted_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"encrypted_key_password": {
|
|
"name": "encrypted_key_password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"encrypted_key_type": {
|
|
"name": "encrypted_key_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"encrypted_domain": {
|
|
"name": "encrypted_domain",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_shared_host_secrets_scope": {
|
|
"name": "idx_shared_host_secrets_scope",
|
|
"columns": [
|
|
"host_access_id",
|
|
"target_user_id",
|
|
"protocol"
|
|
],
|
|
"isUnique": true
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"shared_host_secrets_host_access_id_host_access_id_fk": {
|
|
"name": "shared_host_secrets_host_access_id_host_access_id_fk",
|
|
"tableFrom": "shared_host_secrets",
|
|
"tableTo": "host_access",
|
|
"columnsFrom": [
|
|
"host_access_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"shared_host_secrets_target_user_id_users_id_fk": {
|
|
"name": "shared_host_secrets_target_user_id_users_id_fk",
|
|
"tableFrom": "shared_host_secrets",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"target_user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"shared_host_secrets_original_credential_id_ssh_credentials_id_fk": {
|
|
"name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk",
|
|
"tableFrom": "shared_host_secrets",
|
|
"tableTo": "ssh_credentials",
|
|
"columnsFrom": [
|
|
"original_credential_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"shared_host_secrets_id": {
|
|
"name": "shared_host_secrets_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"snippet_access": {
|
|
"name": "snippet_access",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"snippet_id": {
|
|
"name": "snippet_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"role_id": {
|
|
"name": "role_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"granted_by": {
|
|
"name": "granted_by",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"permission_level": {
|
|
"name": "permission_level",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "('view')"
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"snippet_access_snippet_id_snippets_id_fk": {
|
|
"name": "snippet_access_snippet_id_snippets_id_fk",
|
|
"tableFrom": "snippet_access",
|
|
"tableTo": "snippets",
|
|
"columnsFrom": [
|
|
"snippet_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"snippet_access_user_id_users_id_fk": {
|
|
"name": "snippet_access_user_id_users_id_fk",
|
|
"tableFrom": "snippet_access",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"snippet_access_role_id_roles_id_fk": {
|
|
"name": "snippet_access_role_id_roles_id_fk",
|
|
"tableFrom": "snippet_access",
|
|
"tableTo": "roles",
|
|
"columnsFrom": [
|
|
"role_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"snippet_access_granted_by_users_id_fk": {
|
|
"name": "snippet_access_granted_by_users_id_fk",
|
|
"tableFrom": "snippet_access",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"granted_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"snippet_access_id": {
|
|
"name": "snippet_access_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"snippet_folders": {
|
|
"name": "snippet_folders",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"color": {
|
|
"name": "color",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"icon": {
|
|
"name": "icon",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sync_id": {
|
|
"name": "sync_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"snippet_folders_user_id_users_id_fk": {
|
|
"name": "snippet_folders_user_id_users_id_fk",
|
|
"tableFrom": "snippet_folders",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"snippet_folders_id": {
|
|
"name": "snippet_folders_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"snippet_folders_sync_id_unique": {
|
|
"name": "snippet_folders_sync_id_unique",
|
|
"columns": [
|
|
"sync_id"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"snippets": {
|
|
"name": "snippets",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"content": {
|
|
"name": "content",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"folder": {
|
|
"name": "folder",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"order": {
|
|
"name": "order",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"sync_id": {
|
|
"name": "sync_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"host_filter": {
|
|
"name": "host_filter",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"snippets_user_id_users_id_fk": {
|
|
"name": "snippets_user_id_users_id_fk",
|
|
"tableFrom": "snippets",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"snippets_id": {
|
|
"name": "snippets_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"snippets_sync_id_unique": {
|
|
"name": "snippets_sync_id_unique",
|
|
"columns": [
|
|
"sync_id"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"ssh_credential_usage": {
|
|
"name": "ssh_credential_usage",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"credential_id": {
|
|
"name": "credential_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"used_at": {
|
|
"name": "used_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"ssh_credential_usage_credential_id_ssh_credentials_id_fk": {
|
|
"name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk",
|
|
"tableFrom": "ssh_credential_usage",
|
|
"tableTo": "ssh_credentials",
|
|
"columnsFrom": [
|
|
"credential_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"ssh_credential_usage_host_id_ssh_data_id_fk": {
|
|
"name": "ssh_credential_usage_host_id_ssh_data_id_fk",
|
|
"tableFrom": "ssh_credential_usage",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"ssh_credential_usage_user_id_users_id_fk": {
|
|
"name": "ssh_credential_usage_user_id_users_id_fk",
|
|
"tableFrom": "ssh_credential_usage",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"ssh_credential_usage_id": {
|
|
"name": "ssh_credential_usage_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"ssh_credentials": {
|
|
"name": "ssh_credentials",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"folder": {
|
|
"name": "folder",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"tags": {
|
|
"name": "tags",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"auth_type": {
|
|
"name": "auth_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"username": {
|
|
"name": "username",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"password": {
|
|
"name": "password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"key": {
|
|
"name": "key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"private_key": {
|
|
"name": "private_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"public_key": {
|
|
"name": "public_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"key_password": {
|
|
"name": "key_password",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"key_type": {
|
|
"name": "key_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"detected_key_type": {
|
|
"name": "detected_key_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"cert_public_key": {
|
|
"name": "cert_public_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"usage_count": {
|
|
"name": "usage_count",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"last_used": {
|
|
"name": "last_used",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sync_id": {
|
|
"name": "sync_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"ssh_credentials_user_id_users_id_fk": {
|
|
"name": "ssh_credentials_user_id_users_id_fk",
|
|
"tableFrom": "ssh_credentials",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"ssh_credentials_id": {
|
|
"name": "ssh_credentials_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"ssh_credentials_sync_id_unique": {
|
|
"name": "ssh_credentials_sync_id_unique",
|
|
"columns": [
|
|
"sync_id"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"ssh_folders": {
|
|
"name": "ssh_folders",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"color": {
|
|
"name": "color",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"icon": {
|
|
"name": "icon",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"credential_id": {
|
|
"name": "credential_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sync_id": {
|
|
"name": "sync_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"ssh_folders_user_id_users_id_fk": {
|
|
"name": "ssh_folders_user_id_users_id_fk",
|
|
"tableFrom": "ssh_folders",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"ssh_folders_credential_id_ssh_credentials_id_fk": {
|
|
"name": "ssh_folders_credential_id_ssh_credentials_id_fk",
|
|
"tableFrom": "ssh_folders",
|
|
"tableTo": "ssh_credentials",
|
|
"columnsFrom": [
|
|
"credential_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"ssh_folders_id": {
|
|
"name": "ssh_folders_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"ssh_folders_sync_id_unique": {
|
|
"name": "ssh_folders_sync_id_unique",
|
|
"columns": [
|
|
"sync_id"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"sso_providers": {
|
|
"name": "sso_providers",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"display_order": {
|
|
"name": "display_order",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"config": {
|
|
"name": "config",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"sso_providers_id": {
|
|
"name": "sso_providers_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"sync_tombstones": {
|
|
"name": "sync_tombstones",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"entity_type": {
|
|
"name": "entity_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"sync_id": {
|
|
"name": "sync_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"sync_tombstones_user_id_users_id_fk": {
|
|
"name": "sync_tombstones_user_id_users_id_fk",
|
|
"tableFrom": "sync_tombstones",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"sync_tombstones_id": {
|
|
"name": "sync_tombstones_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"termix_identities": {
|
|
"name": "termix_identities",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"handle": {
|
|
"name": "handle",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"termix_identities_user_id_users_id_fk": {
|
|
"name": "termix_identities_user_id_users_id_fk",
|
|
"tableFrom": "termix_identities",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"termix_identities_id": {
|
|
"name": "termix_identities_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"termix_identities_user_id_unique": {
|
|
"name": "termix_identities_user_id_unique",
|
|
"columns": [
|
|
"user_id"
|
|
]
|
|
},
|
|
"termix_identities_handle_unique": {
|
|
"name": "termix_identities_handle_unique",
|
|
"columns": [
|
|
"handle"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"termix_identity_ca": {
|
|
"name": "termix_identity_ca",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"identity_id": {
|
|
"name": "identity_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"public_key": {
|
|
"name": "public_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"private_key": {
|
|
"name": "private_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"validity_days": {
|
|
"name": "validity_days",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 90
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"termix_identity_ca_identity_id_termix_identities_id_fk": {
|
|
"name": "termix_identity_ca_identity_id_termix_identities_id_fk",
|
|
"tableFrom": "termix_identity_ca",
|
|
"tableTo": "termix_identities",
|
|
"columnsFrom": [
|
|
"identity_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"termix_identity_ca_user_id_users_id_fk": {
|
|
"name": "termix_identity_ca_user_id_users_id_fk",
|
|
"tableFrom": "termix_identity_ca",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"termix_identity_ca_id": {
|
|
"name": "termix_identity_ca_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"termix_identity_ca_identity_id_unique": {
|
|
"name": "termix_identity_ca_identity_id_unique",
|
|
"columns": [
|
|
"identity_id"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"termix_identity_keys": {
|
|
"name": "termix_identity_keys",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"identity_id": {
|
|
"name": "identity_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"public_key": {
|
|
"name": "public_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"key_type": {
|
|
"name": "key_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"algorithm": {
|
|
"name": "algorithm",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"label": {
|
|
"name": "label",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"comment": {
|
|
"name": "comment",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"source": {
|
|
"name": "source",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "('manual')"
|
|
},
|
|
"credential_id": {
|
|
"name": "credential_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"enabled": {
|
|
"name": "enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"termix_identity_keys_identity_id_termix_identities_id_fk": {
|
|
"name": "termix_identity_keys_identity_id_termix_identities_id_fk",
|
|
"tableFrom": "termix_identity_keys",
|
|
"tableTo": "termix_identities",
|
|
"columnsFrom": [
|
|
"identity_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"termix_identity_keys_user_id_users_id_fk": {
|
|
"name": "termix_identity_keys_user_id_users_id_fk",
|
|
"tableFrom": "termix_identity_keys",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"termix_identity_keys_credential_id_ssh_credentials_id_fk": {
|
|
"name": "termix_identity_keys_credential_id_ssh_credentials_id_fk",
|
|
"tableFrom": "termix_identity_keys",
|
|
"tableTo": "ssh_credentials",
|
|
"columnsFrom": [
|
|
"credential_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"termix_identity_keys_id": {
|
|
"name": "termix_identity_keys_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"tmux_session_tags": {
|
|
"name": "tmux_session_tags",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"session_name": {
|
|
"name": "session_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"tag": {
|
|
"name": "tag",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"tmux_session_tags_user_id_users_id_fk": {
|
|
"name": "tmux_session_tags_user_id_users_id_fk",
|
|
"tableFrom": "tmux_session_tags",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"tmux_session_tags_host_id_ssh_data_id_fk": {
|
|
"name": "tmux_session_tags_host_id_ssh_data_id_fk",
|
|
"tableFrom": "tmux_session_tags",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"tmux_session_tags_id": {
|
|
"name": "tmux_session_tags_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"transfer_recent": {
|
|
"name": "transfer_recent",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"source_host_id": {
|
|
"name": "source_host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"dest_host_id": {
|
|
"name": "dest_host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"dest_path": {
|
|
"name": "dest_path",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"dest_path_label": {
|
|
"name": "dest_path_label",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"last_used": {
|
|
"name": "last_used",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"transfer_recent_user_id_users_id_fk": {
|
|
"name": "transfer_recent_user_id_users_id_fk",
|
|
"tableFrom": "transfer_recent",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"transfer_recent_source_host_id_ssh_data_id_fk": {
|
|
"name": "transfer_recent_source_host_id_ssh_data_id_fk",
|
|
"tableFrom": "transfer_recent",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"source_host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"transfer_recent_dest_host_id_ssh_data_id_fk": {
|
|
"name": "transfer_recent_dest_host_id_ssh_data_id_fk",
|
|
"tableFrom": "transfer_recent",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"dest_host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"transfer_recent_id": {
|
|
"name": "transfer_recent_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"trusted_devices": {
|
|
"name": "trusted_devices",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"device_fingerprint": {
|
|
"name": "device_fingerprint",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"device_type": {
|
|
"name": "device_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"device_info": {
|
|
"name": "device_info",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"last_used_at": {
|
|
"name": "last_used_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"trusted_devices_user_id_users_id_fk": {
|
|
"name": "trusted_devices_user_id_users_id_fk",
|
|
"tableFrom": "trusted_devices",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"trusted_devices_id": {
|
|
"name": "trusted_devices_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"user_open_tabs": {
|
|
"name": "user_open_tabs",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"tab_type": {
|
|
"name": "tab_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"host_id": {
|
|
"name": "host_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"label": {
|
|
"name": "label",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"tab_order": {
|
|
"name": "tab_order",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"backend_session_id": {
|
|
"name": "backend_session_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"user_open_tabs_user_id_users_id_fk": {
|
|
"name": "user_open_tabs_user_id_users_id_fk",
|
|
"tableFrom": "user_open_tabs",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"user_open_tabs_host_id_ssh_data_id_fk": {
|
|
"name": "user_open_tabs_host_id_ssh_data_id_fk",
|
|
"tableFrom": "user_open_tabs",
|
|
"tableTo": "ssh_data",
|
|
"columnsFrom": [
|
|
"host_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"user_open_tabs_id": {
|
|
"name": "user_open_tabs_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"user_preferences": {
|
|
"name": "user_preferences",
|
|
"columns": {
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"reopen_tabs_on_login": {
|
|
"name": "reopen_tabs_on_login",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"theme": {
|
|
"name": "theme",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"font_size": {
|
|
"name": "font_size",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"accent_color": {
|
|
"name": "accent_color",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"language": {
|
|
"name": "language",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"storage_mode": {
|
|
"name": "storage_mode",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"command_autocomplete": {
|
|
"name": "command_autocomplete",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"command_palette_enabled": {
|
|
"name": "command_palette_enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"show_host_tags": {
|
|
"name": "show_host_tags",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"host_tray_on_click": {
|
|
"name": "host_tray_on_click",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"pin_app_rail": {
|
|
"name": "pin_app_rail",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"expand_app_rail_on_hover": {
|
|
"name": "expand_app_rail_on_hover",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"folders_collapsed": {
|
|
"name": "folders_collapsed",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"confirm_snippet_execution": {
|
|
"name": "confirm_snippet_execution",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"disable_update_check": {
|
|
"name": "disable_update_check",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"confirm_tab_close": {
|
|
"name": "confirm_tab_close",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"hidden_rail_tabs": {
|
|
"name": "hidden_rail_tabs",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"compact_host_view": {
|
|
"name": "compact_host_view",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"status_color_scheme": {
|
|
"name": "status_color_scheme",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"custom_themes": {
|
|
"name": "custom_themes",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"custom_keybindings": {
|
|
"name": "custom_keybindings",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"user_preferences_user_id_users_id_fk": {
|
|
"name": "user_preferences_user_id_users_id_fk",
|
|
"tableFrom": "user_preferences",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"user_preferences_user_id": {
|
|
"name": "user_preferences_user_id",
|
|
"columns": [
|
|
"user_id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"user_roles": {
|
|
"name": "user_roles",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"role_id": {
|
|
"name": "role_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"granted_by": {
|
|
"name": "granted_by",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"granted_at": {
|
|
"name": "granted_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_user_roles_user_role": {
|
|
"name": "idx_user_roles_user_role",
|
|
"columns": [
|
|
"user_id",
|
|
"role_id"
|
|
],
|
|
"isUnique": true
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"user_roles_user_id_users_id_fk": {
|
|
"name": "user_roles_user_id_users_id_fk",
|
|
"tableFrom": "user_roles",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"user_roles_role_id_roles_id_fk": {
|
|
"name": "user_roles_role_id_roles_id_fk",
|
|
"tableFrom": "user_roles",
|
|
"tableTo": "roles",
|
|
"columnsFrom": [
|
|
"role_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"user_roles_granted_by_users_id_fk": {
|
|
"name": "user_roles_granted_by_users_id_fk",
|
|
"tableFrom": "user_roles",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"granted_by"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "set null",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"user_roles_id": {
|
|
"name": "user_roles_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"users": {
|
|
"name": "users",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"username": {
|
|
"name": "username",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"password_hash": {
|
|
"name": "password_hash",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"is_admin": {
|
|
"name": "is_admin",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"is_oidc": {
|
|
"name": "is_oidc",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"oidc_identifier": {
|
|
"name": "oidc_identifier",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sso_provider_id": {
|
|
"name": "sso_provider_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"client_id": {
|
|
"name": "client_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"client_secret": {
|
|
"name": "client_secret",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"issuer_url": {
|
|
"name": "issuer_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"authorization_url": {
|
|
"name": "authorization_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"token_url": {
|
|
"name": "token_url",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"identifier_path": {
|
|
"name": "identifier_path",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"name_path": {
|
|
"name": "name_path",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"scopes": {
|
|
"name": "scopes",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false,
|
|
"default": "('openid email profile')"
|
|
},
|
|
"totp_secret": {
|
|
"name": "totp_secret",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"totp_enabled": {
|
|
"name": "totp_enabled",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"totp_backup_codes": {
|
|
"name": "totp_backup_codes",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"registered_at": {
|
|
"name": "registered_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"donation_modal_dismissed": {
|
|
"name": "donation_modal_dismissed",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"users_id": {
|
|
"name": "users_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"vault_profiles": {
|
|
"name": "vault_profiles",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"description": {
|
|
"name": "description",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"folder": {
|
|
"name": "folder",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"tags": {
|
|
"name": "tags",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"vault_addr": {
|
|
"name": "vault_addr",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"vault_namespace": {
|
|
"name": "vault_namespace",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"oidc_mount": {
|
|
"name": "oidc_mount",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"oidc_role": {
|
|
"name": "oidc_role",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"ssh_mount": {
|
|
"name": "ssh_mount",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"ssh_role": {
|
|
"name": "ssh_role",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"valid_principals": {
|
|
"name": "valid_principals",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"key_type": {
|
|
"name": "key_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"shared": {
|
|
"name": "shared",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"sync_id": {
|
|
"name": "sync_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"vault_profiles_user_id_users_id_fk": {
|
|
"name": "vault_profiles_user_id_users_id_fk",
|
|
"tableFrom": "vault_profiles",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"vault_profiles_id": {
|
|
"name": "vault_profiles_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {
|
|
"vault_profiles_sync_id_unique": {
|
|
"name": "vault_profiles_sync_id_unique",
|
|
"columns": [
|
|
"sync_id"
|
|
]
|
|
}
|
|
},
|
|
"checkConstraint": {}
|
|
},
|
|
"vault_tokens": {
|
|
"name": "vault_tokens",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": true
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"profile_id": {
|
|
"name": "profile_id",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"ssh_cert": {
|
|
"name": "ssh_cert",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"private_key": {
|
|
"name": "private_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"last_used": {
|
|
"name": "last_used",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {
|
|
"idx_vault_tokens_user_profile": {
|
|
"name": "idx_vault_tokens_user_profile",
|
|
"columns": [
|
|
"user_id",
|
|
"profile_id"
|
|
],
|
|
"isUnique": true
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"vault_tokens_user_id_users_id_fk": {
|
|
"name": "vault_tokens_user_id_users_id_fk",
|
|
"tableFrom": "vault_tokens",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
},
|
|
"vault_tokens_profile_id_vault_profiles_id_fk": {
|
|
"name": "vault_tokens_profile_id_vault_profiles_id_fk",
|
|
"tableFrom": "vault_tokens",
|
|
"tableTo": "vault_profiles",
|
|
"columnsFrom": [
|
|
"profile_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"vault_tokens_id": {
|
|
"name": "vault_tokens_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
},
|
|
"webauthn_credentials": {
|
|
"name": "webauthn_credentials",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "varchar(255)",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"credential_id": {
|
|
"name": "credential_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"public_key": {
|
|
"name": "public_key",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"counter": {
|
|
"name": "counter",
|
|
"type": "int",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"device_type": {
|
|
"name": "device_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"backed_up": {
|
|
"name": "backed_up",
|
|
"type": "boolean",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"transports": {
|
|
"name": "transports",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"user_verification": {
|
|
"name": "user_verification",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "('preferred')"
|
|
},
|
|
"created_at": {
|
|
"name": "created_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "(CURRENT_TIMESTAMP)"
|
|
},
|
|
"last_used_at": {
|
|
"name": "last_used_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {
|
|
"webauthn_credentials_user_id_users_id_fk": {
|
|
"name": "webauthn_credentials_user_id_users_id_fk",
|
|
"tableFrom": "webauthn_credentials",
|
|
"tableTo": "users",
|
|
"columnsFrom": [
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id"
|
|
],
|
|
"onDelete": "cascade",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"webauthn_credentials_id": {
|
|
"name": "webauthn_credentials_id",
|
|
"columns": [
|
|
"id"
|
|
]
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraint": {}
|
|
}
|
|
},
|
|
"views": {},
|
|
"_meta": {
|
|
"schemas": {},
|
|
"tables": {},
|
|
"columns": {}
|
|
},
|
|
"internal": {
|
|
"tables": {},
|
|
"indexes": {}
|
|
}
|
|
} |