Closed ian-ross closed 6 years ago
Huh. Didn't realise you had Travis set up for this. I'll get that working again before this is merged.
OK, looks good now. Sorry about that: it was because of the new haskell-src-exts dependency, which needs happy to compile, and more recent versions of GHC need a newer version of happy to be installed.
The idea here is that, instead of running individual migration scripts using
runghc
, it would be useful to create a single executable ahead of time that knows how to apply all the migrations for a project. This is useful for applications where it's not desirable to have a whole Haskell installation on the machines to which software is deployed. Doing a one-off build of the existing database migrations as part of the software deployment process alleviates this problem.As well as adding the migration compiler (accessed by running
pg_migrate compile
), this PR also reorganises things a little to fix some Cabal warnings (in particular,Data
andDatabase
are moved into asrc
directory to ensure that GHC picks up modules from thepostgresql-orm
package when compilingpg_migrate.hs
instead of trying to compile direct from the source for the modules imported bypg_migrate.hs
) and fixes a couple of compiler warnings.