diff --git a/src/Vervis/Migration.hs b/src/Vervis/Migration.hs index 8cfe385..574a024 100644 --- a/src/Vervis/Migration.hs +++ b/src/Vervis/Migration.hs @@ -38,7 +38,7 @@ getDbSchemaVersion :: MonadIO m => ReaderT SqlBackend m (Maybe Int) getDbSchemaVersion = fmap schemaVersionNumber <$> get key setDbSchemaVersion :: MonadIO m => Int -> ReaderT SqlBackend m () -setDbSchemaVersion v = update key [SchemaVersionNumber =. v] +setDbSchemaVersion v = repsert key $ SchemaVersion v -- | Run the migration system. The second parameter is the list of migration -- actions in chronological order. The migration process is: