1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kanboard_ynh.git synced 2024-09-03 19:36:17 +02:00

Run migrations during upgrade script (closes #42)

This commit is contained in:
Jimmy Monin 2017-03-23 22:33:27 +01:00
parent f729560254
commit d1a3a7af0a
2 changed files with 4 additions and 1 deletions

View file

@ -52,7 +52,7 @@ define('MAIL_SENDMAIL_COMMAND', '/usr/sbin/sendmail -bs');
// Run automatically database migrations // Run automatically database migrations
// If set to false, you will have to run manually the SQL migrations from the CLI during the next Kanboard upgrade // If set to false, you will have to run manually the SQL migrations from the CLI during the next Kanboard upgrade
// Do not run the migrations from multiple processes at the same time (example: web page + background worker) // Do not run the migrations from multiple processes at the same time (example: web page + background worker)
define('DB_RUN_MIGRATIONS', true); define('DB_RUN_MIGRATIONS', false);
// Database driver: sqlite, mysql or postgres (sqlite by default) // Database driver: sqlite, mysql or postgres (sqlite by default)
define('DB_DRIVER', 'mysql'); define('DB_DRIVER', 'mysql');

View file

@ -64,6 +64,9 @@ sudo sed -i "s/yuno_domain/${domain}/g" ${DESTDIR}/config.php
sudo chown -R root:root ${DESTDIR} sudo chown -R root:root ${DESTDIR}
sudo chown -R www-data:www-data ${DESTDIR}/data sudo chown -R www-data:www-data ${DESTDIR}/data
# Launch database migration
sudo ${DESTDIR}/cli db:migrate
# Copy and set php-fpm configuration # Copy and set php-fpm configuration
phpfpm_conf="/etc/php5/fpm/pool.d/${app}.conf" phpfpm_conf="/etc/php5/fpm/pool.d/${app}.conf"
sed -i "s@#USER#@${app}@g" ../conf/php-fpm.conf sed -i "s@#USER#@${app}@g" ../conf/php-fpm.conf