Skip to content

Commit a6c4b24

Browse files
Fix database prefix (#1889)
* Fix database prefix Signed-off-by: Jan Vlug <[email protected]> --------- Signed-off-by: Jan Vlug <[email protected]> Co-authored-by: Tobias Knöppler <[email protected]>
1 parent 3778e39 commit a6c4b24

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bin/ncp-update-nc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ set -eE${DBG}
2121

2222
VER="$1"
2323
BIN="${0##*/}"
24+
DB_PREFIX=`php -r 'include("/var/www/nextcloud/config/config.php"); print ( $CONFIG['"'dbtableprefix'"'] );'`
25+
echo DB_PREFIX = $DB_PREFIX
2426

2527
source /usr/local/etc/library.sh
2628

@@ -72,7 +74,7 @@ fi
7274
# https://github.com/nextcloud/server/issues/10949
7375
pgrep -cf cron.php &>/dev/null && { pkill -f cron.php; sleep 3; }
7476
pgrep -cf cron.php &>/dev/null && { echo "cron.php running. Abort"; exit 1; }
75-
mysql nextcloud <<<"UPDATE oc_jobs SET reserved_at=0;"
77+
mysql nextcloud <<<"UPDATE ${DB_PREFIX}jobs SET reserved_at=0;"
7678

7779
# cleanup
7880
####################

0 commit comments

Comments
 (0)