diff --git a/waspc/cli/Command/Db/Migrate.hs b/waspc/cli/Command/Db/Migrate.hs index a660b599c..a031af075 100644 --- a/waspc/cli/Command/Db/Migrate.hs +++ b/waspc/cli/Command/Db/Migrate.hs @@ -7,21 +7,22 @@ import Control.Monad.IO.Class (liftIO) import StrongPath (()) import Command (Command, CommandError(..)) -import Command.Common (findWaspProjectRootFromCwd, waspSays) +import Command.Common (findWaspProjectRootDirFromCwd, waspSaysC) import qualified Common import qualified Generator.DbGenerator.Operations as DbOps + migrate :: String -> Command () migrate migrationName = do - waspRootDir <- findWaspProjectRootFromCwd + waspRootDir <- findWaspProjectRootDirFromCwd let genProjectRootDir = waspRootDir Common.dotWaspDirInWaspProjectDir Common.generatedCodeDirInDotWaspDir - waspSays "Saving db migration..." + waspSaysC "Saving db migration..." migrateSaveResult <- liftIO $ DbOps.migrateSave genProjectRootDir migrationName case migrateSaveResult of Left migrateSaveError -> throwError $ CommandError $ "Migrate save failed: " ++ migrateSaveError - Right () -> waspSays "Migration has been successfully saved." + Right () -> waspSaysC "Migration has been successfully saved." - waspSays "All done!" + waspSaysC "All done!"