def downgrade(pyramid_env): from virtuoso.textindex import TextIndex from assembl import models as m db = m.get_session_maker()() with transaction.manager: ti = TextIndex(m.Content.body) ti.drop(db.bind)
def downgrade(pyramid_env): from virtuoso.textindex import TextIndex from assembl import models as m db = m.get_session_maker()() with transaction.manager: ti = TextIndex(m.Content.body, clusters=[m.Content.discussion_id]) ti.create(db.bind)
def upgrade(pyramid_env): # This looks like a bug in virtuoso, again. admin_engine = sa.create_engine('virtuoso://*****:*****@VOSU') #admin_session = sa.orm.sessionmaker(admin_engine) username = config.get('db_user') admin_engine.execute('GRANT SELECT ON DB.DBA.SYS_CLUSTER TO ' + username) from assembl import models as m db = m.get_session_maker()() with transaction.manager: ti = TextIndex(m.Content.body, clusters=[m.Content.discussion_id]) ti.create(db.bind)
def upgrade(pyramid_env): from assembl import models as m db = m.get_session_maker()() with transaction.manager: ti = TextIndex(m.Content.body, ) ti.drop(db.bind)