Skip to content

Conversation

@ptkach
Copy link
Collaborator

@ptkach ptkach commented May 30, 2025

We need to have a unique id on RegistrarPoc so that we can match updates to specific records. Fixes b/421402975


This change is Reviewable

@ptkach ptkach requested a review from gbrodman May 30, 2025 19:25
Copy link
Collaborator

@gbrodman gbrodman left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 5 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ptkach)


db/src/main/resources/sql/flyway/V195__registrar_poc_id.sql line 23 at r1 (raw file):

ALTER TABLE "RegistrarPoc"
    ADD COLUMN IF NOT EXISTS id INTEGER DEFAULT nextval('"RegistrarPoc_id_seq"'::regclass);

i think we'd want to use bigserial here instead

  1. it creates the sequence automatically and uses it to fill, we don't manually need to create it
  2. has more space than an int, if we end up mucking around with the IDs later

Copy link
Collaborator Author

@ptkach ptkach left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gbrodman)


db/src/main/resources/sql/flyway/V195__registrar_poc_id.sql line 23 at r1 (raw file):

Previously, gbrodman wrote…

i think we'd want to use bigserial here instead

  1. it creates the sequence automatically and uses it to fill, we don't manually need to create it
  2. has more space than an int, if we end up mucking around with the IDs later

I'm not sure about this request - we have 1094 records currently. Even if we were to mess with 100s of records / day thus generating new values in id column it'd still take us roughly thousands of years before it fails. Are you sure we need a biserial here?

Copy link
Collaborator

@gbrodman gbrodman left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ptkach)


db/src/main/resources/sql/flyway/V195__registrar_poc_id.sql line 23 at r1 (raw file):

Previously, ptkach (Pavlo Tkach) wrote…

I'm not sure about this request - we have 1094 records currently. Even if we were to mess with 100s of records / day thus generating new values in id column it'd still take us roughly thousands of years before it fails. Are you sure we need a biserial here?

In the past we've mucked around with serial number generation so it's good to have the flexibility. And there's also (1) anyway.

Copy link
Collaborator Author

@ptkach ptkach left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 5 files reviewed, 1 unresolved discussion (waiting on @gbrodman)


db/src/main/resources/sql/flyway/V195__registrar_poc_id.sql line 23 at r1 (raw file):

Previously, gbrodman wrote…

In the past we've mucked around with serial number generation so it's good to have the flexibility. And there's also (1) anyway.

Updated. However I'm not convinced it's an improvement and I wouldn't consider this request a blocker for merging the pr - code lines have remained the same, it's just that postgres now creates the sequence instead of us and I still believe bigserial won't ever be required in this particular case.

Copy link
Collaborator

@gbrodman gbrodman left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @ptkach)

@ptkach ptkach enabled auto-merge June 2, 2025 15:18
@ptkach ptkach added this pull request to the merge queue Jun 2, 2025
Merged via the queue into google:master with commit 70291af Jun 2, 2025
9 checks passed
@ptkach ptkach deleted the consolePocId branch June 2, 2025 16:31
qrtp pushed a commit to unstoppabledomains/nomulus that referenced this pull request Jun 27, 2025
qrtp pushed a commit to unstoppabledomains/nomulus that referenced this pull request Jun 27, 2025
qrtp pushed a commit to unstoppabledomains/nomulus that referenced this pull request Jun 27, 2025
qrtp pushed a commit to unstoppabledomains/nomulus that referenced this pull request Jun 27, 2025
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