diff --git a/onlyoffice/hooks/nextcloud_app-relation-joined b/onlyoffice/hooks/nextcloud_app-relation-joined index 616d7f4..4ae00b1 100755 --- a/onlyoffice/hooks/nextcloud_app-relation-joined +++ b/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 | diff --git a/onlyoffice/src/patch/00-onlyoffice-nextcloud.patch b/onlyoffice/src/patch/00-onlyoffice-nextcloud.patch new file mode 100644 index 0000000..dcd7fd1 --- /dev/null +++ b/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;