Feedback from https://github.com/wvining/MIRION_Database_v4/blob/main/workflow.md. I don't really understand this and am not sure if it needs fixing but FYI:
Discovered and worked around an astrodbkit quirk: load_table calls .insert().values(data) unconditionally — for data == [] (an empty-array reference JSON file), SQLAlchemy's insert().values([]) inserts one all-default row rather than zero rows, which fails NOT NULL constraints. Fix: don't leave empty-array placeholder files for Publications/AssociationList/ParameterList/SourceTypeList — load_table only loads a lookup table if its JSON file exists at all, so deleting the file (rather than emptying it to []) skips the load cleanly. These will be (re)created for real once Phases 6-7 populate them.
Feedback from https://github.com/wvining/MIRION_Database_v4/blob/main/workflow.md. I don't really understand this and am not sure if it needs fixing but FYI: