Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
haf_block_explorer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
haf_block_explorer
Commits
f08db13a
Commit
f08db13a
authored
1 week ago
by
Michal Zander
Browse files
Options
Downloads
Patches
Plain Diff
Remove unnecesery drop indexes flag, indexes are dropped when context is uninstalled
parent
637c8cab
No related branches found
No related tags found
1 merge request
!298
Unify API returns to sql composite types
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
backend/blocksearch/blocksearch_backend.sql
+1
-1
1 addition, 1 deletion
backend/blocksearch/blocksearch_backend.sql
scripts/uninstall_app.sh
+0
-23
0 additions, 23 deletions
scripts/uninstall_app.sh
tests/functional/test_scripts.sh
+0
-4
0 additions, 4 deletions
tests/functional/test_scripts.sh
with
1 addition
and
28 deletions
backend/blocksearch/blocksearch_backend.sql
+
1
−
1
View file @
f08db13a
...
...
@@ -167,7 +167,7 @@ CREATE OR REPLACE FUNCTION hafbe_backend.blocksearch_account_range(
_current_block
INT
)
RETURNS
hafbe_backend
.
blocksearch_account_filter_return
-- noqa: LT01, CP05
LANGUAGE
'plpgsql'
IMMU
TABLE
LANGUAGE
'plpgsql'
S
TABLE
SET
JIT
=
OFF
AS
$$
...
...
This diff is collapsed.
Click to expand it.
scripts/uninstall_app.sh
+
0
−
23
View file @
f08db13a
...
...
@@ -18,7 +18,6 @@ EOF
POSTGRES_HOST
=
"localhost"
POSTGRES_PORT
=
5432
POSTGRES_USER
=
"haf_admin"
DROP_INDEXES
=
0
while
[
$#
-gt
0
]
;
do
case
"
$1
"
in
...
...
@@ -31,9 +30,6 @@ while [ $# -gt 0 ]; do
--user
=
*
)
POSTGRES_USER
=
"
${
1
#*=
}
"
;;
--drop-indexes
*
)
DROP_INDEXES
=
1
;;
--help
|
-h
|
-
\?
)
print_help
exit
0
...
...
@@ -73,25 +69,6 @@ uninstall_app() {
psql
"
$POSTGRES_ACCESS_ADMIN
"
-c
"DROP OWNED BY hafbe_user CASCADE"
||
true
psql
"
$POSTGRES_ACCESS_ADMIN
"
-c
"DROP ROLE IF EXISTS hafbe_user"
||
true
if
[
"
${
DROP_INDEXES
}
"
-eq
1
]
;
then
echo
"Attempting to drop indexes built by application"
psql
-aw
"
$POSTGRES_ACCESS_ADMIN
"
-v
ON_ERROR_STOP
=
on
-c
'DROP INDEX IF EXISTS hafd.hive_operations_comment_search_permlink;'
psql
-aw
"
$POSTGRES_ACCESS_ADMIN
"
-v
ON_ERROR_STOP
=
on
-c
'DROP INDEX IF EXISTS hafd.hive_operations_comment_search_permlink_author;'
psql
-aw
"
$POSTGRES_ACCESS_ADMIN
"
-v
ON_ERROR_STOP
=
on
-c
'DROP INDEX IF EXISTS hafd.hive_operations_vote_author_permlink;'
psql
-aw
"
$POSTGRES_ACCESS_ADMIN
"
-v
ON_ERROR_STOP
=
on
-c
'DROP INDEX IF EXISTS hafd.hive_operations_comment_author_permlink;'
psql
-aw
"
$POSTGRES_ACCESS_ADMIN
"
-v
ON_ERROR_STOP
=
on
-c
'DROP INDEX IF EXISTS hafd.hive_operations_delete_comment_author_permlink;'
psql
-aw
"
$POSTGRES_ACCESS_ADMIN
"
-v
ON_ERROR_STOP
=
on
-c
'DROP INDEX IF EXISTS hafd.hive_operations_comment_options_author_permlink;'
psql
-aw
"
$POSTGRES_ACCESS_ADMIN
"
-v
ON_ERROR_STOP
=
on
-c
'DROP INDEX IF EXISTS hafd.hive_operations_author_reward_author_permlink;'
psql
-aw
"
$POSTGRES_ACCESS_ADMIN
"
-v
ON_ERROR_STOP
=
on
-c
'DROP INDEX IF EXISTS hafd.hive_operations_curation_author_permlink;'
psql
-aw
"
$POSTGRES_ACCESS_ADMIN
"
-v
ON_ERROR_STOP
=
on
-c
'DROP INDEX IF EXISTS hafd.hive_operations_comment_benefactor_author_permlink;'
psql
-aw
"
$POSTGRES_ACCESS_ADMIN
"
-v
ON_ERROR_STOP
=
on
-c
'DROP INDEX IF EXISTS hafd.hive_operations_comment_payout_author_permlink;'
psql
-aw
"
$POSTGRES_ACCESS_ADMIN
"
-v
ON_ERROR_STOP
=
on
-c
'DROP INDEX IF EXISTS hafd.hive_operations_comment_reward_author_permlink;'
psql
-aw
"
$POSTGRES_ACCESS_ADMIN
"
-v
ON_ERROR_STOP
=
on
-c
'DROP INDEX IF EXISTS hafd.hive_operations_effective_vote_author_permlink;'
else
echo
"Indexes created by application have been preserved"
fi
}
uninstall_app
This diff is collapsed.
Click to expand it.
tests/functional/test_scripts.sh
+
0
−
4
View file @
f08db13a
...
...
@@ -52,8 +52,4 @@ echo "Test 2. Uninstall app, leave indexes..."
./uninstall_app.sh
--host
=
"
$POSTGRES_HOST
"
echo
"Uninstall app completed successfully"
echo
"Test 3. Clear indexes..."
./uninstall_app.sh
--host
=
"
$POSTGRES_HOST
"
--drop-indexes
echo
"Uninstall app and clear indexes completed successfully"
popd
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment