Eliminating ScenarioDatabase

[DONE]

ScenarioDatabase and MysqlChainStorage are the places where the system interacts with the database chain in order to flatten the scenario databases.

  • Replace opus_core.cache.cache_mysql_data with opus_core.cache.cache_scenario_database. This is the process that manages the exporting of the scenario database to cache. [DONE]
  • Eliminate
    • MysqlChainStorage. This is the class that actually writes out to cache. Its additional functionality over opus_core.store.sql_storage will be wrapped into the new cache_scenario_database. [DONE]
    • opus_core.store.scenario_database [DONE]
    • psrc.tools.create_flattened_baseyear [DONE]
    • psrc.tools.create_flattened_test_subset [DONE]
    • urbansim.flatten_scenario_database_chain [DONE]
  • eliminate opus_emme2.sql_value_reader and refactor opus_emme2.models.get_cache_data_into_emme2 [DONE]

General Database API

  • Update installation instructions to make sqlalchemy required [DONE]
  • Move DatabaseServer and OpusDatabase out of opus_core.store and into opus_core.database_management [DONE]
    • Need to rename: MysqlDatabaseServer=>DatabaseServer [DONE]
  • Eliminate:
    • opus_core.store.mysql_storage [DONE]
    • opus_core.store.sql_server_storage [DONE]
    • opus_core.store.mysql_chain_storage [DONE]
    • urbansim.store.database_tools [DONE]
    • opus_core.store.opus_database [DONE]
    • opus_core.store.mysql_database_server [DONE]
    • use of $$ [DONE]
  • Configurations:
    • convert opus_core.configurations.database_server_configuration to opus_core.data_management.database_server_configuration [DONE]
  • Investigate whether TableTypeSchema is necessary or not. Should it be replaced? [DONE]
    • NO, it supports engine-independent xml storage of schemas; moved to opus_core.database_management
  • change urbansim.model_coordinators.cache_mysql_data to urbansim.model_coordinators.cache_scenario_database [DONE]
  • use environment variable to get default the database engine to use [DONE]
  • replace use of GetResultsFromQuery and DoQuery in opus_core and urbansim [Done](in non-testing code])
  • update opus_upgrade [DONE]
    • scenario flattener [DONE]
    • replace opus_upgrade.elcm_changes.classes.copy_table [DONE]
  • document configuration upgrade information [DONE]
  • convert urbansim.tools.create_db_subset_by_* [DONE]
  • test
    • opus_upgrade
    • database ops through mssql
    • urbansim.tools.create_db_subset_*

Notes

  • $$ syntax for specifying that a database name should be replaced is now defunc
  • copy_table from one database to another is available through opus_core.database_management.cross_database_operations