mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-29 01:09:15 +00:00
* postgres: modules structure (#5401) * postgres: schema, field conversions (#5430) * postgres: rework chat list pagination query (#5441) * prepare cabal for merge * restore cabal changes * simplexmq * postgres: implementation wip (tests don't pass) (#5481) * restore ios file * postgres: implementation - tests pass (#5487) * refactor DB options * refactor * line * style * style * refactor * $ * update simplexmq * constraintError * handleDBErrors * fix * remove param * Ok * case * case * case * comment --------- Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
33 lines
1.1 KiB
Haskell
33 lines
1.1 KiB
Haskell
{-# LANGUAGE QuasiQuotes #-}
|
|
|
|
module Simplex.Chat.Store.SQLite.Migrations.M20231019_indexes where
|
|
|
|
import Database.SQLite.Simple (Query)
|
|
import Database.SQLite.Simple.QQ (sql)
|
|
|
|
m20231019_indexes :: Query
|
|
m20231019_indexes =
|
|
[sql|
|
|
DROP INDEX idx_connections_conn_req_inv;
|
|
CREATE INDEX idx_connections_conn_req_inv ON connections(user_id, conn_req_inv);
|
|
|
|
DROP INDEX idx_groups_via_group_link_uri_hash;
|
|
CREATE INDEX idx_groups_via_group_link_uri_hash ON groups(user_id, via_group_link_uri_hash);
|
|
|
|
DROP INDEX idx_connections_via_contact_uri_hash;
|
|
CREATE INDEX idx_connections_via_contact_uri_hash ON connections(user_id, via_contact_uri_hash);
|
|
|]
|
|
|
|
down_m20231019_indexes :: Query
|
|
down_m20231019_indexes =
|
|
[sql|
|
|
DROP INDEX idx_connections_conn_req_inv;
|
|
CREATE INDEX idx_connections_conn_req_inv ON connections(conn_req_inv);
|
|
|
|
DROP INDEX idx_groups_via_group_link_uri_hash;
|
|
CREATE INDEX idx_groups_via_group_link_uri_hash ON groups(via_group_link_uri_hash);
|
|
|
|
DROP INDEX idx_connections_via_contact_uri_hash;
|
|
CREATE INDEX idx_connections_via_contact_uri_hash ON connections(via_contact_uri_hash);
|
|
|]
|