8cc0e55880e5e6200c864933755f98508c2dd2a2
[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 directory INTEGER DEFAULT 0,
31 product INTEGER NOT NULL,
32 algo INTEGER NOT NULL,
33 hash BLOB NOT NULL,
34 PRIMARY KEY(file, directory, product, algo)
35 );
36