Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db: cleanup: Remove crumbs after materialized views deletion #935

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions packaging/dbscripts/dbfunc-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -340,16 +340,6 @@ _dbfunc_common_run_post_upgrade() {
_dbfunc_common_schema_refresh_create
#Running post-upgrade scripts
_dbfunc_common_psql_statements_in_dir 'post_upgrade'
#run custom materialized views if exists
custom_materialized_views_file="${DBFUNC_COMMON_DBSCRIPTS_DIR}/upgrade/post_upgrade/custom/create_materialized_views.sql"
if [ -f "${custom_materialized_views_file}" ]; then
dbfunc_output "running custom materialized views from '${custom_materialized_views_file}'..."
if ! dbfunc_psql_v --file="${custom_materialized_views_file}"; then
#drop all custom views
dbfunc_psql_v --command="select DropAllCustomMaterializedViews();" > /dev/null
dbfunc_output "Illegal syntax in custom Materialized Views, Custom Materialized Views were dropped."
fi
fi
}

# Runs all the SQL scripts in directory upgrade/$1/
Expand Down
2 changes: 0 additions & 2 deletions packaging/dbscripts/dbfunc-custom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ dbfunc_common_hook_views_refresh() {
dbfunc_psql_die_v --file="${DBFUNC_COMMON_DBSCRIPTS_DIR}/create_dwh_views.sql" > /dev/null
}

# Materilized views functions, override with empty implementation on DBs that not supporting that

dbfunc_common_hook_sequence_numbers_update() {
dbfunc_psql_die_v --file="${DBFUNC_COMMON_DBSCRIPTS_DIR}/update_sequence_numbers.sql" > /dev/null
}