Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Current(new) structure:

Drawio
simple0
zoom1
inComment0
pageId3528425485
custContentId3808821364
diagramDisplayNameUntitled Diagram.drawio
lbox1
contentVer2
revision2
baseUrlhttps://hee-tis.atlassian.net/wiki
diagramNamecurrent table structure.drawio
pCenter0
width810.5
links
tbstyle
height421

Old structure:

The old ProgrammeMembership table structure was :

...

Under the old table structure, when we need to extract a real programmeMembership, we use personId, programmeStartDate, programmeEndDate, programmeId, programmeMembershipType fields for identification. When there’s a field above with missing data(data issue), some problems occurs for querying all curriculum memberships against a specific programmeMembership.

Why the refactoring is necessary?

please see: https://hee-tis.atlassian.net/wiki/spaces/NTCS/pages/106659893/Programmes+-+Programme+memberships#Why-the-distinction-between-the-2-is-necessary%3F

Distinction between 2 entities

Current(new) table structure:

...

Steps of refactoring:

To avoid thinking of naming of some interim tables, we decided to:

1. Rename ProgrammeMembership table to CurriculumMembership

Jira Legacy
serverSystem JIRA
serverId4c843cd5-e5a9-329d-ae88-66091fcfe3c7
keyTIS21-2420

  1. Duplicate ProgrammeMembership table to a new table CurriculumMembership as a exact copy

  2. Start writing updates to both tables

  3. Modify all the queries (downstream services included) to use new CurriculumMembership.

  4. Monitor for a few weeks to make sure there’re no queries to old ProgrammeMembership.

2. Rebuild new ProgrammeMemberhsip and populate the actual data

  1. Drop old ProgrammeMembership table, and create

...

  1. an empty new table with necessary fields only.

  2. Insert data via grouped curriculumMembership.

  3. Update CurriculumMembership table with adding a new foreign key field programmeMembershipUuid and populate data for the foreign key.

  4. Save / Update in both new ProgrammeMembership and CurriculumMembership tables in parallel.

Interim table structure:

Drawio
zoom1
simple0
inComment0
pageId3528425485
custContentId3559718931
lbox1
diagramDisplayNameUntitled Diagram.drawio
contentVer2
revision2
baseUrlhttps://hee-tis.atlassian.net/wiki
diagramNameUntitled Diagram.drawio
pCenter0
width810.5
links
tbstyle
height743

Queries

Downstream services:

NDW-ETL

The queries in NDW-ETL

Jira Legacy
serverSystem JIRA
serverId4c843cd5-e5a9-329d-ae88-66091fcfe3c7
keyTIS21-2397

TIS-Sync

Jira Legacy
serverSystem JIRA
serverId4c843cd5-e5a9-329d-ae88-66091fcfe3c7
keyTIS21-2392

Assessment

Jira Legacy
serverSystem JIRA
serverId4c843cd5-e5a9-329d-ae88-66091fcfe3c7
keyTIS21-2422

Bulk Upload

Reval

TSS

ESR

Lambdas on AWS