diff --git a/simplex-chat.cabal b/simplex-chat.cabal index 31565a0367..aac942c6b3 100644 --- a/simplex-chat.cabal +++ b/simplex-chat.cabal @@ -141,7 +141,6 @@ library Simplex.Chat.Migrations.M20240313_drop_agent_ack_cmd_id Simplex.Chat.Migrations.M20240324_custom_data Simplex.Chat.Migrations.M20240402_item_forwarded - Simplex.Chat.Migrations.M20240419_enable_pq_support Simplex.Chat.Mobile Simplex.Chat.Mobile.File Simplex.Chat.Mobile.Shared diff --git a/src/Simplex/Chat/Migrations/M20240419_enable_pq_support.hs b/src/Simplex/Chat/Migrations/M20240419_enable_pq_support.hs deleted file mode 100644 index 5fab48c423..0000000000 --- a/src/Simplex/Chat/Migrations/M20240419_enable_pq_support.hs +++ /dev/null @@ -1,17 +0,0 @@ -{-# LANGUAGE QuasiQuotes #-} - -module Simplex.Chat.Migrations.M20240419_enable_pq_support where - -import Database.SQLite.Simple (Query) -import Database.SQLite.Simple.QQ (sql) - -m20240419_enable_pq_support :: Query -m20240419_enable_pq_support = - [sql| -UPDATE connections SET pq_support = 1 WHERE conn_type = 'contact'; -|] - -down_m20240419_enable_pq_support :: Query -down_m20240419_enable_pq_support = - [sql| -|] diff --git a/src/Simplex/Chat/Store/Migrations.hs b/src/Simplex/Chat/Store/Migrations.hs index 234ddfbd0a..7a3fb75da3 100644 --- a/src/Simplex/Chat/Store/Migrations.hs +++ b/src/Simplex/Chat/Store/Migrations.hs @@ -105,7 +105,6 @@ import Simplex.Chat.Migrations.M20240228_pq import Simplex.Chat.Migrations.M20240313_drop_agent_ack_cmd_id import Simplex.Chat.Migrations.M20240324_custom_data import Simplex.Chat.Migrations.M20240402_item_forwarded -import Simplex.Chat.Migrations.M20240419_enable_pq_support import Simplex.Messaging.Agent.Store.SQLite.Migrations (Migration (..)) schemaMigrations :: [(String, Query, Maybe Query)] @@ -210,8 +209,7 @@ schemaMigrations = ("20240228_pq", m20240228_pq, Just down_m20240228_pq), ("20240313_drop_agent_ack_cmd_id", m20240313_drop_agent_ack_cmd_id, Just down_m20240313_drop_agent_ack_cmd_id), ("20240324_custom_data", m20240324_custom_data, Just down_m20240324_custom_data), - ("20240402_item_forwarded", m20240402_item_forwarded, Just down_m20240402_item_forwarded), - ("20240419_enable_pq_support", m20240419_enable_pq_support, Just down_m20240419_enable_pq_support) + ("20240402_item_forwarded", m20240402_item_forwarded, Just down_m20240402_item_forwarded) ] -- | The list of migrations in ascending order by date diff --git a/tests/SchemaDump.hs b/tests/SchemaDump.hs index 8b0483c6d5..29813be0c3 100644 --- a/tests/SchemaDump.hs +++ b/tests/SchemaDump.hs @@ -50,13 +50,11 @@ testSchemaMigrations = withTmpFiles $ do whenM (doesFileExist testSchema) $ removeFile testSchema where testDownMigration st m = do - putStrLn $ "down migration " <> name m let downMigr = fromJust $ toDownMigration m schema <- getSchema testDB testSchema Migrations.run st $ MTRUp [m] schema' <- getSchema testDB testSchema - unless (name m `elem` skipComparisonForUpMigrations) $ - schema' `shouldNotBe` schema + schema' `shouldNotBe` schema Migrations.run st $ MTRDown [downMigr] unless (name m `elem` skipComparisonForDownMigrations) $ do schema'' <- getSchema testDB testSchema @@ -65,12 +63,6 @@ testSchemaMigrations = withTmpFiles $ do schema''' <- getSchema testDB testSchema schema''' `shouldBe` schema' -skipComparisonForUpMigrations :: [String] -skipComparisonForUpMigrations = - [ -- schema doesn't change - "20240419_enable_pq_support" - ] - skipComparisonForDownMigrations :: [String] skipComparisonForDownMigrations = [ -- on down migration msg_delivery_events table moves down to the end of the file