Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Reviewed-by: Rob Crittenden <rcritten@redhat.com>
# Copyright (C) 2014 Ipsilon project Contributors, for license see COPYING
# Copyright (C) 2014 Ipsilon project Contributors, for license see COPYING
-from ipsilon.util.data import Store, UNIQUE_DATA_TABLE
+from ipsilon.util.data import Store, UNIQUE_DATA_TABLE, OPTIONS_TABLE
from openid import oidutil
from openid.association import Association
from openid import oidutil
from openid.association import Association
q = self._query(self._db, 'association', UNIQUE_DATA_TABLE,
trans=False)
q.create()
q = self._query(self._db, 'association', UNIQUE_DATA_TABLE,
trans=False)
q.create()
+ q = self._query(self._db, 'openid_extensions', OPTIONS_TABLE,
+ trans=False)
+ q.create()
def _upgrade_schema(self, old_version):
if old_version == 1:
def _upgrade_schema(self, old_version):
if old_version == 1:
table = self._query(self._db, 'association', UNIQUE_DATA_TABLE,
trans=False)._table
self._db.add_constraint(table.primary_key)
table = self._query(self._db, 'association', UNIQUE_DATA_TABLE,
trans=False)._table
self._db.add_constraint(table.primary_key)
+ for index in table.indexes:
+ self._db.add_index(index)
+ table = self._query(self._db, 'openid_extensions', OPTIONS_TABLE,
+ trans=False)._table
+ self._db.add_constraint(table.primary_key)
for index in table.indexes:
self._db.add_index(index)
return 2
for index in table.indexes:
self._db.add_index(index)
return 2
name TEXT NOT NULL,
value TEXT
);
name TEXT NOT NULL,
value TEXT
);
+CREATE TABLE openid_extensions (
+ name TEXT NOT NULL,
+ option TEXT NOT NULL,
+ value TEXT
+);