Browse Source

fix: [onlyoffice] repair migration with recent version of onlyoffice

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
cups_service_alpha
Valentin Lab 2 years ago
parent
commit
d2f73bd0ed
  1. 10
      onlyoffice/hooks/nextcloud_app-relation-joined
  2. 11
      onlyoffice/src/patch/00-onlyoffice-nextcloud.patch

10
onlyoffice/hooks/nextcloud_app-relation-joined

@ -19,6 +19,16 @@ compose --no-relations --no-init \
config:system:set allow_local_remote_servers --type=boolean --value=true
if [ -e "$DATASTORE"/"$TARGET_SERVICE_NAME/var/www/html/custom_apps/onlyoffice/lib/Migration/Version070400Date20220607111111.php" ]; then
(
cd "$DATASTORE"/"$TARGET_SERVICE_NAME/var/www/html/custom_apps/onlyoffice/"
patch="$CHARM_PATH/src/patch/00-onlyoffice-nextcloud.patch"
if patch -Np1 --dry-run < "$patch"; then
patch -Np1 < "$patch"
fi
)
fi
ONLYOFFICE_CFG="$SERVICE_CONFIGSTORE/etc/onlyoffice/documentserver/local.json"
out=$(jq ".services.CoAuthoring.token.enable.browser = true |
.services.CoAuthoring.token.enable.request.inbox = true |

11
onlyoffice/src/patch/00-onlyoffice-nextcloud.patch

@ -0,0 +1,11 @@
--- a/lib/Migration/Version070400Date20220607111111.php
+++ b/lib/Migration/Version070400Date20220607111111.php
@@ -73,7 +73,7 @@
'default' => 0,
]);
$table->setPrimaryKey(['id']);
- $table->addUniqueIndex(['share_id'], 'share_id_index');
+ $table->addUniqueIndex(['share_id'], 'oc_share_id_index');
}
return $schema;
Loading…
Cancel
Save