n8n/docs/generated/sqlite-schema/execution_quota_usage.md
Guillaume Jacquart 2ad6721e94
feat(core): Add execution ledger for quotas and usage counting (no-changelog)
Add an append-only execution ledger with one fold task every 5 seconds.
Participants fold claimed rows in one transaction: workflow statistics,
execution quota usage, and Insights hourly buckets.

Add hard execution quotas per workflow and project. An atomic Redis or
memory counter admits a run, and the started row commits with the
execution row. Postgres and SQLite are both supported.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 00:46:13 +02:00

1.4 KiB
Generated

execution_quota_usage

Description

Table Definition
CREATE TABLE "execution_quota_usage" (
				"scopeType" varchar(16) NOT NULL CHECK ("scopeType" IN ('workflow', 'project')),
				"scopeId" varchar(36) NOT NULL,
				"day" date NOT NULL,
				"used" bigint NOT NULL,
				PRIMARY KEY ("scopeType", "scopeId", "day")
			)

Columns

Name Type Default Nullable Children Parents Comment
day date false
scopeId varchar(36) false
scopeType varchar(16) false
used bigint false

Constraints

Name Type Definition
- CHECK CHECK ("scopeType" IN ('workflow', 'project'))
day PRIMARY KEY PRIMARY KEY (day)
scopeId PRIMARY KEY PRIMARY KEY (scopeId)
scopeType PRIMARY KEY PRIMARY KEY (scopeType)
sqlite_autoindex_execution_quota_usage_1 PRIMARY KEY PRIMARY KEY (scopeType, scopeId, day)

Indexes

Name Definition
sqlite_autoindex_execution_quota_usage_1 PRIMARY KEY (scopeType, scopeId, day)

Relations

erDiagram


"execution_quota_usage" {
  date day PK
  varchar_36_ scopeId PK
  varchar_16_ scopeType PK
  bigint used
}

Generated by tbls