Commit d8301b86 authored by Xavier Thompson's avatar Xavier Thompson

slapproxy: Migrate forwarded partitions table

Include 'forwarded_partition_request' table in the tables to be
migrated when the database is upgraded, starting with version 11.
parent cd2c38a5
......@@ -177,7 +177,10 @@ def _upgradeDatabaseIfNeeded():
# Migrate all data to new tables
app.logger.info('Old schema detected: Migrating old tables...')
for table in ('software', 'computer', 'partition', 'slave', 'partition_network'):
table_list = ('software', 'computer', 'partition', 'slave', 'partition_network')
if int(current_schema_version) >= 11:
table_list += ('forwarded_partition_request',)
for table in table_list:
for row in execute_db(table, 'SELECT * from %s', db_version=current_schema_version):
columns = ', '.join(row.keys())
placeholders = ':'+', :'.join(row.keys())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment