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

Switch history primary key to bigserial #155

Merged
merged 1 commit into from
Apr 25, 2022

Conversation

tagliala
Copy link
Member

History tables store a representation of the current record itself, so
the number of historical records will be always greater than or equal
to the current ones.

When the number of records grow, there is less space for historical ids,
but it is logic to expect the opposite (more records, more need for historical versions)

Given also that starting from Rails 5.1 ids are stored as bigint, this
commit changes the default hid type to bigserial

Close #153

Ref:

History tables store a representation of the current record itself, so
the number of historical records will be always greater than or equal
to the current ones.

When the number of records grow, there is less space for historical ids,
but it is logic to expect the opposite (more records, more need for historical versions)

Given also that starting from Rails 5.1 ids are stored as `bigint`, this
commit changes the default hid type to bigserial

Close #153

Ref:
- rails/rails#26266
@tagliala tagliala merged commit 1ba1334 into master Apr 25, 2022
@tagliala tagliala deleted the feature/support-bigint-in-history-ids-153 branch April 25, 2022 11:41
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.

hid type should match id's one
1 participant