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)
|
for row in eachrow(single_result_table)
|
||||||
if ismissing(row.runid)
|
if ismissing(row.runid)
|
||||||
@assert contains("resistance")(row.comment) || contains("CN15")(row.comment) "Unexpected row with id $(row.motherboard_id) $(row.comment)"
|
@assert contains("resistance")(row.comment) || contains("CN15")(row.comment) "Unexpected row with id $(row.motherboard_id) $(row.comment)"
|
||||||
|
|
||||||
# DBInterface.execute(
|
DBInterface.execute(
|
||||||
# stmt_insert_result,
|
stmt_insert_resistance,
|
||||||
# (
|
(psboard_id = row.motherboard_id, ispassed = false),
|
||||||
# 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...
|
|
||||||
continue
|
continue
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -255,6 +249,13 @@ function add_qaqc_single_result(
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# resistance
|
||||||
|
DBInterface.execute(
|
||||||
|
stmt_insert_resistance,
|
||||||
|
(psboard_id = row.motherboard_id, ispassed = true),
|
||||||
|
)
|
||||||
|
|
||||||
|
# main result
|
||||||
DBInterface.execute(
|
DBInterface.execute(
|
||||||
stmt_insert_result,
|
stmt_insert_result,
|
||||||
(
|
(
|
||||||
|
|
|
@ -49,7 +49,7 @@ CREATE TABLE qaqc_campaigns (
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE qaqc_resistance_check (
|
CREATE TABLE qaqc_resistance_check (
|
||||||
id INTEGER NOT NULL PRIMARY KEY,
|
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||||
psb_id INTEGER NOT NULL,
|
psb_id INTEGER NOT NULL,
|
||||||
passed BOOLEAN,
|
passed BOOLEAN,
|
||||||
FOREIGN KEY("psb_id") REFERENCES "ps_boards"("id")
|
FOREIGN KEY("psb_id") REFERENCES "ps_boards"("id")
|
||||||
|
|
Loading…
Add table
Reference in a new issue