mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-03 11:12:06 +00:00
chore: bump simplexmq pin to 6843b14c
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Store.Postgres.Migrations.M20260604_simplex_name_profiles where
|
||||
|
||||
import Data.Text (Text)
|
||||
import Text.RawString.QQ (r)
|
||||
|
||||
m20260604_simplex_name_profiles :: Text
|
||||
m20260604_simplex_name_profiles =
|
||||
[r|
|
||||
ALTER TABLE contact_profiles ADD COLUMN simplex_name TEXT;
|
||||
ALTER TABLE group_profiles ADD COLUMN simplex_name TEXT;
|
||||
|
||||
CREATE UNIQUE INDEX idx_contact_profiles_simplex_name
|
||||
ON contact_profiles(user_id, simplex_name)
|
||||
WHERE simplex_name IS NOT NULL;
|
||||
|
||||
CREATE UNIQUE INDEX idx_group_profiles_simplex_name
|
||||
ON group_profiles(user_id, simplex_name)
|
||||
WHERE simplex_name IS NOT NULL;
|
||||
|]
|
||||
|
||||
down_m20260604_simplex_name_profiles :: Text
|
||||
down_m20260604_simplex_name_profiles =
|
||||
[r|
|
||||
DROP INDEX idx_group_profiles_simplex_name;
|
||||
DROP INDEX idx_contact_profiles_simplex_name;
|
||||
|
||||
ALTER TABLE group_profiles DROP COLUMN simplex_name;
|
||||
ALTER TABLE contact_profiles DROP COLUMN simplex_name;
|
||||
|]
|
||||
@@ -1,21 +0,0 @@
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Store.Postgres.Migrations.M20260606_simplex_name_verified where
|
||||
|
||||
import Data.Text (Text)
|
||||
import Text.RawString.QQ (r)
|
||||
|
||||
m20260606_simplex_name_verified :: Text
|
||||
m20260606_simplex_name_verified =
|
||||
[r|
|
||||
ALTER TABLE contacts ADD COLUMN simplex_name_verified_at TIMESTAMPTZ;
|
||||
ALTER TABLE groups ADD COLUMN simplex_name_verified_at TIMESTAMPTZ;
|
||||
|]
|
||||
|
||||
down_m20260606_simplex_name_verified :: Text
|
||||
down_m20260606_simplex_name_verified =
|
||||
[r|
|
||||
ALTER TABLE groups DROP COLUMN simplex_name_verified_at;
|
||||
ALTER TABLE contacts DROP COLUMN simplex_name_verified_at;
|
||||
|]
|
||||
@@ -1,23 +0,0 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Store.Postgres.Migrations.M20260612_smp_role_names where
|
||||
|
||||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
import Text.RawString.QQ (r)
|
||||
|
||||
m20260612_smp_role_names :: Text
|
||||
m20260612_smp_role_names =
|
||||
T.pack
|
||||
[r|
|
||||
ALTER TABLE server_operators ADD COLUMN smp_role_names SMALLINT NOT NULL DEFAULT 0;
|
||||
|
||||
UPDATE server_operators SET smp_role_names = 1 WHERE server_operator_tag = 'simplex';
|
||||
|]
|
||||
|
||||
down_m20260612_smp_role_names :: Text
|
||||
down_m20260612_smp_role_names =
|
||||
T.pack
|
||||
[r|
|
||||
ALTER TABLE server_operators DROP COLUMN smp_role_names;
|
||||
|]
|
||||
@@ -1,31 +0,0 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Store.SQLite.Migrations.M20260604_simplex_name_profiles where
|
||||
|
||||
import Database.SQLite.Simple (Query)
|
||||
import Database.SQLite.Simple.QQ (sql)
|
||||
|
||||
m20260604_simplex_name_profiles :: Query
|
||||
m20260604_simplex_name_profiles =
|
||||
[sql|
|
||||
ALTER TABLE contact_profiles ADD COLUMN simplex_name TEXT;
|
||||
ALTER TABLE group_profiles ADD COLUMN simplex_name TEXT;
|
||||
|
||||
CREATE UNIQUE INDEX idx_contact_profiles_simplex_name
|
||||
ON contact_profiles(user_id, simplex_name)
|
||||
WHERE simplex_name IS NOT NULL;
|
||||
|
||||
CREATE UNIQUE INDEX idx_group_profiles_simplex_name
|
||||
ON group_profiles(user_id, simplex_name)
|
||||
WHERE simplex_name IS NOT NULL;
|
||||
|]
|
||||
|
||||
down_m20260604_simplex_name_profiles :: Query
|
||||
down_m20260604_simplex_name_profiles =
|
||||
[sql|
|
||||
DROP INDEX idx_group_profiles_simplex_name;
|
||||
DROP INDEX idx_contact_profiles_simplex_name;
|
||||
|
||||
ALTER TABLE group_profiles DROP COLUMN simplex_name;
|
||||
ALTER TABLE contact_profiles DROP COLUMN simplex_name;
|
||||
|]
|
||||
@@ -1,26 +0,0 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Store.SQLite.Migrations.M20260606_simplex_name_verified where
|
||||
|
||||
import Database.SQLite.Simple (Query)
|
||||
import Database.SQLite.Simple.QQ (sql)
|
||||
|
||||
-- contacts.simplex_name_verified_at and groups.simplex_name_verified_at record
|
||||
-- the timestamp when the user last verified that the peer's claimed simplex_name
|
||||
-- resolves (via RSLV) to the link stored locally for the contact/group.
|
||||
-- NULL means the claim is unverified and the UI should show an indicator.
|
||||
-- The column is cleared back to NULL whenever the simplex_name claim changes
|
||||
-- (updateContactProfile / updateGroupProfile).
|
||||
m20260606_simplex_name_verified :: Query
|
||||
m20260606_simplex_name_verified =
|
||||
[sql|
|
||||
ALTER TABLE contacts ADD COLUMN simplex_name_verified_at TEXT;
|
||||
ALTER TABLE groups ADD COLUMN simplex_name_verified_at TEXT;
|
||||
|]
|
||||
|
||||
down_m20260606_simplex_name_verified :: Query
|
||||
down_m20260606_simplex_name_verified =
|
||||
[sql|
|
||||
ALTER TABLE groups DROP COLUMN simplex_name_verified_at;
|
||||
ALTER TABLE contacts DROP COLUMN simplex_name_verified_at;
|
||||
|]
|
||||
@@ -1,20 +0,0 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Store.SQLite.Migrations.M20260612_smp_role_names where
|
||||
|
||||
import Database.SQLite.Simple (Query)
|
||||
import Database.SQLite.Simple.QQ (sql)
|
||||
|
||||
m20260612_smp_role_names :: Query
|
||||
m20260612_smp_role_names =
|
||||
[sql|
|
||||
ALTER TABLE server_operators ADD COLUMN smp_role_names INTEGER NOT NULL DEFAULT 0;
|
||||
|
||||
UPDATE server_operators SET smp_role_names = 1 WHERE server_operator_tag = 'simplex';
|
||||
|]
|
||||
|
||||
down_m20260612_smp_role_names :: Query
|
||||
down_m20260612_smp_role_names =
|
||||
[sql|
|
||||
ALTER TABLE server_operators DROP COLUMN smp_role_names;
|
||||
|]
|
||||
Reference in New Issue
Block a user