packages feed

dag-migrations-0.1.0.0 / src / Database / DagMigrations.hs

-- | Database migrations that form a directed acyclic graph, and that run-- in a monad that each project chooses.---- A project registers its migrations, validates them with 'validate',-- and runs them with 'migrate', through a t'Migrator' that holds an adapter-- for its database and an interpreter for its monad.---- A migration must give an acceptable result whatever later changes the-- project makes to the code that it calls, because the runner applies-- every migration to a new database with the code of the day of that run.-- So a migration either keeps its own copies of the application types and-- functions that it uses, or changes only existing rows, which a new-- database does not have, with a behavior of the current code that is-- acceptable for the databases that have them. The-- guide-- <https://github.com/nuttycom/dag-migrations/blob/canon/dag-migrations/docs/writing-haskell-migrations.md Writing Haskell migrations>-- has both patterns, and the choice of a monad for a project's migrations.module Database.DagMigrations  ( -- * Migrations    Migration (..),    hoistMigration,    Interpreter (..),    IdentifierCodec (..),    textIdentifiers,    Fingerprint (..),    -- * Validation    MigrationGraph,    validate,    registeredIdentifiers,    linearOrder,    -- * Planning    Target (..),    PlanOptions (..),    defaultPlanOptions,    Step (..),    Plan (..),    planIdentifiers,    plan,    checkFingerprints,    status,    -- * Running    Adapter,    Migrator (..),    RunSettings (..),    defaultRunSettings,    FingerprintPolicy (..),    migrate,    Inspection (..),    appliedSet,    inspect,    acceptFingerprints,    -- * Progress    Progress (..),    ProgressEvent (..),    TrackingVersion (..),    silentProgress,    -- * Errors    ValidationError (..),    PlanError (..),    FingerprintMismatch (..),    AcceptError (..),    Direction (..),    RunError (..),  )whereimport Database.DagMigrations.Adapter (Adapter)import Database.DagMigrations.Errorimport Database.DagMigrations.Graphimport Database.DagMigrations.Migrationimport Database.DagMigrations.Planimport Database.DagMigrations.Progressimport Database.DagMigrations.Run