We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eacb4b1 commit e805f6aCopy full SHA for e805f6a
memory-store/migrations/000042_add_api_keys.up.sql
@@ -11,7 +11,7 @@ CREATE TABLE IF NOT EXISTS api_keys (
11
metadata JSONB DEFAULT '{}'::jsonb,
12
deleted_at TIMESTAMPTZ DEFAULT NULL,
13
CONSTRAINT pk_api_keys PRIMARY KEY (developer_id, api_key_id),
14
- CONSTRAINT uq_api_keys_unique UNIQUE(developer_id, name),
+ CONSTRAINT uq_api_keys_unique UNIQUE(developer_id, name) WHERE deleted_at IS NULL,
15
CONSTRAINT ct_api_keys_metadata_is_object CHECK (jsonb_typeof(metadata) = 'object'),
16
CONSTRAINT ct_api_keys_name_valid_identifier CHECK (name ~ '^[a-zA-Z][a-zA-Z0-9_]*$'),
17
CONSTRAINT fk_api_keys_developer FOREIGN KEY (developer_id) REFERENCES developers(developer_id)
0 commit comments