2022-03-01 23:00:51 +03:00
|
|
|
module Tests.WaspMigrateTest (waspMigrate) where
|
|
|
|
|
|
|
|
import GoldenTest (GoldenTest, makeGoldenTest)
|
|
|
|
import ShellCommands
|
2022-03-09 15:46:41 +03:00
|
|
|
( appendToWaspFile,
|
2022-03-01 23:00:51 +03:00
|
|
|
cdIntoCurrentProject,
|
|
|
|
waspCliCompile,
|
|
|
|
waspCliMigrate,
|
|
|
|
waspCliNew,
|
|
|
|
)
|
|
|
|
|
|
|
|
waspMigrate :: GoldenTest
|
|
|
|
waspMigrate = do
|
|
|
|
let entityDecl =
|
|
|
|
"entity Task {=psl \n\
|
|
|
|
\ id Int @id @default(autoincrement()) \n\
|
|
|
|
\ description String \n\
|
|
|
|
\ isDone Boolean @default(false) \n\
|
|
|
|
\ psl=} \n"
|
|
|
|
|
|
|
|
makeGoldenTest "waspMigrate" $
|
|
|
|
sequence
|
|
|
|
[ waspCliNew,
|
|
|
|
cdIntoCurrentProject,
|
|
|
|
waspCliCompile,
|
|
|
|
appendToWaspFile entityDecl,
|
2022-03-09 15:46:41 +03:00
|
|
|
waspCliMigrate "foo"
|
2022-03-01 23:00:51 +03:00
|
|
|
]
|