From 1e658f6a39d12dd7b74c08b24b6e9f4745a7130e Mon Sep 17 00:00:00 2001 From: SoXX Date: Mon, 14 Oct 2024 11:31:11 +0200 Subject: [PATCH] feat(database): added indexes - added index for UserFavorites --- pkg/database/migrations/002_indexes.sql | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 pkg/database/migrations/002_indexes.sql diff --git a/pkg/database/migrations/002_indexes.sql b/pkg/database/migrations/002_indexes.sql new file mode 100644 index 0000000..491e632 --- /dev/null +++ b/pkg/database/migrations/002_indexes.sql @@ -0,0 +1,3 @@ +-- +migrate Up +CREATE INDEX idx_user_post_deleted ON "UserFavorites"(user_id, deleted_at); +CREATE INDEX idx_created_at ON "UserFavorites"(created_at); \ No newline at end of file