From d77877eba5ab6c91c8cc9f9044cf3de474dc5a3b Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Sat, 25 May 2019 03:20:01 +0000 Subject: [PATCH] In persistent models for migrations, suffix the names of uniques too --- src/Vervis/Model/TH.hs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Vervis/Model/TH.hs b/src/Vervis/Model/TH.hs index 6ad7f06..55007a8 100644 --- a/src/Vervis/Model/TH.hs +++ b/src/Vervis/Model/TH.hs @@ -109,10 +109,15 @@ append entnames suffix entity = { foreignRefTableHaskell = updateEnt $ foreignRefTableHaskell f } + updateUnique u = u + { uniqueHaskell = updateName $ uniqueHaskell u + } + in entity { entityHaskell = updateName $ entityHaskell entity , entityId = updateField $ entityId entity , entityFields = map updateField $ entityFields entity + , entityUniques = map updateUnique $ entityUniques entity , entityForeigns = map updateForeign $ entityForeigns entity }