Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: v0.52.5 migrations #1094

Merged
merged 1 commit into from
Dec 5, 2024
Merged

fix: v0.52.5 migrations #1094

merged 1 commit into from
Dec 5, 2024

Conversation

abelanger5
Copy link
Contributor

Description

Fixes migrations for v0.52.5 when there are existing cron refs without an id.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Copy link

vercel bot commented Dec 5, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hatchet-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 5, 2024 7:28pm

ALTER TABLE "WorkflowTriggerCronRef"
ADD COLUMN "name" text NULL,
ADD COLUMN "id" uuid NULL,
ADD COLUMN "method" "WorkflowTriggerCronRefMethods" NOT NULL DEFAULT 'DEFAULT',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How big is WorkflowTriggerCronRef ? we will probably need to create an index on the id after we add it because once we alter table to be not null I presume that will perform a seq scan on the table to check for NULL

Between the update and the alter it's possible for someone to add a row into the table that will break the next step. It would be best to update the rows, lock the table, update any new rows and then alter the table in that transaction.

@abelanger5 abelanger5 merged commit db6558a into main Dec 5, 2024
28 checks passed
@abelanger5 abelanger5 deleted the belanger/fix-migration branch December 5, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants