In persistent models for migrations, suffix the names of uniques too

This commit is contained in:
fr33domlover 2019-05-25 03:20:01 +00:00
parent 5479c99e1c
commit d77877eba5

View file

@ -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
}