Module

Droplet.Driver.Migration

Package
purescript-droplet
Repository
easafe/purescript-droplet

#Migration Source

type Migration = { down :: Connection -> Aff Unit, identifier :: String, up :: Connection -> Aff Unit }

Type for individual migrations

  • up performs a migration
  • down reverts a migration
  • identifier must be unique

#migrate Source

migrate :: Pool -> Array Migration -> Aff Unit

Runs migrations

All migrations run in a single transaction. Migrations that have already been run are skipped