n8n/docs/generated/sqlite-schema/oauth_user_consents.md
Ricardo Espinoza c3ca9a36da
feat(editor): Add scope selection to MCP OAuth consent screen (#33710)
Co-authored-by: Danny Martini <danny@n8n.io>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 13:21:14 +00:00

87 lines
2.7 KiB
Markdown

# oauth_user_consents
## Description
<details>
<summary><strong>Table Definition</strong></summary>
```sql
CREATE TABLE "oauth_user_consents" ("id" integer PRIMARY KEY NOT NULL, "userId" varchar NOT NULL, "clientId" varchar NOT NULL, "grantedAt" bigint NOT NULL, "scope" text NOT NULL, CONSTRAINT "UQ_083721d99ce8db4033e2958ebb4" UNIQUE ("userId", "clientId"), CONSTRAINT "FK_a651acea2f6c97f8c4514935486" FOREIGN KEY ("clientId") REFERENCES "oauth_clients" ("id") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT "FK_21e6c3c2d78a097478fae6aaefa" FOREIGN KEY ("userId") REFERENCES "user" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)
```
</details>
## Columns
| Name | Type | Default | Nullable | Children | Parents | Comment |
| ---- | ---- | ------- | -------- | -------- | ------- | ------- |
| clientId | varchar | | false | | [oauth_clients](oauth_clients.md) | |
| grantedAt | bigint | | false | | | |
| id | INTEGER | | false | | | |
| scope | TEXT | | false | | | |
| userId | varchar | | false | | [user](user.md) | |
## Constraints
| Name | Type | Definition |
| ---- | ---- | ---------- |
| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
| - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
| id | PRIMARY KEY | PRIMARY KEY (id) |
| sqlite_autoindex_oauth_user_consents_1 | UNIQUE | UNIQUE (userId, clientId) |
## Indexes
| Name | Definition |
| ---- | ---------- |
| sqlite_autoindex_oauth_user_consents_1 | UNIQUE (userId, clientId) |
## Relations
```mermaid
erDiagram
"oauth_user_consents" }o--|| "oauth_clients" : "FOREIGN KEY (clientId) REFERENCES oauth_clients (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
"oauth_user_consents" }o--|| "user" : "FOREIGN KEY (userId) REFERENCES user (id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE"
"oauth_user_consents" {
varchar clientId FK
bigint grantedAt
INTEGER id
TEXT scope
varchar userId FK
}
"oauth_clients" {
varchar_255_ clientSecret
bigint clientSecretExpiresAt
datetime_3_ createdAt
TEXT grantTypes
varchar id PK
varchar_255_ name
TEXT redirectUris
varchar_255_ tokenEndpointAuthMethod
datetime_3_ updatedAt
}
"user" {
datetime_3_ createdAt
boolean disabled
varchar_255_ email
varchar_32_ firstName
varchar id PK
date lastActiveAt
varchar_32_ lastName
boolean mfaEnabled
TEXT mfaRecoveryCodes
TEXT mfaSecret
varchar password
TEXT personalizationAnswers
varchar_128_ roleSlug FK
TEXT settings
datetime_3_ updatedAt
}
```
---
> Generated by [tbls](https://github.com/k1LoW/tbls)