@@ -81,21 +81,33 @@ Rollback
81We can also create a simple executable using `defaultMain`.
81We can also create a simple executable using `defaultMain`.
83>>> let main = defaultMain "host=localhost port=5432 dbname=exampledb" migrations
83>>> let main = defaultMain "host=localhost port=5432 dbname=exampledb" migrations
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
89>>> withArgs ["status"] main
91>>> withArgs ["status"] main
90Migrations already run:
92Migrations already run:
92Migrations left to run:
94Migrations left to run:
93 - make users table
95 - make users table
94 - make emails table
96 - make emails table
95>>> withArgs ["migrate"] main
98>>> withArgs ["migrate"] main
96−asdf
99+Migrations already run:
102+Migrations left to run:
97>>> withArgs ["rollback"] main
105>>> withArgs ["rollback"] main
98−asdf
106+Migrations already run:
108+Migrations left to run:
100{-# LANGUAGE
112{-# LANGUAGE
101 DataKinds
113 DataKinds