From c463b9de92bbf0b2f18fdbe0f9c79fb1cf30fd40 Mon Sep 17 00:00:00 2001 From: Marc Scholten Date: Fri, 27 Aug 2021 16:19:07 +0200 Subject: [PATCH] New version number v0.14.0 --- Paths_ihp.hs | 2 +- UPGRADE.md | 36 ++++++++++++++++++++++++++++++++++++ ihp.cabal | 2 +- ihp.nix | 2 +- 4 files changed, 39 insertions(+), 3 deletions(-) diff --git a/Paths_ihp.hs b/Paths_ihp.hs index 6f000c422..394c32d8b 100644 --- a/Paths_ihp.hs +++ b/Paths_ihp.hs @@ -2,4 +2,4 @@ module Paths_ihp where import Data.Version -version = Version { versionBranch = [0, 13, 0], versionTags = [] } \ No newline at end of file +version = Version { versionBranch = [0, 14, 0], versionTags = [] } \ No newline at end of file diff --git a/UPGRADE.md b/UPGRADE.md index 6ebc3f195..bf6591dc8 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -2,6 +2,42 @@ This document describes breaking changes, as well as how to fix them, that have occured at given releases. After updating your project, please consult the segments from your current release until now. +# Upgrade to Beta 0.14.0 from Beta 0.13.1 + +## Switch IHP version + +Open `default.nix` and change the git commit in line 4 to the following: + +```diff +-ref = "refs/tags/v0.13.1"; ++ref = "refs/tags/v0.14.0"; +``` + +After that run the following command to update your project: + +```bash +make clean +nix-shell -j auto --cores 0 --run 'make -B .envrc' +make -B build/ihp-lib +``` + +Now you can start your project as usual with `./start`. + +## IHP Background Jobs + +IHP jobs now can be scheduled to run at a specific time with `runAt`. For that every table that acts as a job queue in your application needs to be migration. + +1. Create a new migration using `new-migration`. +2. For every table ending with `_jobs` do this: + ```sql + alter table $TABLE add column run_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() NOT NULL; + update $TABLE set run_at = created_at; + ``` + where `$TABLE` should be replaced with the jobs table. + + The line `update $TABLE set run_at = created_at;` sets the right `run_at` value for all existing jobs. + +After that apply this migration to all your IHP instances running on `v.0.14.0`. # Upgrade to Beta 0.13.1 from Beta 0.13.0 diff --git a/ihp.cabal b/ihp.cabal index 266cae693..22aa228e6 100644 --- a/ihp.cabal +++ b/ihp.cabal @@ -1,6 +1,6 @@ cabal-version: 2.2 name: ihp -version: 0.13.0 +version: 0.14.0 synopsis: Haskell Web Framework description: The Integrated Haskell Platform is a full stack framework focused on rapid application development while striving for robust code quality. license: NONE diff --git a/ihp.nix b/ihp.nix index 8b596a48e..1f8d65d61 100644 --- a/ihp.nix +++ b/ihp.nix @@ -62,7 +62,7 @@ }: mkDerivation { pname = "ihp"; - version = "v0.13.0"; + version = "v0.14.0"; src = (import { }).nix-gitignore.gitignoreSource [ ] ./.; isLibrary = true; isExecutable = true;