fix shared-db tenant runtime gaps
This commit is contained in:
+2
-1
@@ -166,6 +166,7 @@ CREATE TABLE IF NOT EXISTS tinode.im_system_notifications (
|
||||
|
||||
CREATE TABLE IF NOT EXISTS tinode.im_http_idempotency (
|
||||
id BIGINT NOT NULL AUTO_INCREMENT,
|
||||
tenant_id BIGINT NOT NULL DEFAULT 0,
|
||||
user_id BIGINT NOT NULL,
|
||||
method VARCHAR(8) NOT NULL,
|
||||
route VARCHAR(512) NOT NULL,
|
||||
@@ -178,7 +179,7 @@ CREATE TABLE IF NOT EXISTS tinode.im_http_idempotency (
|
||||
created_at DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
updated_at DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE INDEX uk_im_http_idempotency_scope (user_id, method, route, idempotency_key),
|
||||
UNIQUE INDEX uk_im_http_idempotency_scope (tenant_id, user_id, method, route, idempotency_key),
|
||||
INDEX idx_im_http_idempotency_expiry (expires_at)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user