n8n/docs/generated/sqlite-schema/credential_dependency.md
Arvin Ansari 912c63ebca
feat(core): Add a description field to credentials (no-changelog)
Add a nullable `description` column to the credential entity and accept it
on the internal credentials API. A user can now record what a credential is
for and where it belongs.

The column is `text`. The 512-character cap lives in `@n8n/api-types` and
applies in the DTO and the entity validator. A later reader must agree its
truncation limit with this cap.

The value is trimmed on write. A blank value is stored as `null`.

The migration uses a raw `ALTER TABLE`. Several tables hold cascading
foreign keys to `credentials_entity`, so the SQLite table recreation that
`addColumns` triggers would delete their rows.

The public API contract is unchanged.
2026-09-16 14:13:40 +02:00

2.5 KiB
Generated

credential_dependency

Description

Table Definition
CREATE TABLE "credential_dependency" ("id" integer PRIMARY KEY NOT NULL, "credentialId" varchar(36) NOT NULL, "dependencyType" varchar(64) NOT NULL, "dependencyId" varchar(255) NOT NULL, "createdAt" datetime(3) NOT NULL DEFAULT (STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW')), CONSTRAINT "FK_5ec8e8c8d3539f3696cf73b43bf" FOREIGN KEY ("credentialId") REFERENCES "credentials_entity" ("id") ON DELETE CASCADE)

Columns

Name Type Default Nullable Children Parents Comment
createdAt datetime(3) STRFTIME('%Y-%m-%d %H:%M:%f', 'NOW') false
credentialId varchar(36) false credentials_entity
dependencyId varchar(255) false
dependencyType varchar(64) false
id INTEGER false

Constraints

Name Type Definition
- (Foreign key ID: 0) FOREIGN KEY FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE
id PRIMARY KEY PRIMARY KEY (id)

Indexes

Name Definition
IDX_5ec8e8c8d3539f3696cf73b43b CREATE INDEX "IDX_5ec8e8c8d3539f3696cf73b43b" ON "credential_dependency" ("credentialId")
IDX_91ee85fa9619dd6776725e117b CREATE INDEX "IDX_91ee85fa9619dd6776725e117b" ON "credential_dependency" ("dependencyType", "dependencyId")
IDX_credential_dependency_credentialId_dependencyType_dependencyId CREATE UNIQUE INDEX "IDX_credential_dependency_credentialId_dependencyType_dependencyId" ON "credential_dependency" ("credentialId", "dependencyType", "dependencyId")

Relations

erDiagram

"credential_dependency" }o--|| "credentials_entity" : "FOREIGN KEY (credentialId) REFERENCES credentials_entity (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"

"credential_dependency" {
  datetime_3_ createdAt
  varchar_36_ credentialId FK
  varchar_255_ dependencyId
  varchar_64_ dependencyType
  INTEGER id
}
"credentials_entity" {
  datetime_3_ createdAt
  TEXT data
  TEXT description
  varchar_36_ id PK
  boolean isGlobal
  boolean isManaged
  boolean isResolvable
  varchar_128_ name
  boolean resolvableAllowFallback
  varchar_16_ resolverId FK
  varchar_32_ type
  datetime_3_ updatedAt
  VARCHAR_16_ usageScope
}

Generated by tbls