Skip to content

Conversation

@alyssapowell
Copy link

Issue

https://otwarchive.atlassian.net/browse/AO3-7045

Purpose

Migrates the audits table primary key from integer to BIGINT to prevent integer overflow as the audit log grows. This is a preventive infrastructure improvement to handle the increasing volume of audit records in the system.

Testing Instructions

  1. Run the migration in a development environment: rails db:migrate
  2. Verify the schema change: Check that audits.id column is now BIGINT type
  3. Test audit functionality: Ensure audit records are still created for tracked changes
  4. Run existing test suite to verify no functionality breaks

References

This follows the same pattern as recent similar migrations:

  • 20250704060231_change_bookmark_foreign_keys_type.rb
  • 20250718220533_change_subscriptions_id_to_bigint.rb

Credit

Alyssa Powell (she/her)

Change audits.id from integer to bigint to prevent integer overflow
as the audit log grows. This follows the established pattern for similar
migrations in the codebase.
@github-actions github-actions bot added Has Migrations Contains migrations and therefore needs special attention when deploying Awaiting Review labels Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Has Migrations Contains migrations and therefore needs special attention when deploying Reviewed: Action Needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants