Versions Compared

Key

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

...

Question

Questions and

Answer

Answers

Anchor
1
1
Loading external data for students who take the same test more than once in a day.

The external database table that holds records for test students have taken.  The results of the tests are stored in external_student_test.  The natural/primary key for external_student_test consists of the following columns.

  • school_id
  • test_code
  • sub_test_code
  • test_date
  • discriminator

The discriminator column is used to distinguish the exact same test taken on the same day.  The default value of 'discriminator' is '1'. The application does not care what values are set. I.e. it is intended to be a completely opaque value used exclusively to distinguish between multiple sittings for the same exam on the same date.

For implementers upgrading to v2.0.1 with duplicate rows, the update needs to be applied in multiple steps.

  • Deploy and start up the new code with db_liquibase_external_apply_natural_keys=false. This will create the new column and fill in default values.
  • Adjust data in external_student_test.discriminator values to eliminate duplicate keys.
  • Restart the application with db_liquibase_external_apply_natural_keys=false. This will attempt to add a primary key to this table, including the 'discriminator' column.

For implementers installing v2.0.1 or later, the data should be loaded with appropriate discriminator values.  Documentation for the external tables

Anchor
2
2
 
Anchor
3
3
 
Anchor
4
4
 
Anchor
5
5