Skip to content

Commit

Permalink
db: cleanup: Remove crumbs after materialized views deletion
Browse files Browse the repository at this point in the history
There were some remained parts after materialized views functionality deletion.
Comments and if-blocks that don't mean anything now.
Initial deletion commit hash: fa5ead3

Signed-off-by: Stanislav Melnichuk <melnichuk.stas@gmail.com>
  • Loading branch information
0ffer authored and mwperina committed Apr 15, 2024
1 parent 943a244 commit 7238a37
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
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
}

0 comments on commit 7238a37

Please sign in to comment.