1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-23 12:52:31 +03:00

Get rid of old 'Uid'

Nobody is going to do any migrations anyway
This commit is contained in:
Artyom 2017-01-31 00:49:18 +03:00
parent c7ae23838c
commit 5a1defbaf0
No known key found for this signature in database
GPG Key ID: B8E35A33FF522710

View File

@ -186,17 +186,7 @@ newtype Uid a = Uid {uidToText :: Text}
deriving (Eq, Ord, Show, PathPiece, T.Buildable, Hashable, A.ToJSON)
-- See Note [acid-state]
deriveSafeCopySimple 2 'extension ''Uid
newtype Uid_v1 a = Uid_v1 {uidToText_v1 :: Text}
-- TODO: at the next migration change this to deriveSafeCopySimple!
deriveSafeCopy 1 'base ''Uid_v1
instance SafeCopy a => Migrate (Uid a) where
type MigrateFrom (Uid a) = Uid_v1 a
migrate Uid_v1{..} = Uid {
uidToText = uidToText_v1 }
deriveSafeCopySimple 2 'base ''Uid
instance IsString (Uid a) where
fromString = Uid . T.pack