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. --- setup.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 setup.sh (limited to 'setup.sh') diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..0160a41 --- /dev/null +++ b/setup.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +set -e + +stack install dbmigrations-sqlite -- cgit v1.2.3