0407d1e17fcb29dfd9b95b8cba169219adabf57d
[strongswan.git] / src / libimcv / plugins / imv_attestation / tables.sql
1 /* PTS SQLite database */
2
3 DROP TABLE IF EXISTS files;
4 CREATE TABLE files (
5 id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
6 type INTEGER NOT NULL,
7 path TEXT NOT NULL
8 );
9
10 DROP TABLE IF EXISTS products;
11 CREATE TABLE products (
12 id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
13 name TEXT NOT NULL
14 );
15 DROP INDEX IF EXISTS products_name;
16 CREATE INDEX products_name ON products (
17 name
18 );
19
20 DROP TABLE IF EXISTS product_file;
21 CREATE TABLE product_file (
22 product INTEGER NOT NULL,
23 file INTEGER NOT NULL,
24 PRIMARY KEY (product, file)
25 );
26
27 DROP TABLE IF EXISTS file_hashes;
28 CREATE TABLE file_hashes (
29 file INTEGER NOT NULL,
30 product INTEGER NOT NULL,
31 algo INTEGER NOT NULL,
32 hash BLOB NOT NULL,
33 PRIMARY KEY(file, product, algo)
34 );
35