mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-09-17 03:45:05 +00:00
* smp protocol: short links types and other changes from RFC * add fields for queue link ID and data * create queue and ntf credentials with NEW command * all tests * simplfiy types, update rfc * update rfc * include SenderId in NEW request in case queue data is sent * store queue data and generate link ID if needed * update rfc * agent API and types * SMP commands and persistence for short links * SMP client functions for short links * agent client functions for short links * create rcv queue with short link (TODO secret_box) * encryption and encoding for link data, postgres client migration * test creating short link * get link and data, tests * comments * type signature
24 lines
976 B
Haskell
24 lines
976 B
Haskell
{-# LANGUAGE NamedFieldPuns #-}
|
|
|
|
module Simplex.Messaging.Agent.Store.Postgres.Migrations.App (appMigrations) where
|
|
|
|
import Data.List (sortOn)
|
|
import Data.Text (Text)
|
|
import Simplex.Messaging.Agent.Store.Postgres.Migrations.M20241210_initial
|
|
import Simplex.Messaging.Agent.Store.Postgres.Migrations.M20250203_msg_bodies
|
|
import Simplex.Messaging.Agent.Store.Postgres.Migrations.M20250322_short_links
|
|
import Simplex.Messaging.Agent.Store.Shared (Migration (..))
|
|
|
|
schemaMigrations :: [(String, Text, Maybe Text)]
|
|
schemaMigrations =
|
|
[ ("20241210_initial", m20241210_initial, Nothing),
|
|
("20250203_msg_bodies", m20250203_msg_bodies, Just down_m20250203_msg_bodies),
|
|
("20250322_short_links", m20250322_short_links, Just down_m20250322_short_links)
|
|
]
|
|
|
|
-- | The list of migrations in ascending order by date
|
|
appMigrations :: [Migration]
|
|
appMigrations = sortOn name $ map migration schemaMigrations
|
|
where
|
|
migration (name, up, down) = Migration {name, up, down = down}
|