mirror of
https://github.com/YunoHost-Apps/weblate_ynh.git
synced 2024-10-01 13:35:04 +02:00
add innodb_large_prefix
This commit is contained in:
parent
5bc192cc1f
commit
8f10130e92
4 changed files with 17 additions and 1 deletions
11
README.md
11
README.md
|
@ -1,3 +1,14 @@
|
|||
# Weblate translation platform for YunoHost
|
||||
|
||||
The YunoHost team uses [Weblate](https://weblate.org) for its community: http://translate.yunohost.org/
|
||||
|
||||
## Weblate & Mysql
|
||||
|
||||
Weblate [recommands PostgreSQL](https://docs.weblate.org/en/latest/admin/install.html#database-setup-for-weblate), but YunoHost uses Mysql.
|
||||
|
||||
You should make sure to change this settings in your mysql config file:
|
||||
|
||||
* set global innodb_file_format = BARRACUDA;
|
||||
* set global innodb_large_prefix = ON;
|
||||
|
||||
If you experience some transaction issues, please read [Transaction-locking help](https://docs.weblate.org/en/latest/admin/install.html#transaction-locking).
|
||||
|
|
|
@ -52,7 +52,7 @@ DATABASES = {
|
|||
# Additional database options
|
||||
'OPTIONS': {
|
||||
# In case of older MySQL server which has default MariaDB
|
||||
# 'init_command': 'SET storage_engine=INNODB',
|
||||
'init_command': "SET storage_engine=INNODB; SET sql_mode='STRICT_TRANS_TABLES'",
|
||||
# If your server supports it, see Unicode issues above
|
||||
'charset': 'utf8mb4',
|
||||
}
|
||||
|
|
|
@ -86,7 +86,10 @@ ynh_app_setting_set $app db_name $db_name
|
|||
ynh_mysql_setup_db $db_name $db_name
|
||||
|
||||
# https://docs.weblate.org/en/latest/admin/install.html#unicode-issues-in-mysql
|
||||
# http://mechanics.flite.com/blog/2014/07/29/using-innodb-large-prefix-to-avoid-error-1071/
|
||||
ynh_mysql_execute_as_root "ALTER DATABASE $db_name CHARACTER SET utf8mb4;"
|
||||
ynh_mysql_execute_as_root "set global innodb_file_format = BARRACUDA;"
|
||||
ynh_mysql_execute_as_root "set global innodb_large_prefix = ON;"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
|
|
@ -62,6 +62,8 @@ ynh_restore_file "$final_path"
|
|||
db_pwd=$(ynh_app_setting_get $app mysqlpwd)
|
||||
ynh_mysql_setup_db $db_name $db_name $db_pwd
|
||||
ynh_mysql_connect_as $db_name $db_pwd $db_name < ./db.sql
|
||||
ynh_mysql_execute_as_root "set global innodb_file_format = BARRACUDA;"
|
||||
ynh_mysql_execute_as_root "set global innodb_large_prefix = ON;"
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
|
|
Loading…
Reference in a new issue