diff --git a/.gitignore b/.gitignore index 3cb4a2c..c55e18e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ .vagrant *~ -~.sw[op] +*.sw[op] .DS_Store diff --git a/manifest.toml b/manifest.toml index 0c9d926..2f14977 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,7 @@ userdoc = "https://docs.mattermost.com/guides/messaging.html" code = "https://github.com/mattermost/mattermost-server" [integration] -yunohost = ">= 11.2" +yunohost = ">= 11.2.16" helpers_version = "2.1" architectures = ["amd64", "armhf", "arm64"] multi_instance = true diff --git a/scripts/_common.sh b/scripts/_common.sh index 09ca169..9cbd624 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -38,9 +38,9 @@ mariadb-to-pg() { popd # Some fixes to let the MariaDB -> PostgreSQL conversion working - ynh_psql_db_shell <<< "'DROP INDEX public.idx_fileinfo_content_txt;' + ynh_psql_db_shell <<< 'DROP INDEX public.idx_fileinfo_content_txt;' - ynh_psql_db_shell <<< "'DROP INDEX public.idx_posts_message_txt;' + ynh_psql_db_shell <<< 'DROP INDEX public.idx_posts_message_txt;' ynh_mysql_db_shell <<< "ALTER TABLE mattermost.Users DROP COLUMN IF EXISTS acceptedtermsofserviceid;" @@ -81,15 +81,15 @@ EOT pgloader $tmpdir/commands.load # Rebuild INDEX - ynh_psql_db_shell <<< "'CREATE INDEX idx_fileinfo_content_txt ON public.fileinfo USING gin (to_tsvector('\''english'\''::regconfig, content))' + ynh_psql_db_shell <<< 'CREATE INDEX idx_fileinfo_content_txt ON public.fileinfo USING gin (to_tsvector('\''english'\''::regconfig, content))' - ynh_psql_db_shell <<< "'CREATE INDEX idx_posts_message_txt ON public.posts USING gin (to_tsvector('\''english'\''::regconfig, (message)::text));' + ynh_psql_db_shell <<< 'CREATE INDEX idx_posts_message_txt ON public.posts USING gin (to_tsvector('\''english'\''::regconfig, (message)::text));' if ynh_compare_current_package_version --comparison eq --version 7.3.0~ynh1 then # There is a problem with version 7.3.0 and the database migration. # More information here: https://forum.mattermost.com/t/migrating-from-mariadb-to-postgresql-db/14194/6 - ynh_psql_db_shell <<< ""DELETE FROM db_migrations WHERE version=92;" + ynh_psql_db_shell <<< "DELETE FROM db_migrations WHERE version=92;" fi diff --git a/scripts/upgrade b/scripts/upgrade index bd0d412..48dd056 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -8,12 +8,14 @@ source /usr/share/yunohost/helpers #================================================= # Save the language used if not present +# FIXME: maybe replace with: ynh_app_setting_set_default --key=language --value="en" if [ -z "${language:-}" ]; then language="en" ynh_app_setting_set --key=language --value=$language fi # If version setting doesn't exist +# FIXME: maybe replace with: ynh_app_setting_set_default --key=version --value="Team" if [ -z "${version:-}" ]; then version="Team" ynh_app_setting_set --key=version --value=$version @@ -107,7 +109,7 @@ UPDATE SidebarCategories set sorting = 'manual' where sorting=''; UPDATE SidebarCategories set sorting = 'manual' where sorting IS NULL; EOM - ynh_psql_db_shell <<< ""$fix_old_version_sql" + ynh_psql_db_shell <<< "$fix_old_version_sql" # Note: it's possible that some instances need other fixes # If nothing is displayed in the sidebar it may be needed to change the Id of SidebarCategories...