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

Primary Key runs out on lots of events #257

Open
dmatriccino opened this issue Jun 29, 2023 · 2 comments
Open

Primary Key runs out on lots of events #257

dmatriccino opened this issue Jun 29, 2023 · 2 comments

Comments

@dmatriccino
Copy link

A few times, we've had to empty our easyaudit tables due to the amount of data we added because they were failing to insert due to running out of primary keys.

Update the primary_key to a BigInt would help with this

@jheld
Copy link
Collaborator

jheld commented Jul 3, 2023

Happy to review a proposed PR. Right now I can't think of any reason not to make the change.

@trauty-is-me
Copy link
Contributor

trauty-is-me commented Aug 21, 2023

Just adding a note to the person who ends up implementing this:

In the release notes for this change include information about how Django applies this in migrations. Doing a sqlmigrate on a migration file where the field changes the workflow is:

  1. Create new table with same columns
  2. Insert all existing data into this table
  3. Drop existing table
  4. Rename new table
  5. Recreate indexes.

Given how much data is could be coming into these tables, any custom indexes, or partitions in the DB, the effect of a change like this needs some big warning lights in the release notes, given that this amount of IO could potentially bring the DB offline to users.

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

No branches or pull requests

3 participants