module Unison.Codebase.SqliteCodebase.Migrations.Helpers where import Unison.Sqlite qualified as Sqlite abortMigration :: String -> Sqlite.Transaction a abortMigration :: forall a. String -> Transaction a abortMigration String msg = do String -> Transaction a forall a. HasCallStack => String -> a error (String -> Transaction a) -> String -> Transaction a forall a b. (a -> b) -> a -> b $ [String] -> String unlines [ String "⚠️ " String -> String -> String forall a. Semigroup a => a -> a -> a <> String msg, String "", String "An unrecoverable error occurred, the migration has been aborted.", String "Please report this bug to https://github.com/unisonweb/unison/issues and include your migration output.", String "Downgrading to the previous UCM version will allow you to continue using your codebase while we investigate your issue." ]