From 125ca30fd9a5f91e5b39f6c9d232bfb1b4e4052c Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 1 Aug 2017 01:04:28 +0200 Subject: Install 'dbmigrations-sqlite' Use this for database migrations. Seems to be the right tool for database migrations in Haskell. Originally I had thought about doing it manually with 'up' and 'down' SQL files and some kind of Makefile or script to run them, but then realised that, of course, you have to keep track of which migration you're on, and figured, well, might want to outsource that to another program. I had originally written my migration in Mark Bates' pop/soda format, but will have to convert that for 'dbmigrations'. Thankfully got a little help from https://github.com/basti1302/elm-lang-de#development-setup on how to actually install the 'dbmigrations-sqlite' package using Stack. Put the installation command into a new "setup.sh" file to make it easily repeatable. Needed to add a bunch of lines to the `extra-deps` section of "stack.yaml" in order to be able to properly install the package. --- stack.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'stack.yaml') diff --git a/stack.yaml b/stack.yaml index 6cbacba..27a17ad 100644 --- a/stack.yaml +++ b/stack.yaml @@ -39,7 +39,12 @@ packages: - '.' # Dependency packages to be pulled from upstream that are not in the resolver # (e.g., acme-missiles-0.3) -extra-deps: [] +extra-deps: +- dbmigrations-2.0.0 +- dbmigrations-sqlite-2.0.0 +- HDBC-sqlite3-2.3.3.1 +- HsSyck-0.53 +- yaml-light-0.1.4 # Override default flag values for local packages and extra-deps flags: {} -- cgit v1.2.3