Safecopy migration for data type renaming

68 Views Asked by At

I'm working on the project which already have some migration history with libraries safecopy and safecopy-migrate. Currently the data type is

data Foo = Foo { bar :: String
               , baz :: String
               }

deriveSafeCopy 8 'extension ''Foo

changelog ''Foo (Current 8, Past 7) [
  Added "baz" [hs|mempty|]
  ]

deriveSafeCopy 7 'base ''Foo_v7

I would like just to rename data type name and constructor name

data NewFoo = NewFoo { bar :: String
                     , baz :: String
                     }

all other stuff is staying the same. What should I change to perform such migration?

0

There are 0 best solutions below