End old party memberships the day before the new memberships start.
Change the party of exactly those who were members on the change date.

As it happens, this is everyone in the database, there is no-one in any
of these parties with a start or end date...