fix storage creation: util.makeStorage()
This commit is contained in:
parent
3c82ec9fdc
commit
73ac0af54e
2 changed files with 2 additions and 3 deletions
|
@ -3,7 +3,6 @@
|
|||
"""Compatibility layer on scopes.storage: common functionality."""
|
||||
|
||||
from sqlalchemy import Table, Column, Index, BigInteger, Text
|
||||
from zope.sqlalchemy import mark_changed
|
||||
|
||||
from scopes.storage import common
|
||||
|
||||
|
@ -24,7 +23,7 @@ class Storage(common.Storage):
|
|||
if n == 0:
|
||||
stmt = t.insert().values(legacy=ouid, prefix=prefix, id=id)
|
||||
self.session.execute(stmt)
|
||||
mark_changed(self.session)
|
||||
self.mark_changed()
|
||||
|
||||
def getUidTable(self, schema=None):
|
||||
#table = getExistingTable(self.storage, self.tableName)
|
||||
|
|
2
util.py
2
util.py
|
@ -138,7 +138,7 @@ def makeStorage(context):
|
|||
root = context.getLoopsRoot()
|
||||
opts = IOptions(root)
|
||||
schema = (opts.scopes.storage.schema or [None])[0]
|
||||
return Storage(schema=schema)
|
||||
return storageFactory(schema=schema)
|
||||
|
||||
def records(context, name, factory, storage=None):
|
||||
root = context.getLoopsRoot()
|
||||
|
|
Loading…
Add table
Reference in a new issue