Skip to content

feat(migration): add migration to update github_pull_requests.id type to bigint#2086

Open
jsfez wants to merge 1 commit intomainfrom
fix-github-pull-requests-database-drift
Open

feat(migration): add migration to update github_pull_requests.id type to bigint#2086
jsfez wants to merge 1 commit intomainfrom
fix-github-pull-requests-database-drift

Conversation

@jsfez
Copy link
Copy Markdown
Contributor

@jsfez jsfez commented Apr 2, 2026

No description provided.

@jsfez jsfez requested review from a team and gregberge and removed request for a team April 2, 2026 11:38
@argos-ci
Copy link
Copy Markdown

argos-ci bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Apr 2, 2026, 11:40 AM

-- PostgreSQL database dump complete
--

\unrestrict 2GIQSmC2cllwgA5SKtS5RhAwQOcUPaKxQ1gBkaPnM6Ir2Gz1OmHj6kk5YsYjXKG
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What is that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It's not generated in the dump

-- PostgreSQL database dump
--

\restrict 2GIQSmC2cllwgA5SKtS5RhAwQOcUPaKxQ1gBkaPnM6Ir2Gz1OmHj6kk5YsYjXKG
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Whta is this?

Comment on lines +2680 to +2681
ALTER TABLE ONLY public.users
ADD CONSTRAINT users_email_unique UNIQUE (email);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Weird that it was not present in the structure.

Comment on lines +2688 to +2689
ALTER TABLE ONLY public.users
ADD CONSTRAINT users_gitlabuserid_unique UNIQUE ("gitlabUserId");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same for this one but I checked in production and they are present so it's good to have them in the structure.

Comment on lines +21 to +23
await knex.raw(
"ALTER TABLE github_pull_requests ALTER COLUMN id TYPE BIGINT",
);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The type seems to be correct in production, so I don't understand the purpose of this PR. If it's in local just fix it.

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The prod database is good the migration file is not aligned. So when you apply db:drop + db:create + db:migrate:lastest, there is a drift that break the CI tests

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