porsager / porsager/postgres-shift

Do per-migration transactions (instead of one transaction for all needed migrations)

Open
#10 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
56
Forks
15
PR merge metrics
No merged PRs in 30d

Description

I have run into an issue where I add an additional value to an enum, but I cannot use that value in subsequent migrations because all needed migrations run in a single transaction.

Would there be any problem in making a transaction per migration instead?

Contributor guide

No contributing guide indexed for this repository

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

No file or test is named in the issue. Start by tracing how postgres-shift runs all needed migrations and where the transaction begins and ends; confirm that each migration gets its own transaction and that a later migration can use an enum value added by an earlier one.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, postgres
Domain
database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.