From 0cb92743640939acdecc23b5dbd9d88178e2b699 Mon Sep 17 00:00:00 2001 From: gllm-dev Date: Thu, 12 Dec 2024 13:18:50 +0100 Subject: [PATCH] chore: add index on shld_external_users for external_user_id, provider_id, deleted_at --- CHANGELOG.md | 4 ++++ .../sql/migrations/20241212131601_new_indexes.sql | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 internal/adapters/repositories/sql/migrations/20241212131601_new_indexes.sql diff --git a/CHANGELOG.md b/CHANGELOG.md index 6989121..ca4ecb4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v0.1.25] +### Added +- Index on external users table + ## [v0.1.24] ### Added - Health check endpoint diff --git a/internal/adapters/repositories/sql/migrations/20241212131601_new_indexes.sql b/internal/adapters/repositories/sql/migrations/20241212131601_new_indexes.sql new file mode 100644 index 0000000..afd2374 --- /dev/null +++ b/internal/adapters/repositories/sql/migrations/20241212131601_new_indexes.sql @@ -0,0 +1,9 @@ +-- +goose Up +CREATE INDEX idx_external_user_provider_deleted ON shld_external_users (external_user_id, provider_id, deleted_at); +-- +goose StatementBegin +-- +goose StatementEnd + +-- +goose Down +DROP INDEX idx_external_user_provider_deleted ON shld_external_users; +-- +goose StatementBegin +-- +goose StatementEnd