mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-23 00:02:28 +00:00
Merge branch 'master' into chat-relays
This commit is contained in:
commit
75c2bf920e
81 files changed
+4670
-983
No files matched your search
@@ -16,7 +16,7 @@ CREATE TABLE connections_sync(
|
||||
last_sync_ts TIMESTAMPTZ
|
||||
);
|
||||
|
||||
INSERT INTO connections_sync (connections_sync_id, should_sync, last_sync_ts) VALUES (1,0,NULL);
|
||||
INSERT INTO connections_sync (connections_sync_id, should_sync, last_sync_ts) VALUES (1, 1, NULL);
|
||||
|]
|
||||
|
||||
down_m20251007_connections_sync :: Text
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Store.Postgres.Migrations.M20251017_chat_tags_cascade where
|
||||
|
||||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
import Text.RawString.QQ (r)
|
||||
|
||||
m20251017_chat_tags_cascade :: Text
|
||||
m20251017_chat_tags_cascade =
|
||||
T.pack
|
||||
[r|
|
||||
ALTER TABLE chat_tags DROP CONSTRAINT chat_tags_user_id_fkey;
|
||||
|
||||
ALTER TABLE chat_tags
|
||||
ADD CONSTRAINT chat_tags_user_id_fkey
|
||||
FOREIGN KEY (user_id)
|
||||
REFERENCES users(user_id)
|
||||
ON DELETE CASCADE;
|
||||
|]
|
||||
|
||||
down_m20251017_chat_tags_cascade :: Text
|
||||
down_m20251017_chat_tags_cascade =
|
||||
T.pack
|
||||
[r|
|
||||
ALTER TABLE chat_tags DROP CONSTRAINT chat_tags_user_id_fkey;
|
||||
|
||||
ALTER TABLE chat_tags
|
||||
ADD CONSTRAINT chat_tags_user_id_fkey
|
||||
FOREIGN KEY (user_id)
|
||||
REFERENCES users(user_id);
|
||||
|]
|
||||
+5
-5
@@ -1,13 +1,13 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Store.Postgres.Migrations.M20251016_chat_relays where
|
||||
module Simplex.Chat.Store.Postgres.Migrations.M20251018_chat_relays where
|
||||
|
||||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
import Text.RawString.QQ (r)
|
||||
|
||||
m20251016_chat_relays :: Text
|
||||
m20251016_chat_relays =
|
||||
m20251018_chat_relays :: Text
|
||||
m20251018_chat_relays =
|
||||
T.pack
|
||||
[r|
|
||||
CREATE TABLE chat_relays(
|
||||
@@ -32,8 +32,8 @@ ALTER TABLE users ADD COLUMN is_user_chat_relay SMALLINT NOT NULL DEFAULT 0;
|
||||
ALTER TABLE group_members ADD COLUMN is_chat_relay SMALLINT NOT NULL DEFAULT 0;
|
||||
|]
|
||||
|
||||
down_m20251016_chat_relays :: Text
|
||||
down_m20251016_chat_relays =
|
||||
down_m20251018_chat_relays :: Text
|
||||
down_m20251018_chat_relays =
|
||||
T.pack
|
||||
[r|
|
||||
ALTER TABLE group_members DROP COLUMN is_chat_relay;
|
||||
@@ -2479,7 +2479,7 @@ ALTER TABLE ONLY test_chat_schema.chat_tags_chats
|
||||
|
||||
|
||||
ALTER TABLE ONLY test_chat_schema.chat_tags
|
||||
ADD CONSTRAINT chat_tags_user_id_fkey FOREIGN KEY (user_id) REFERENCES test_chat_schema.users(user_id);
|
||||
ADD CONSTRAINT chat_tags_user_id_fkey FOREIGN KEY (user_id) REFERENCES test_chat_schema.users(user_id) ON DELETE CASCADE;
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user