add a preliminary schema for object detection (#30)

This commit is contained in:
Scott Lamb
2020-03-21 15:43:51 -07:00
parent 00991733f2
commit c6fe1b66a1
4 changed files with 87 additions and 18 deletions

View File

@@ -209,6 +209,27 @@ pub fn run(_args: &super::Args, tx: &rusqlite::Transaction) -> Result<(), Error>
revocation_reason_detail = 'Blake2b->Blake3 upgrade'
where
revocation_reason is null;
create table object_detection_model (
id integer primary key,
uuid blob unique not null check (length(uuid) = 16),
name text not null,
data blob
);
create table object_detection_label (
id integer primary key,
uuid blob unique not null check (length(uuid) = 16),
name text unique not null,
color text
);
create table recording_object_detection (
composite_id integer not null references recording (composite_id),
model_id integer not null references object_detection_model (id),
frame_data blob not null,
primary key (composite_id, model_id)
);
"#)?;
Ok(())
}