whitehall icon indicating copy to clipboard operation
whitehall copied to clipboard

Remove unused 'stub' and 'replaces_businesslink' columns from editions

Open Copilot opened this issue 4 months ago • 2 comments

Removes two unused boolean columns from the editions table that were marked with # TODO: drop comments 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_assured and include reversible down methods. 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 f959a55 to 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.

Copilot avatar Oct 29 '25 12:10 Copilot

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.

ChrisBAshton avatar Nov 03 '25 08:11 ChrisBAshton

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 ...

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 Commit d0eb523: Removes 'replaces_businesslink' 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 db:migrate had been run.

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 (git rebase -i f959a55) to clean up the history. The final history should show only commits 42bf203 and d0eb523 after f959a55.

Copilot avatar Nov 03 '25 08:11 Copilot