From c307da72a1001b62b127786360d723cd4817b864 Mon Sep 17 00:00:00 2001 From: Gregory Colpart Date: Tue, 13 Sep 2022 10:23:46 +0200 Subject: [PATCH] =?UTF-8?q?ajout=20info=20pour=20upgrade=20base=20de=20don?= =?UTF-8?q?n=C3=A9es=20de=20Sympa?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HowtoSympa.md | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/HowtoSympa.md b/HowtoSympa.md index f1c78cdb..961c2ab6 100644 --- a/HowtoSympa.md +++ b/HowtoSympa.md @@ -379,4 +379,37 @@ Sympa::List::is_admin(Sympa::List , 'privileged_owner', 'n. main::do_lists() called at /usr/lib/cgi-bin/sympa/wwsympa.fcgi line 1557 ~~~ -Vérifier que les adresses mails dans les fichiers de configurations soient écrites en minuscules. \ No newline at end of file +Vérifier que les adresses mails dans les fichiers de configurations soient écrites en minuscules. + +## Mise à jour de la base de données + +En cas de migration de Sympa (ou autre), la structure de la base de données ne sera pas à jour. + +Vous aurez par exemple des erreurs du type : + +~~~ +wwsympa[1827142]: err main::#1557 > main::do_lists#4258 > Sympa::List::is_admin#2868 [...] ORDER BY user_admin": (42S22) Unknown column 'date_epoch_admin' in 'field list' +wwsympa[1827142]: err main::#1557 > main::do_lists#4258 > Sympa::List::is_admin#2868 DIED: Can't use an undefined value as an ARRAY reference at /usr/share/sympa/lib/Sympa/List.pm line 2868 + +task_manager[3617077]: err main::#148 > Sympa::Spindle::spin#78 > Sympa::Spool::next#125 > Sympa::Spool::Task::_load#57 > Sympa::Spool::Task::_create_all_tasks#103 > Sympa::List::has_included_users#5796 > Sympa::Database::do_prepared_query#382 Unable to execute SQL statement "SELECT COUNT(*) FROM subscriber_table WHERE list_subscriber = ? AND robot_subscriber = ? AND inclusion_subscriber IS NOT NULL": (42S22) Unknown column 'inclusion_subscriber' in 'where clause' +~~~ + + +Voici comment forcer la mise à jour de Sympa 6.2.16 à 6.2.60 par exemple : + +~~~ +# vim /etc/sympa/data_structure.version + +6.2.16 + +# su -l sympa -s /bin/sh -c "/usr/lib/sympa/bin/sympa.pl --upgrade" + +notice main:: Sympa 6.2.60 Started +notice main:: Upgrade process... +notice main:: Upgrading from 6.2.16 to 6.2.60... +notice Sympa::DatabaseManager::_check_indexes() Index session_prev_id_index on table session_table does not exist. Adding it +notice Sympa::DatabaseManager::_check_fields() Field "password_user" (table "user_table"; database "sympa") does NOT have awaited type (varchar(64)) where type in database seems to be (varchar(40)). Attempting to change it... +notice Sympa::DatabaseDriver::MySQL::update_field() ALTER TABLE user_table CHANGE password_user password_user varchar(64) +... +~~~ +