mirror of
https://github.com/YunoHost-Apps/moncycle_ynh.git
synced 2024-09-03 19:46:16 +02:00
Upgrade
This commit is contained in:
parent
c2826934fe
commit
cffa3983fb
2 changed files with 17 additions and 1 deletions
6
conf/migrate_9.0.3.sql
Normal file
6
conf/migrate_9.0.3.sql
Normal file
|
@ -0,0 +1,6 @@
|
|||
ALTER TABLE `compte`
|
||||
ADD `timeline_asc` tinyint(1) unsigned NOT NULL DEFAULT '1' AFTER `nb_co_echoue`,
|
||||
ADD `recherche` tinyint(1) unsigned NOT NULL DEFAULT '0' AFTER `donateur`;
|
||||
|
||||
ALTER TABLE `observation`
|
||||
ADD `compteur` tinyint(1) unsigned NULL AFTER `jour_sommet`;
|
|
@ -48,14 +48,24 @@ pushd "$install_dir"
|
|||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < migrate_7.0.5.sql
|
||||
ynh_add_config --template="../conf/migrate_7.0.6.sql" --destination="$install_dir/migrate_7.0.6.sql"
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < migrate_7.0.6.sql
|
||||
ynh_add_config --template="../conf/migrate_9.0.3.sql" --destination="$install_dir/migrate_9.0.3.sql"
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < migrate_9.0.3.sql
|
||||
else
|
||||
if ynh_compare_current_package_version --comparison le --version 7.0~ynh6
|
||||
then
|
||||
ynh_script_progression --message="7.0.6 to 8.0 database migration required, migrating"
|
||||
ynh_add_config --template="../conf/migrate_7.0.6.sql" --destination="$install_dir/migrate_7.0.6.sql"
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < migrate_7.0.6.sql
|
||||
ynh_add_config --template="../conf/migrate_9.0.3.sql" --destination="$install_dir/migrate_9.0.3.sql"
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < migrate_9.0.3.sql
|
||||
else
|
||||
ynh_script_progression --message="7.0.6 to 8.0 database migration not required since package > 7.0.6"
|
||||
if ynh_compare_current_package_version --comparison le --version 9.0~ynh3
|
||||
then
|
||||
ynh_add_config --template="../conf/migrate_9.0.3.sql" --destination="$install_dir/migrate_9.0.3.sql"
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < migrate_9.0.3.sql
|
||||
else
|
||||
ynh_script_progression --message="7.0.6 to 8.0 database migration not required since package > 7.0.6"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
ynh_script_progression --message="You shouldn't see this"
|
||||
|
|
Loading…
Reference in a new issue