Package bitten :: Module upgrades

Module upgrades

Automated upgrades for the Bitten database tables, and other data stored in the Trac environment.

Do not import and call directly!

Functions
 
parse_scheme(env)
Retrieve the environment database scheme.
 
update_sequence(env, db, tbl, col)
Update a sequence associated with an autoincrement column.
 
drop_index(env, db, tbl, idx)
Drop an index associated with a table.
 
add_log_table(env, db)
Add a table for storing the builds logs.
 
add_recipe_to_config(env, db)
Add a column for storing the build recipe to the build configuration table.
 
add_last_activity_to_build(env, db)
Add a column for storing the last activity to the build table.
 
add_config_to_reports(env, db)
Add the name of the build configuration as metadata to report documents stored in the BDB XML database.
 
add_order_to_log(env, db)
Add order column to log table to make sure that build logs are displayed in the order they were generated.
 
add_report_tables(env, db)
Add database tables for report storage.
 
xmldb_to_db(env, db)
Migrate report data from Berkeley DB XML to SQL database.
 
normalize_file_paths(env, db)
Normalize the file separator in file names in reports.
 
fixup_generators(env, db)
Upgrade the identifiers for the recipe commands that generated log messages and report data.
 
add_error_table(env, db)
Add the bitten_error table for recording step failure reasons.
 
add_filename_to_logs(env, db)
Add filename column to log table to save where log files are stored.
 
migrate_logs_to_files(env, db)
Migrates logs that are stored in the bitten_log_messages table into files.
 
fix_log_levels_misnaming(env, db)
Renames or removes *.log.level files created by older versions of migrate_logs_to_files.
 
remove_stray_log_levels_files(env, db)
Remove *.log.levels files without a matching *.log file (old Bitten versions did not delete .log.levels files when builds were deleted)
 
recreate_rule_with_int_id(env, db)
Recreates the bitten_rule table with an integer id column rather than a text one.
 
add_config_platform_rev_index_to_build(env, db)
Adds a unique index on (config, platform, rev) to the bitten_build table.
 
fix_sequences(env, db)
Fixes any auto increment sequences that might have been left in an inconsistent state.
Variables
  map = {2: [add_log_table], 3: [add_recipe_to_config], 4: [add_...
  __package__ = 'bitten'
Function Details

xmldb_to_db(env, db)

 

Migrate report data from Berkeley DB XML to SQL database.

Depending on the number of reports stored, this might take rather long. After the upgrade is done, the bitten.dbxml file (and any BDB XML log files) may be deleted. BDB XML is no longer used by Bitten.

add_config_platform_rev_index_to_build(env, db)

 
Adds a unique index on (config, platform, rev) to the bitten_build table. Also drops the old index on bitten_build that serves no real purpose anymore.

fix_sequences(env, db)

 

Fixes any auto increment sequences that might have been left in an inconsistent state.

Upgrade scripts for schema versions > 10 should handle sequence updates correctly themselves.


Variables Details

map

Value:
{2: [add_log_table], 3: [add_recipe_to_config], 4: [add_config_to_repo\
rts], 5: [add_order_to_log, add_report_tables, xmldb_to_db], 6: [norma\
lize_file_paths, fixup_generators], 7: [add_error_table], 8: [add_file\
name_to_logs, migrate_logs_to_files], 9: [recreate_rule_with_int_id], \
10: [add_config_platform_rev_index_to_build, fix_sequences], 11: [fix_\
log_levels_misnaming, remove_stray_log_levels_files], 12: [add_last_ac\
tivity_to_build],}