bcgov / hcap

Application supporting access to the Health Career Access Program (HCAP) for employers and participants.
Apache License 2.0
2 stars 1 forks source link

HCAP-1396: Create a seeding script for other tables #908

Closed rhattie-ey closed 1 year ago

rhattie-ey commented 1 year ago

Original ticket: HCAP-1396

Work completed

feed-data rewrite

Overhauled the entire script, rewriting it from the ground up.

Features:

Test data generation

Jupyter notebook used for generation

Created new test data CSVs for the following tables:

Misc

Next steps

fw-noel commented 1 year ago

I have one test to try and resolve, but in the meantime, couple of comments Some tests have heavy reliance on specific ids which caused a few of the breaks. In my commit, you'll see that 26, 27, and 28 were important ones. We'll want to improve this in the future by just moving the necessary participants through in the tests themselves.

The other issues are that all the csvs start with 0 ids, they should start at 1

Also, massivejs insert doesn't add to the sequence of a table, so there needs to be a way to ensure that we can save in the future into tables with auto generated pkeys. I added

dbClient.runRawQuery(ALTER SEQUENCE ${table}_id_seq RESTART WITH ${rowCount}); To the feed-data script, but I don't know if it's the best way.

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication