Skip to content

Bigint Migration for 'events' Table (Step 1) #4281

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

philippthun
Copy link
Member

@philippthun philippthun commented Mar 28, 2025

  • reusable module VCAP::BigintMigration
  • implementation of step 1 (the events' primary key is not used as foreign key, thus additions will be required when reusing this for other tables)
    • check database type (PostgreSQL only)
    • check opt-out flag
    • check if table is empty
    • change primary key to bigint directly, if table is empty
    • add bigint column and create trigger + function otherwise
  • reusable shared_context for tests
  • ADR adapted (PostgreSQL only)
  • Rake task db:bigint_backfill to manually trigger a backfill (optional)

Related PR: cloudfoundry/capi-release#533

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

@philippthun philippthun force-pushed the bigint-migration-events-step1 branch 13 times, most recently from a0ee2b7 to d37b9fa Compare April 3, 2025 12:39
@philippthun philippthun force-pushed the bigint-migration-events-step1 branch from d37b9fa to f3d6fe9 Compare April 4, 2025 07:32
@philippthun philippthun changed the title bigint migration - events table - step 1 Bigint Migration for 'events' Table (Step 1) Apr 4, 2025
@philippthun philippthun force-pushed the bigint-migration-events-step1 branch from f3d6fe9 to 51e2109 Compare April 4, 2025 07:34
@philippthun philippthun marked this pull request as ready for review April 4, 2025 07:35
@philippthun philippthun force-pushed the bigint-migration-events-step1 branch 3 times, most recently from 4aaae49 to 6d05889 Compare April 17, 2025 11:45
@philippthun philippthun force-pushed the bigint-migration-events-step1 branch from 6d05889 to e6bb19a Compare April 17, 2025 13:59
- reusable module VCAP::BigintMigration
- implementation of step 1 (the events' primary key is not used as
  foreign key, thus additions will be required when reusing this for
  other tables)
  - check database type (PostgreSQL only)
  - check opt-out flag
  - check if table is empty
  - change primary key to bigint directly, if table is empty
  - add bigint column and create trigger + function otherwise
- reusable shared_context for tests
- ADR adapted (PostgreSQL only)
- Rake task db:bigint_backfill to manually trigger a backfill (optional)
@philippthun philippthun force-pushed the bigint-migration-events-step1 branch from e6bb19a to cfb041c Compare April 25, 2025 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant