add uuid column to projects#69273
Merged
Merged
Conversation
# Conflicts: # dashboard/db/schema.rb
058118a to
a4b4255
Compare
cat5inthecradle
approved these changes
Nov 14, 2025
cat5inthecradle
left a comment
Contributor
There was a problem hiding this comment.
This is safe to deploy any time, then pick a time after to apply the production index, right?
Co-authored-by: Darin Webb <darin@code.org>
Contributor
Author
Correct, adding the column should be instant. Adding the index should also be pretty harmless, but probably best to do after a DTP and after peak hours just to be safe. |
sureshc
approved these changes
Nov 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the first PR in a series of PRs to migrate our existing channel token system for projects to unique identifiers. This PR adds an indexed UUID column to the projects table.
In production, the Projects table has nearly 1.4 billion rows. Because of this, the index will need to be manually added. When tested on a production-cloned adhoc, creating the index took 1hr and 45min. During this time, I was able to make updates to projects directly in the console, as well as create and edit projects via the UI.
The command to add the index in
production-console:Links
Testing story
Tested the migration on a production-cloned adhoc.
Deployment strategy
Once this migration has been deployed to all environments, we will need to manually create the index on production using the command above. This should be done after peak hours, after a deploy, and is expected to take less than 2 hours.
Follow-up work
After the UUID column is created, we will need to start using it! The plan is to do this over a series of PRs.
Privacy and Security
This PR is the first step in further securing our projects.