on dev help sign in
fix tests
40fe11dEitan Chatav
squeal-postgresql/src/Squeal/PostgreSQL/Migration.hs+14−2
@@ -81,21 +81,33 @@ Rollback
81We can also create a simple executable using `defaultMain`.
81We can also create a simple executable using `defaultMain`.
82
82
83>>> let main = defaultMain "host=localhost port=5432 dbname=exampledb" migrations
83>>> let main = defaultMain "host=localhost port=5432 dbname=exampledb" migrations
84+
84>>> withArgs [] main
85>>> withArgs [] main
85Invalid command: "". Use:
86Invalid command: "". Use:
86migrate to run all available migrations
87migrate to run all available migrations
87rollback to rollback all available migrations
88rollback to rollback all available migrations
88status to display migrations run and migrations left to run
89status to display migrations run and migrations left to run
90+
89>>> withArgs ["status"] main
91>>> withArgs ["status"] main
90Migrations already run:
92Migrations already run:
91 None
93 None
92Migrations left to run:
94Migrations left to run:
93 - make users table
95 - make users table
94 - make emails table
96 - make emails table
97+
95>>> withArgs ["migrate"] main
98>>> withArgs ["migrate"] main
96−asdf
99+Migrations already run:
100+ - make users table
101+ - make emails table
102+Migrations left to run:
103+ None
104+
97>>> withArgs ["rollback"] main
105>>> withArgs ["rollback"] main
98−asdf
106+Migrations already run:
107+ None
108+Migrations left to run:
109+ - make users table
110+ - make emails table
99-}
111-}
100{-# LANGUAGE
112{-# LANGUAGE
101 DataKinds
113 DataKinds