Open s373r opened 1 month ago
The idx_account_token_name index is incorrectly supplied:
idx_account_token_name
CREATE TABLE access_tokens ( id CHAR(36) NOT NULL PRIMARY KEY, token_name VARCHAR(100) NOT NULL, token_hash BINARY(32) NOT NULL, created_at TIMESTAMP(6) NOT NULL, revoked_at TIMESTAMP(6), revoked_at_is_null BOOLEAN GENERATED ALWAYS AS (revoked_at IS NULL), account_id VARCHAR(100) NOT NULL REFERENCES accounts(id), UNIQUE KEY idx_account_token_name (account_id, token_name, revoked_at_is_null) );
In PostgreSQL, we have a similar index that provides us with the ability to have multiple revoked tokens and one active token (expected behavior) :
CREATE UNIQUE INDEX idx_access_tokens_account_id_token_name ON access_tokens(account_id, token_name) WHERE revoked_at IS NULL;
kamu-cli
MySQL error:
[23000][1062] (conn=11) Duplicate entry '1-token-name-0' for key 'idx_account_token_name'
No errors
-
No response
Describe the bug
The
idx_account_token_name
index is incorrectly supplied:In PostgreSQL, we have a similar index that provides us with the ability to have multiple revoked tokens and one active token (expected behavior) :
Steps To Reproduce
kamu-cli
with MySQL as databaseCurrent Behavior
MySQL error:
Expected Behavior
No errors
kamu system info
Logs
No response
Anything else?
No response