diff options
author | Ben Sima <ben@bsima.me> | 2021-02-22 20:28:19 -0500 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2021-02-22 20:28:19 -0500 |
commit | 87eb5ab7628ddc524d1f48cd61faccd17ed2353e (patch) | |
tree | b03c1eb44251876b3df840bdb213f02a733360a7 /Biz | |
parent | bb69bce04e4ead0eb6a867a982eb57fd855ff1ad (diff) |
Add note about persisted data types
Diffstat (limited to 'Biz')
-rw-r--r-- | Biz/Devalloc.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Biz/Devalloc.hs b/Biz/Devalloc.hs index 3fdbdfa..f0d8883 100644 --- a/Biz/Devalloc.hs +++ b/Biz/Devalloc.hs @@ -118,8 +118,11 @@ import qualified Web.FormUrlEncoded as Web -- This must go first because of template haskell splicing. -- --- When changing a persisted type T, first make `T0 == T`, then make the --- `SafeCopy.Migrate T` class compile, then make changes to `T`. +-- When changing a persisted type `T`, first copy the type `T == T0`, then make +-- the `SafeCopy.Migrate T` class compile, then make changes to `T`. If you +-- don't, there will be a runtime exception when you try to start the new +-- service. I'm not sure how to guard against this, except maybe run a test +-- deployment by copying a database backup locally, or something. newtype UserEmail = UserEmail {unUserEmail :: Maybe Text} deriving (Eq, Ord, Data, Typeable, Generic, Show) |