yesodweb / yesodweb/persistent
Postgres schemas and migrations
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 486
- Forks
- 306
- PR merge metrics
- No merged PRs in 30d
Description
Not possible to migrate if there is a table with the same name in other schema.
Example:
There is an existing "stat"."user" table
and the migration is for "public"."user" (default schema)
Extra: models
User
username Text sqltype=varchar(17)
....
Result:
persistent is not creating the table "user" in "public" because of the one in "stat", after it I get:
*** Exception: SqlError {sqlState = "42P01", sqlExecStatus = FatalError, sqlErrorMsg = "relation \"user\" does not exist", sqlErrorDetail =
"", sqlErrorHint = ""}
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
The issue names no files or tests. Start by reproducing the migration with an existing stat.user table and a target public.user table, then inspect the PostgreSQL migration path that handles schema-qualified relations. Done means the public.user table is created and the migration completes without the reported relation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell, postgresql
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100