mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-23 02:12:25 +00:00
migration
This commit is contained in:
1 file changed
+7
-6
@@ -1,13 +1,14 @@
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Store.Postgres.Migrations.M20260516_supporter_badges where
|
||||
|
||||
import Database.PostgreSQL.Simple (Query)
|
||||
import Database.PostgreSQL.Simple.SqlQQ (sql)
|
||||
import Data.Text (Text)
|
||||
import Text.RawString.QQ (r)
|
||||
|
||||
m20260516_supporter_badges :: Query
|
||||
m20260516_supporter_badges :: Text
|
||||
m20260516_supporter_badges =
|
||||
[sql|
|
||||
[r|
|
||||
ALTER TABLE contact_profiles ADD COLUMN badge_proof BYTEA;
|
||||
ALTER TABLE contact_profiles ADD COLUMN badge_pres_header BYTEA;
|
||||
ALTER TABLE contact_profiles ADD COLUMN badge_expiry TEXT;
|
||||
@@ -15,9 +16,9 @@ ALTER TABLE contact_profiles ADD COLUMN badge_type TEXT;
|
||||
ALTER TABLE contact_profiles ADD COLUMN badge_verified SMALLINT NOT NULL DEFAULT 0;
|
||||
|]
|
||||
|
||||
down_m20260516_supporter_badges :: Query
|
||||
down_m20260516_supporter_badges :: Text
|
||||
down_m20260516_supporter_badges =
|
||||
[sql|
|
||||
[r|
|
||||
ALTER TABLE contact_profiles DROP COLUMN badge_verified;
|
||||
ALTER TABLE contact_profiles DROP COLUMN badge_type;
|
||||
ALTER TABLE contact_profiles DROP COLUMN badge_proof;
|
||||
|
||||
Reference in new issue
Block a user