yesodweb / yesodweb/persistent
Allow customization of the Haskell name
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 486
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
This popped up at work. We have a database table that is being replicated across two databases. Converting that table to mpsGeneric would be a huge PITA, and we don't want to do it, so instead we're going to read the same .persistentmodels file twice - once for the main DB and once for the replicated DB.
While this will do the right thing, the generated type will be identical namewise, and this may be confusing. We'd like to customize the name of the Haskell datatype, similar to how we customize the name of the SQL table.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the .persistentmodels file is read and how the Haskell datatype name is generated, comparing it with the existing SQL table-name customization. The work is done when separate reads can assign distinct Haskell datatype names while preserving the existing table mapping behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100