From 02cab25242f1d2bd2026843ebeb66d2ceef1e8d3 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Thu, 2 Apr 2026 14:54:05 -0400 Subject: [PATCH] indices --- .../sql/migrations/2026-04-02-083548-0000_characters/up.sql | 4 ++-- _database/sql/migrations_squashed/characters/characters.sql | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_database/sql/migrations/2026-04-02-083548-0000_characters/up.sql b/_database/sql/migrations/2026-04-02-083548-0000_characters/up.sql index cece8e53f7..6676eb0140 100644 --- a/_database/sql/migrations/2026-04-02-083548-0000_characters/up.sql +++ b/_database/sql/migrations/2026-04-02-083548-0000_characters/up.sql @@ -13,7 +13,7 @@ CREATE TABLE characters ( token VARCHAR(32) NOT NULL, -- The type or "features" of the character. - character_type VARCHAR(32) DEFAULT NULL, + character_type VARCHAR(24) DEFAULT NULL, -- Whether the character has been fully created and is available for use. -- A character may exist in the database before its creation job completes. @@ -91,10 +91,10 @@ CREATE TABLE characters ( UNIQUE KEY (token), KEY index_character_type (character_type), KEY index_maybe_creator_user_token (maybe_creator_user_token), + KEY index_maybe_creator_user_token_active (maybe_creator_user_token, is_active), KEY index_is_active (is_active), KEY index_kinovi_character_id (kinovi_character_id), KEY index_maybe_generic_inference_job_token (maybe_generic_inference_job_token), - KEY index_maybe_kinovi_job_id (maybe_kinovi_job_id), KEY index_created_at (created_at), KEY index_deleted_at (deleted_at) diff --git a/_database/sql/migrations_squashed/characters/characters.sql b/_database/sql/migrations_squashed/characters/characters.sql index 4e2dea9c47..16f77f252b 100644 --- a/_database/sql/migrations_squashed/characters/characters.sql +++ b/_database/sql/migrations_squashed/characters/characters.sql @@ -16,7 +16,7 @@ CREATE TABLE characters ( token VARCHAR(32) NOT NULL, -- The type or "features" of the character. - character_type VARCHAR(32) DEFAULT NULL, + character_type VARCHAR(24) DEFAULT NULL, -- Whether the character has been fully created and is available for use. -- A character may exist in the database before its creation job completes. @@ -94,10 +94,10 @@ CREATE TABLE characters ( UNIQUE KEY (token), KEY index_character_type (character_type), KEY index_maybe_creator_user_token (maybe_creator_user_token), + KEY index_maybe_creator_user_token_active (maybe_creator_user_token, is_active), KEY index_is_active (is_active), KEY index_kinovi_character_id (kinovi_character_id), KEY index_maybe_generic_inference_job_token (maybe_generic_inference_job_token), - KEY index_maybe_kinovi_job_id (maybe_kinovi_job_id), KEY index_created_at (created_at), KEY index_deleted_at (deleted_at)