From 87eb5ab7628ddc524d1f48cd61faccd17ed2353e Mon Sep 17 00:00:00 2001
From: Ben Sima <ben@bsima.me>
Date: Mon, 22 Feb 2021 20:28:19 -0500
Subject: Add note about persisted data types

---
 Biz/Devalloc.hs | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'Biz/Devalloc.hs')

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)
-- 
cgit v1.2.3