mirror of
https://gitlab.cern.ch/wotsubo/PSBoardDataBase.git
synced 2025-06-08 05:55:42 +09:00
new: add resistance test table & data putting procedure
This commit is contained in:
parent
eba8d8f395
commit
ecbb3daa14
2 changed files with 20 additions and 19 deletions
|
@ -182,29 +182,23 @@ function add_qaqc_single_result(
|
|||
)
|
||||
""",
|
||||
)
|
||||
stmt_insert_resistance = DBInterface.prepare(
|
||||
db,
|
||||
sql"""
|
||||
INSERT INTO qaqc_resistance_check(psb_id, passed)
|
||||
VALUES (:psboard_id, :ispassed)
|
||||
""",
|
||||
)
|
||||
|
||||
for row in eachrow(single_result_table)
|
||||
if ismissing(row.runid)
|
||||
@assert contains("resistance")(row.comment) || contains("CN15")(row.comment) "Unexpected row with id $(row.motherboard_id) $(row.comment)"
|
||||
|
||||
# DBInterface.execute(
|
||||
# stmt_insert_result,
|
||||
# (
|
||||
# runid = row.runid,
|
||||
# psboard_id = row.motherboard_id,
|
||||
# daughterboard_id = row.daughterboard,
|
||||
# position = nothing,
|
||||
# resistance_test_passed = false,
|
||||
# qspip = nothing,
|
||||
# recov = nothing,
|
||||
# power = nothing,
|
||||
# clock = nothing,
|
||||
# asdtp = nothing,
|
||||
# reset = nothing,
|
||||
# qaqc_result = nothing,
|
||||
# ),
|
||||
# )
|
||||
# TODO: maybe these should not be in this table...
|
||||
DBInterface.execute(
|
||||
stmt_insert_resistance,
|
||||
(psboard_id = row.motherboard_id, ispassed = false),
|
||||
)
|
||||
|
||||
continue
|
||||
end
|
||||
|
||||
|
@ -255,6 +249,13 @@ function add_qaqc_single_result(
|
|||
)
|
||||
end
|
||||
|
||||
# resistance
|
||||
DBInterface.execute(
|
||||
stmt_insert_resistance,
|
||||
(psboard_id = row.motherboard_id, ispassed = true),
|
||||
)
|
||||
|
||||
# main result
|
||||
DBInterface.execute(
|
||||
stmt_insert_result,
|
||||
(
|
||||
|
|
|
@ -49,7 +49,7 @@ CREATE TABLE qaqc_campaigns (
|
|||
);
|
||||
|
||||
CREATE TABLE qaqc_resistance_check (
|
||||
id INTEGER NOT NULL PRIMARY KEY,
|
||||
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
psb_id INTEGER NOT NULL,
|
||||
passed BOOLEAN,
|
||||
FOREIGN KEY("psb_id") REFERENCES "ps_boards"("id")
|
||||
|
|
Loading…
Add table
Reference in a new issue