You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
634 B
34 lines
634 B
from pappyproxy import http |
|
from twisted.internet import defer |
|
|
|
""" |
|
Schema v3 |
|
|
|
Description: |
|
Adds tables to store tags associated with requests |
|
""" |
|
|
|
update_queries = [ |
|
""" |
|
CREATE TABLE tags ( |
|
id INTEGER PRIMARY KEY AUTOINCREMENT, |
|
tag TEXT NOT NULL |
|
); |
|
""", |
|
|
|
""" |
|
CREATE TABLE tagged ( |
|
reqid INTEGER REFERENCES requests(id), |
|
tagid INTEGER REFERENCES tags(id) |
|
); |
|
""", |
|
|
|
""" |
|
UPDATE schema_meta SET version=3; |
|
""", |
|
] |
|
|
|
@defer.inlineCallbacks |
|
def update(dbpool): |
|
for query in update_queries: |
|
yield dbpool.runQuery(query)
|
|
|