yesodweb / yesodweb/persistent

persistent-mysql tries to add foreign keys to TEXT/BLOB columns

Open
#468 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

MySQL
Dominant language
Haskell
Stars
486
Forks
306
PR merge metrics
No merged PRs in 30d

Description

MySQL doesn't support foreign keys on TEXT/BLOB columns. persistent-mysql will try to add a foreign key, which causes an error.

This necessitates skipping tests like the PrimaryTest for the mysql backend.

Best approach seems to be to not add references to TEXT/BLOB columns.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading persistent-test/PrimaryTest.hs around lines 39–41 and then inspect persistent-mysql’s foreign-key handling. Run the relevant MySQL tests to reproduce the schema error. Done means TEXT/BLOB columns no longer receive foreign-key references and the affected tests no longer need to be skipped.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell, mysql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.