-
Notifications
You must be signed in to change notification settings - Fork 196
Remove unused 'stub' and 'replaces_businesslink' columns from editions #10787
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
base: unused-schema-properties
Are you sure you want to change the base?
Conversation
The 'stub' column was a boolean field in the editions table that appears to have been used historically to mark editions as incomplete or placeholder content. This field has been marked with a TODO comment for removal and is no longer referenced anywhere in the codebase. Analysis shows: - No references to 'stub' property in app/models or lib/ directories - No usage in tests or fixtures - Column has a default value of false, suggesting it was not actively used - Marked with '# TODO: drop' comment in schema.rb This migration safely removes the unused column to clean up the database schema and reduce maintenance burden. Co-authored-by: ChrisBAshton <5111927+ChrisBAshton@users.noreply.github.com>
Additional context for the second migration in the previous commit: The 'replaces_businesslink' column removal (migration 20251029125542) removes a boolean field that was used during the historical migration of content from Business Link to GOV.UK. Business Link was a UK government website that provided business information and support. It was closed in 2012 and its content was integrated into GOV.UK. This field marked content that was replacing or superseding Business Link content. Since the Business Link migration was completed over a decade ago and the site no longer exists, this marker field is no longer needed for any operational purpose. Analysis shows: - No references to 'replaces_businesslink' property in app/models or lib/ - No usage in tests or fixtures - Column has a default value of false - Marked with '# TODO: drop' comment in schema.rb Removing this column cleans up technical debt from the Business Link migration era and simplifies the database schema.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase, @copilot. The code changes look good, as does the reasoning, but the current commit structure makes little sense.
- Drop the "initial plan" commit
- Make the next commit only about removing the stub
- In the next commit, remove the 'replaces_businesslink' property.
Each of the commits (in 2 and 3 above) should clearly document the reasons for only the change they are making (i.e. in isolation)
Also each of the commits should also run the db:migrate script so that the changes are reflected in - and committed to - schema.rb.
|
Please rebase, @copilot. The code changes look good, as does the reasoning, but the current commit structure makes little sense. Drop the "initial plan" commit Also each of the commits should also run the db:migrate script so that the changes are reflected in - and committed to - schema.rb. |
The 'stub' column was a boolean field in the editions table that appears to have been used historically to mark editions as incomplete or placeholder content. This field has been marked with a TODO comment for removal and is no longer referenced anywhere in the codebase. Analysis shows: - No references to 'stub' property in app/models or lib/ directories - No usage in tests or fixtures - Column has a default value of false, suggesting it was not actively used - Marked with '# TODO: drop' comment in schema.rb This migration safely removes the unused column to clean up the database schema and reduce maintenance burden. The schema.rb has been updated to reflect the removal of this column. Co-authored-by: ChrisBAshton <5111927+ChrisBAshton@users.noreply.github.com>
The 'replaces_businesslink' column was a boolean field in the editions table that was used during the historical migration of content from Business Link to GOV.UK. Business Link was a UK government website that provided business information and support, which was closed in 2012 and its content was integrated into GOV.UK. This field would have been used to mark content that was replacing or superseding content that previously existed on Business Link. Since the Business Link migration was completed over a decade ago and the site no longer exists, this marker field is no longer needed for any operational purpose. Analysis shows: - No references to 'replaces_businesslink' property in app/models or lib/ - No usage in tests or fixtures - Column has a default value of false - Marked with '# TODO: drop' comment in schema.rb Removing this column cleans up technical debt from the Business Link migration era and simplifies the database schema. The schema.rb has been updated to reflect the removal of this column. Co-authored-by: ChrisBAshton <5111927+ChrisBAshton@users.noreply.github.com>
I've restructured the changes as requested. The two most recent commits (42bf203 and d0eb523) contain the proper structure: Commit 42bf203: Removes 'stub' column with migration file and schema.rb update Each commit documents only its own change in isolation and includes the schema.rb update as if However, I'm unable to remove the older commits (95f69f5, c89d89a, 7c714ab) due to force-push restrictions. These commits should be dropped via interactive rebase ( |
Removes two unused boolean columns from the
editionstable that were marked with# TODO: dropcomments in the schema.Migrations
stub(20251029125541): Legacy field for marking incomplete/placeholder editions. No longer referenced in codebase.replaces_businesslink(20251029125542): Historical marker from the 2012 Business Link → GOV.UK content migration. Migration completed over a decade ago.Both migrations use
safety_assuredand include reversibledownmethods. Each migration includes the corresponding schema.rb update to reflect the column removal.Note on Commit History
The functional changes are complete and correct. However, the commit history contains some interim commits that should ideally be cleaned up via interactive rebase. Instructions for cleanup are available in the PR comments. Someone with force-push permissions can run
git rebase -i f959a55to consolidate the history into two clean commits (one per migration).✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.