mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-12-25 10:03:07 +03:00
Fixed compile error from previous commit.
This commit is contained in:
parent
32bb439c53
commit
1f02809b3d
@ -7,21 +7,22 @@ import Control.Monad.IO.Class (liftIO)
|
|||||||
|
|
||||||
import StrongPath ((</>))
|
import StrongPath ((</>))
|
||||||
import Command (Command, CommandError(..))
|
import Command (Command, CommandError(..))
|
||||||
import Command.Common (findWaspProjectRootFromCwd, waspSays)
|
import Command.Common (findWaspProjectRootDirFromCwd, waspSaysC)
|
||||||
import qualified Common
|
import qualified Common
|
||||||
import qualified Generator.DbGenerator.Operations as DbOps
|
import qualified Generator.DbGenerator.Operations as DbOps
|
||||||
|
|
||||||
|
|
||||||
migrate :: String -> Command ()
|
migrate :: String -> Command ()
|
||||||
migrate migrationName = do
|
migrate migrationName = do
|
||||||
waspRootDir <- findWaspProjectRootFromCwd
|
waspRootDir <- findWaspProjectRootDirFromCwd
|
||||||
let genProjectRootDir = waspRootDir </> Common.dotWaspDirInWaspProjectDir </>
|
let genProjectRootDir = waspRootDir </> Common.dotWaspDirInWaspProjectDir </>
|
||||||
Common.generatedCodeDirInDotWaspDir
|
Common.generatedCodeDirInDotWaspDir
|
||||||
|
|
||||||
waspSays "Saving db migration..."
|
waspSaysC "Saving db migration..."
|
||||||
migrateSaveResult <- liftIO $ DbOps.migrateSave genProjectRootDir migrationName
|
migrateSaveResult <- liftIO $ DbOps.migrateSave genProjectRootDir migrationName
|
||||||
case migrateSaveResult of
|
case migrateSaveResult of
|
||||||
Left migrateSaveError -> throwError $ CommandError $ "Migrate save failed: " ++ migrateSaveError
|
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!"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user