Bugfixes, features, etc.

For more details on what affects you, look at the README
diff. Most of this was reworking the internals and there were so many
changes that I can't really list them all.
This commit is contained in:
Rob Glew 2015-11-19 20:36:47 -06:00
parent c590818d7f
commit 6633423420
11 changed files with 363 additions and 82 deletions

View file

@ -0,0 +1,37 @@
import http
from twisted.internet import defer
"""
Schema v2
Description:
Adds support for specifying the port of a request and specify its port. This
lets requests that have the port/ssl settings specified in the CONNECT request
maintain that information.
"""
update_queries = [
"""
ALTER TABLE requests ADD COLUMN port INTEGER;
""",
"""
ALTER TABLE requests ADD COLUMN is_ssl INTEGER;
""",
"""
UPDATE schema_meta SET version=2;
""",
]
@defer.inlineCallbacks
def update(dbpool):
for query in update_queries:
yield dbpool.runQuery(query)
# Load each request and save them again for any request that specified a port
# or protocol in the host header.
http.init(dbpool)
reqs = yield http.Request.load_from_filters([])
for req in reqs:
yield req.deep_save()