diff --git a/ee/tabby-db/migrations/0023_user-completions-created-at-index.down.sql b/ee/tabby-db/migrations/0023_user-completions-created-at-index.down.sql new file mode 100644 index 000000000000..1db2af867680 --- /dev/null +++ b/ee/tabby-db/migrations/0023_user-completions-created-at-index.down.sql @@ -0,0 +1 @@ +DROP INDEX idx_user_completion_user_id_created_at_language; diff --git a/ee/tabby-db/migrations/0023_user-completions-created-at-index.up.sql b/ee/tabby-db/migrations/0023_user-completions-created-at-index.up.sql new file mode 100644 index 000000000000..7f1d88a84f7a --- /dev/null +++ b/ee/tabby-db/migrations/0023_user-completions-created-at-index.up.sql @@ -0,0 +1,2 @@ +DROP INDEX user_completions_user_id_language_idx; +CREATE INDEX idx_user_completion_user_id_created_at_language ON user_completions(user_id, created_at, language); diff --git a/ee/tabby-db/schema.sqlite b/ee/tabby-db/schema.sqlite index e7846cb398f0..2336d4b6ba79 100644 Binary files a/ee/tabby-db/schema.sqlite and b/ee/tabby-db/schema.sqlite differ diff --git a/ee/tabby-db/src/user_completions.rs b/ee/tabby-db/src/user_completions.rs index 639f7cf27e52..c8284d9c18c9 100644 --- a/ee/tabby-db/src/user_completions.rs +++ b/ee/tabby-db/src/user_completions.rs @@ -67,7 +67,6 @@ impl DbConn { Ok(()) } - // FIXME(boxbeam): index `created_at` in user_completions table. pub async fn compute_daily_stats_in_past_year( &self, users: Vec,