Skip to content

Improve handling of views with haf types in the upgrade script

Change update script check mechanism to allow vest_amount, hive_amount, hbd_amount and interest_rate types as a table/view column.

Any view/materialized view that has any other haf type as column will be saved and dropped before the upgrade and restored afterwards.

A new sql script hive_fork_manager_save_restore_views.sql is introduced. It's not part of SCHEMA_SOURCES/DEPLOY_SOURCES, because it's run directly by upgrade script before upgrade takes place. It contains functions and table necessary to store and restore views. This sql script in installed along with the hive_fork_manager_update_script_generator.sh script.

Add --version option to scripts/setup_db.sh, which specifies which hive fork manager version to use. This is to make the testing easier.

Also, introduce psql wrapper function that extracts common options.

Closes #195 (closed)

Edited by Krzysztof Leśniak

Merge request reports