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:
parent
c7ae23838c
commit
5a1defbaf0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user