aboutsummaryrefslogtreecommitdiffstats
path: root/mitmproxy/io/sql/session_create.sql
diff options
context:
space:
mode:
Diffstat (limited to 'mitmproxy/io/sql/session_create.sql')
-rw-r--r--mitmproxy/io/sql/session_create.sql36
1 files changed, 15 insertions, 21 deletions
diff --git a/mitmproxy/io/sql/session_create.sql b/mitmproxy/io/sql/session_create.sql
index 8387981c..bfc98b94 100644
--- a/mitmproxy/io/sql/session_create.sql
+++ b/mitmproxy/io/sql/session_create.sql
@@ -1,26 +1,20 @@
-CREATE TABLE FLOW (
-FID INTEGER PRIMARY KEY,
-MID INTEGER,
-BID INTEGER,
-CONTENT BLOB
+CREATE TABLE flow (
+id VARCHAR(36) PRIMARY KEY,
+content BLOB
);
-CREATE TABLE META (
-MID INTEGER PRIMARY KEY,
-INTERCEPTED INTEGER,
-MARKED INTEGER,
-MODE VARCHAR(20)
+CREATE TABLE body (
+id INTEGER PRIMARY KEY,
+flow_id VARCHAR(36),
+type_id INTEGER,
+content BLOB,
+FOREIGN KEY(flow_id) REFERENCES flow(id)
);
-CREATE TABLE BODY (
-BID INTEGER,
-BREQ BLOB,
-BRES BLOB
+CREATE TABLE annotation (
+id INTEGER PRIMARY KEY,
+flow_id VARCHAR(36),
+type VARCHAR(16),
+content BLOB,
+FOREIGN KEY(flow_id) REFERENCES flow(id)
);
-
-CREATE TABLE ANNOTATION (
-AID INTEGER PRIMARY KEY,
-FID INTEGER,
-TYPE VARCHAR(20),
-CONTENT BLOB
-); \ No newline at end of file