diff --git a/simplex-chat.cabal b/simplex-chat.cabal index 8e426c349e..109bfb13b7 100644 --- a/simplex-chat.cabal +++ b/simplex-chat.cabal @@ -161,7 +161,7 @@ library Simplex.Chat.Store.Postgres.Migrations.M20260720_server_roles Simplex.Chat.Store.Postgres.Migrations.M20260723_contact_request_rejection Simplex.Chat.Store.Postgres.Migrations.M20260731_user_badges - Simplex.Chat.Store.Postgres.Migrations.M20260806_wallet_seeds + Simplex.Chat.Store.Postgres.Migrations.M20260818_wallet_seeds else exposed-modules: Simplex.Chat.Archive @@ -333,7 +333,7 @@ library Simplex.Chat.Store.SQLite.Migrations.M20260720_server_roles Simplex.Chat.Store.SQLite.Migrations.M20260723_contact_request_rejection Simplex.Chat.Store.SQLite.Migrations.M20260731_user_badges - Simplex.Chat.Store.SQLite.Migrations.M20260806_wallet_seeds + Simplex.Chat.Store.SQLite.Migrations.M20260818_wallet_seeds other-modules: Paths_simplex_chat hs-source-dirs: diff --git a/src/Simplex/Chat/Store/Postgres/Migrations.hs b/src/Simplex/Chat/Store/Postgres/Migrations.hs index 214a9ee093..6392c829a6 100644 --- a/src/Simplex/Chat/Store/Postgres/Migrations.hs +++ b/src/Simplex/Chat/Store/Postgres/Migrations.hs @@ -46,7 +46,7 @@ import Simplex.Chat.Store.Postgres.Migrations.M20260715_profile_description import Simplex.Chat.Store.Postgres.Migrations.M20260716_signed_history import Simplex.Chat.Store.Postgres.Migrations.M20260720_server_roles import Simplex.Chat.Store.Postgres.Migrations.M20260723_contact_request_rejection -import Simplex.Chat.Store.Postgres.Migrations.M20260806_wallet_seeds +import Simplex.Chat.Store.Postgres.Migrations.M20260818_wallet_seeds import Simplex.Messaging.Agent.Store.Shared (Migration (..)) schemaMigrations :: [(String, Text, Maybe Text)] @@ -93,7 +93,7 @@ schemaMigrations = ("20260716_signed_history", m20260716_signed_history, Just down_m20260716_signed_history), ("20260720_server_roles", m20260720_server_roles, Just down_m20260720_server_roles), ("20260723_contact_request_rejection", m20260723_contact_request_rejection, Just down_m20260723_contact_request_rejection), - ("20260806_wallet_seeds", m20260806_wallet_seeds, Just down_m20260806_wallet_seeds) + ("20260818_wallet_seeds", m20260818_wallet_seeds, Just down_m20260818_wallet_seeds) ] -- | The list of migrations in ascending order by date diff --git a/src/Simplex/Chat/Store/Postgres/Migrations/M20260806_wallet_seeds.hs b/src/Simplex/Chat/Store/Postgres/Migrations/M20260818_wallet_seeds.hs similarity index 81% rename from src/Simplex/Chat/Store/Postgres/Migrations/M20260806_wallet_seeds.hs rename to src/Simplex/Chat/Store/Postgres/Migrations/M20260818_wallet_seeds.hs index 958c996ddb..4cc3b0024a 100644 --- a/src/Simplex/Chat/Store/Postgres/Migrations/M20260806_wallet_seeds.hs +++ b/src/Simplex/Chat/Store/Postgres/Migrations/M20260818_wallet_seeds.hs @@ -1,13 +1,13 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuasiQuotes #-} -module Simplex.Chat.Store.Postgres.Migrations.M20260806_wallet_seeds where +module Simplex.Chat.Store.Postgres.Migrations.M20260818_wallet_seeds where import Data.Text (Text) import Text.RawString.QQ (r) -m20260806_wallet_seeds :: Text -m20260806_wallet_seeds = +m20260818_wallet_seeds :: Text +m20260818_wallet_seeds = [r| CREATE TABLE wallet_seeds ( wallet_seed_id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, @@ -23,8 +23,8 @@ ALTER TABLE users ADD COLUMN wallet_account_index BIGINT; CREATE INDEX idx_users_wallet_seed_id ON users(wallet_seed_id); |] -down_m20260806_wallet_seeds :: Text -down_m20260806_wallet_seeds = +down_m20260818_wallet_seeds :: Text +down_m20260818_wallet_seeds = [r| DROP INDEX idx_users_wallet_seed_id; diff --git a/src/Simplex/Chat/Store/SQLite/Migrations.hs b/src/Simplex/Chat/Store/SQLite/Migrations.hs index deb1805b40..785b59ed72 100644 --- a/src/Simplex/Chat/Store/SQLite/Migrations.hs +++ b/src/Simplex/Chat/Store/SQLite/Migrations.hs @@ -169,7 +169,7 @@ import Simplex.Chat.Store.SQLite.Migrations.M20260715_profile_description import Simplex.Chat.Store.SQLite.Migrations.M20260716_signed_history import Simplex.Chat.Store.SQLite.Migrations.M20260720_server_roles import Simplex.Chat.Store.SQLite.Migrations.M20260723_contact_request_rejection -import Simplex.Chat.Store.SQLite.Migrations.M20260806_wallet_seeds +import Simplex.Chat.Store.SQLite.Migrations.M20260818_wallet_seeds import Simplex.Messaging.Agent.Store.Shared (Migration (..)) schemaMigrations :: [(String, Query, Maybe Query)] @@ -326,7 +326,7 @@ schemaMigrations = ("20260514_relay_request_group_link_index", m20260514_relay_request_group_link_index, Just down_m20260514_relay_request_group_link_index), ("20260515_public_group_access", m20260515_public_group_access, Just down_m20260515_public_group_access), ("20260516_supporter_badges", m20260516_supporter_badges, Just down_m20260516_supporter_badges), - ("20260806_wallet_seeds", m20260806_wallet_seeds, Just down_m20260806_wallet_seeds), + ("20260818_wallet_seeds", m20260818_wallet_seeds, Just down_m20260818_wallet_seeds), ("20260529_delivery_job_senders", m20260529_delivery_job_senders, Just down_m20260529_delivery_job_senders), ("20260530_client_services", m20260530_client_services, Just down_m20260530_client_services), ("20260531_member_removed_at", m20260531_member_removed_at, Just down_m20260531_member_removed_at), diff --git a/src/Simplex/Chat/Store/SQLite/Migrations/M20260806_wallet_seeds.hs b/src/Simplex/Chat/Store/SQLite/Migrations/M20260818_wallet_seeds.hs similarity index 87% rename from src/Simplex/Chat/Store/SQLite/Migrations/M20260806_wallet_seeds.hs rename to src/Simplex/Chat/Store/SQLite/Migrations/M20260818_wallet_seeds.hs index 8d93669f48..fc6e1ea98c 100644 --- a/src/Simplex/Chat/Store/SQLite/Migrations/M20260806_wallet_seeds.hs +++ b/src/Simplex/Chat/Store/SQLite/Migrations/M20260818_wallet_seeds.hs @@ -1,6 +1,6 @@ {-# LANGUAGE QuasiQuotes #-} -module Simplex.Chat.Store.SQLite.Migrations.M20260806_wallet_seeds where +module Simplex.Chat.Store.SQLite.Migrations.M20260818_wallet_seeds where import Database.SQLite.Simple (Query) import Database.SQLite.Simple.QQ (sql) @@ -10,8 +10,8 @@ import Database.SQLite.Simple.QQ (sql) -- The schema allows several seeds, with each chat profile bound to exactly one -- of them plus its own BIP-44 account index. Only the single-seed case is -- reachable today. -m20260806_wallet_seeds :: Query -m20260806_wallet_seeds = +m20260818_wallet_seeds :: Query +m20260818_wallet_seeds = [sql| CREATE TABLE wallet_seeds ( wallet_seed_id INTEGER PRIMARY KEY AUTOINCREMENT, @@ -30,8 +30,8 @@ ALTER TABLE users ADD COLUMN wallet_account_index INTEGER; CREATE INDEX idx_users_wallet_seed_id ON users(wallet_seed_id); |] -down_m20260806_wallet_seeds :: Query -down_m20260806_wallet_seeds = +down_m20260818_wallet_seeds :: Query +down_m20260818_wallet_seeds = [sql| DROP INDEX idx_users_wallet_seed_id;