Skip to content

Commit

Permalink
[#4181] add db indices for resc_id and data_is_dirty
Browse files Browse the repository at this point in the history
bump db schema version to 6
  • Loading branch information
trel committed Jan 27, 2019
1 parent 58f9abc commit 363261f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION.json.dist.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"irods_version": "@IRODS_VERSION@",
"catalog_schema_version": 5,
"catalog_schema_version": 6,
"commit_id": "@IRODS_GIT_SHA1@",
"configuration_schema_version": 3
}
4 changes: 4 additions & 0 deletions scripts/irods/database_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ def run_update(irods_config, cursor):
for child_name, context in child_contexts:
database_connect.execute_sql_statement(cursor, "update R_RESC_MAIN set resc_parent_context=? where resc_name=?", context, child_name)

elif new_schema_version == 6:
database_connect.execute_sql_statement(cursor, "create index idx_data_main7 on R_DATA_MAIN (resc_id);")
database_connect.execute_sql_statement(cursor, "create index idx_data_main8 on R_DATA_MAIN (data_is_dirty);")

else:
raise IrodsError('Upgrade to schema version %d is unsupported.' % (new_schema_version))

Expand Down

0 comments on commit 363261f

Please sign in to comment.