mirror of
https://gitlab.cern.ch/wotsubo/PSBoardDataBase.git
synced 2025-06-08 05:55:42 +09:00
add version to database
This commit is contained in:
parent
320ed3a285
commit
64056a89d8
3 changed files with 18 additions and 0 deletions
|
@ -1,3 +1,15 @@
|
|||
function insert_version_info(db::SQLite.DB)
|
||||
stmt = DBInterface.prepare(
|
||||
db,
|
||||
sql"""
|
||||
INSERT INTO versions VALUES (:converter)
|
||||
""",
|
||||
)
|
||||
DBInterface.execute(stmt, (; converter = pkgversion(@__MODULE__)))
|
||||
|
||||
nothing
|
||||
end
|
||||
|
||||
"""
|
||||
insert_qaqc_campaign_id(db::SQLite.DB)
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
CREATE TABLE versions (
|
||||
converter TEXT,
|
||||
);
|
||||
|
||||
CREATE TABLE ps_boards (
|
||||
id INTEGER NOT NULL PRIMARY KEY,
|
||||
daughterboard_id INTEGER
|
||||
|
|
|
@ -34,6 +34,8 @@ true || include("../src/PSBoardDataBase.jl")
|
|||
db = PSBoardDataBase.create_database(dbpath)
|
||||
@info "" db
|
||||
|
||||
@test PSBoardDataBase.insert_version_info(db) |> isnothing
|
||||
|
||||
@test PSBoardDataBase.insert_qaqc_campaign_id(db) |> isnothing
|
||||
@test PSBoardDataBase.insert_qaqc_positions(db) |> isnothing
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue