Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR removes the user roles migration and the corresponding user_roles table definition from the database schema as part of cleaning up legacy code.
- Removed the create_table block for "user_roles" and its foreign key from db/schema.rb.
- Deleted the migration file "20240410213056_create_user_roles.rb" to avoid backward compatibility issues.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| template/{{app_name}}/db/schema.rb | Removed user_roles table and its associated foreign key. |
| template/{{app_name}}/db/migrate/20240410213056_create_user_roles.rb | Deleted the migration file for creating user_roles. |
Contributor
Author
|
@doshitan food for thought, thinking through the migration notes here, I wonder if in the future it'd be valuable to be able to mark certain template commits as ones that we'd want to ignore during an "update" command. i.e. features that we had but removed, we'd want to let existing projects keep those features, but just remove them from future clean installs. |
Contributor
Author
|
Post merge notes:
|
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.
Ticket
n/a
Changes
see title
Context for reviewers
The commit 5e2a120 removes the user roles from the application code but not from the database. This change removes it from migrations. This change was separated out since removing an already existing migration is not backwards compatible. Since this is a template it makes sense to do it this way rather than add an extra migration that removes the user_roles table.
Migration notes
When updating the template in this version, revert the changes in these files:
Deployment notes
After merging we'll need to:
Testing
see navapbc/platform-test#193