mirror of
https://github.com/YunoHost-Apps/mattermost_ynh.git
synced 2024-09-03 19:36:29 +02:00
Reapply helpers-2.1 autoscript after fixes etc
This commit is contained in:
parent
6e0ea8868d
commit
574453228f
4 changed files with 10 additions and 8 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,5 +1,5 @@
|
|||
.vagrant
|
||||
|
||||
*~
|
||||
~.sw[op]
|
||||
*.sw[op]
|
||||
.DS_Store
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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...
|
||||
|
|
Loading…
Add table
Reference in a new issue