Skip to content

Commit 364d6bb

Browse files
committed
Fix migration problems
1 parent bf84471 commit 364d6bb

2 files changed

Lines changed: 6 additions & 11 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,7 @@ jobs:
148148
149149
echo "Terminating any remaining database connections..."
150150
docker exec $DDBNAME /bin/bash -c "psql -p 10563 -U dspace -d postgres -c \"
151-
SELECT pg_terminate_backend(pg_stat_activity.pid)
152-
FROM pg_stat_activity
153-
WHERE pg_stat_activity.datname = 'dspace'
154-
AND pg_stat_activity.pid <> pg_backend_pid();
155-
\""
156-
157-
echo "Checking and releasing any existing advisory locks..."
158-
docker exec $DDBNAME /bin/bash -c "psql -p 10563 -U dspace -d dspace -c \"
159-
SELECT pg_advisory_unlock_all();
151+
SELECT pg_terminate_backend(pid) FROM pg_locks WHERE locktype = 'advisory';
160152
\""
161153
162154
echo "Waiting for connections and locks to fully terminate..."

docker/docker-compose-rest.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,13 @@ services:
9797
# It used to fail when the `server` folder did not exist in `/webapps`.
9898
# This will create a symlink from the webapps directory to the server directory with the custom namespace
9999
# (e.g. /dspace/webapps/server -> /dspace/webapps/repository#server)
100+
# removed from `while`, because: not needed here
101+
# There is problem in the database when `database migrate` is called here and then from the import run from the
102+
# `deploy action`
103+
# /dspace/bin/dspace database migrate force
104+
# /dspace/bin/start-handle-server
100105
- |
101106
while (!</dev/tcp/dspacedb/${PG_PORT}) > /dev/null 2>&1; do sleep 1; done;
102-
/dspace/bin/dspace database migrate force
103-
/dspace/bin/start-handle-server
104107
./custom_run.sh
105108
# DSpace database container
106109
dspacedb:

0 commit comments

Comments
 (0)