Browse Source

AI rule node: add index on tenant ID

pull/13371/head
Dmytro Skarzhynets 1 year ago
parent
commit
536f252b16
No known key found for this signature in database GPG Key ID: 2B51652F224037DF
  1. 6
      application/src/main/data/upgrade/basic/schema_update.sql
  2. 2
      dao/src/main/resources/sql/schema-entities-idx.sql

6
application/src/main/data/upgrade/basic/schema_update.sql

@ -60,7 +60,7 @@ WHERE trigger_type = 'RATE_LIMITS'
-- UPDATE NOTIFICATION RULE CASSANDRA RATE LIMITS END
-- CREATE AI MODEL SETTINGS TABLE START
-- CREATE AI MODEL SETTINGS TABLE AND INDEX START
CREATE TABLE ai_model_settings (
id UUID NOT NULL PRIMARY KEY,
@ -74,4 +74,6 @@ CREATE TABLE ai_model_settings (
CONSTRAINT ai_model_settings_external_id_unq_key UNIQUE (tenant_id, external_id)
);
-- CREATE AI MODEL SETTINGS TABLE END
CREATE INDEX idx_ai_model_settings_tenant_id ON ai_model_settings(tenant_id);
-- CREATE AI MODEL SETTINGS TABLE AND INDEX END

2
dao/src/main/resources/sql/schema-entities-idx.sql

@ -131,3 +131,5 @@ CREATE INDEX IF NOT EXISTS idx_resource_type_public_resource_key ON resource(res
CREATE INDEX IF NOT EXISTS mobile_app_bundle_tenant_id ON mobile_app_bundle(tenant_id);
CREATE INDEX IF NOT EXISTS idx_job_tenant_id ON job(tenant_id);
CREATE INDEX IF NOT EXISTS idx_ai_model_settings_tenant_id ON ai_model_settings(tenant_id);

Loading…
Cancel
Save