Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Split middlenames out of actor table #6

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

eFuller96
Copy link
Contributor

The actor table contains a first_name column which actually contains first names and middle names.

This PR adds a new migration to split the first name column into two: first_name and middle_name. Where actors have middle names, their middle name will be moved to the middle_name column and first_name will have the middle name removed.

Actors without middle names should be unaffected.

This PR also adds a test for this migration to ensure that we capture the intended behaviour of the migration script. We dump the state of the actors table before the migration, then dump the state of the actors table after the migration and run a diff against the two (after rejoining the names appropriately) to ensure that the migration completed as intended.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants