Bonjour à tous
Bonjour
J'ai fait une mise à jour vers de 0.9.8 vers 1.1.9. Ça plante.
J'avais initialement un bug sur 0.9.8 mais on m'a conseillé de migrer pour
obtenir de l'aide.
Ce bug, qui affectait la base de données, semble empêcher la migration vers
1.1.9.
\__/
(xx)
//||\\
Une erreur s'est produiteExceptionCHECK constraint failed: servicesin
.../include/lib/KD2/DB/*SQLite3.php*:519
515 public function exec(string
$statement)516 {517 $this->connect();518 $query =
$this->applyTablePrefix($statement);519 return
$this->db->exec($statement);520 }521522 /**523 * Runs a query and
returns the first row from the result
in .../include/lib/KD2/DB/*SQLite3.php*:519→ SQLite3->exec (1 arg.)
$query
string(91) "INSERT INTO services SELECT id, intitule, description,
duree, debut, fin FROM cotisations;
"
515 public function exec(string
$statement)516 {517 $this->connect();518 $query =
$this->applyTablePrefix($statement);519 return
$this->db->exec($statement);520 }521522 /**523 * Runs a query and
returns the first row from the result
in .../include/lib/KD2/DB/*SQLite3.php*:636→ KD2\DB\SQLite3->exec (1 arg.)
$statement
string(91) "INSERT INTO services SELECT id, intitule, description,
duree, debut, fin FROM cotisations;
"
632 continue;633 }634635 try {636
$this->exec($statement);637 }638
catch (\Exception $e) {639 throw new
\Exception(sprintf("Error in '%s': %s\n%s", basename($file),
$e->getMessage(), $statement), 0, $e);640 }
in .../include/lib/Garradin/*Upgrade.php*:60→ KD2\DB\SQLite3->import (1
arg.)
$file
string(36) ".../include/data/1.0.0_migration.sql"
56 try {57 if (version_compare($v, '1.0.0-rc1',
'<'))58 {59 $db->beginSchemaUpdate();60 $db->import(ROOT .
'/include/data/1.0.0_migration.sql');61 $db->commitSchemaUpdate();6263 //
Import nouveau plan comptable64 $chart = new
\Garradin\Entities\Accounting\Chart;
in .../www/admin/*upgrade.php*:36→ Garradin\Upgrade::upgrade (0 arg.)
32</script>';3334flush();3536Upgrade::upgrade();3738echo '<h2>Mise
à
jour terminée.</h2>39<p><a
href="'.ADMIN_URL.'">Retour</a></p>40
ExceptionError in '1.0.0_migration.sql': CHECK constraint failed: services
INSERT INTO services SELECT id, intitule, description, duree, debut, fin
FROM cotisations;
in .../include/lib/KD2/DB/*SQLite3.php*:639
635 try {636 $this->exec($statement);637
}638 catch (\Exception $e) {639 throw
new \Exception(sprintf("Error in '%s': %s\n%s", basename($file),
$e->getMessage(), $statement), 0, $e);640 }641642
$statement = '';643 }
in .../include/lib/Garradin/*Upgrade.php*:60→ KD2\DB\SQLite3->import (1
arg.)
$file
string(36) ".../include/data/1.0.0_migration.sql"
56 try {57 if (version_compare($v, '1.0.0-rc1',
'<'))58 {59 $db->beginSchemaUpdate();60 $db->import(ROOT .
'/include/data/1.0.0_migration.sql');61 $db->commitSchemaUpdate();6263 //
Import nouveau plan comptable64 $chart = new
\Garradin\Entities\Accounting\Chart;
in .../www/admin/*upgrade.php*:36→ Garradin\Upgrade::upgrade (0 arg.)
32</script>';3334flush();3536Upgrade::upgrade();3738echo '<h2>Mise
à
jour terminée.</h2>39<p><a
href="'.ADMIN_URL.'">Retour</a></p>40
Context
id c31brd22
date 2021-06-21T17:11:59+02:00
os Linux
language PHP 7.4.16
environment development
php_sapi fpm-fcgi
remote_ip 89.234.156.29
http_method GET
files_sent array(0) { }
rootDirectory /home/gestion_o2form/public_html_119
garradin_data_root /home/gestion_o2form/public_html_119/data
garradin_version 1.1.9
url https://gestion.o2form.fr/admin/upgrade.php
tu en ai ou ???
Le 24/06/2021 à 23:01, Bruno C a écrit :
> Bonjour à tous
>
> Bonjour
>
> J'ai fait une mise à jour vers de 0.9.8 vers 1.1.9. Ça plante.
> J'avais initialement un bug sur 0.9.8 mais on m'a conseillé de migrer
> pour obtenir de l'aide.
> Ce bug, qui affectait la base de données, semble empêcher la migration
> vers 1.1.9.
>
>
>
> \__/
> (xx)
> //||\\
>
>
> Une erreur s'est produite
>
>
> Exception
>
>
> CHECK constraint failed: services
>
>
> in .../include/lib/KD2/DB/*SQLite3.php*:519
>
> |515 public function exec(string $statement) 516 { 517
> $this->connect(); 518 $query = $this->applyTablePrefix($statement);
> 519 return $this->db->exec($statement); 520 } 521 522 /** 523 * Runs a
> query and returns the first row from the result |
>
>
> in .../include/lib/KD2/DB/*SQLite3.php*:519
>
>
> → SQLite3->exec (1 arg.)
>
> $query
> string(91) "INSERT INTO services SELECT id, intitule, description, duree,
debut, fin FROM cotisations;
> "
>
> |515 public function exec(string $statement) 516 { 517
> $this->connect(); 518 $query = $this->applyTablePrefix($statement);
> 519 return $this->db->exec($statement); 520 } 521 522 /** 523 * Runs a
> query and returns the first row from the result |
>
>
> in .../include/lib/KD2/DB/*SQLite3.php*:636
>
>
> → KD2\DB\SQLite3->exec (1 arg.)
>
> $statement
> string(91) "INSERT INTO services SELECT id, intitule, description, duree,
debut, fin FROM cotisations;
> "
>
> |632 continue; 633 } 634 635 try { 636 $this->exec($statement); 637 }
> 638 catch (\Exception $e) { 639 throw new \Exception(sprintf("Error in
> '%s': %s\n%s", basename($file), $e->getMessage(), $statement),
0, $e);
> 640 } |
>
>
> in .../include/lib/Garradin/*Upgrade.php*:60
>
>
> → KD2\DB\SQLite3->import (1 arg.)
>
> $file
> string(36) ".../include/data/1.0.0_migration.sql"
>
> |56 try { 57 if (version_compare($v, '1.0.0-rc1', '<'))
58 { 59
> $db->beginSchemaUpdate(); 60 $db->import(ROOT .
> '/include/data/1.0.0_migration.sql'); 61 $db->commitSchemaUpdate();
62
> 63 // Import nouveau plan comptable 64 $chart = new
> \Garradin\Entities\Accounting\Chart; |
>
>
> in .../www/admin/*upgrade.php*:36
>
>
> → Garradin\Upgrade::upgrade (0 arg.)
>
> |32</script>'; 33 34flush(); 35 36Upgrade::upgrade(); 37 38echo
> '<h2>Mise à jour terminée.</h2> 39<p><a
> href="'.ADMIN_URL.'">Retour</a></p> 40 |
>
>
> Exception
>
>
> Error in '1.0.0_migration.sql': CHECK constraint failed:
services
> INSERT INTO services SELECT id, intitule, description, duree,
> debut, fin FROM cotisations;
>
>
> in .../include/lib/KD2/DB/*SQLite3.php*:639
>
> |635 try { 636 $this->exec($statement); 637 } 638 catch (\Exception
> $e) { 639 throw new \Exception(sprintf("Error in '%s':
%s\n%s",
> basename($file), $e->getMessage(), $statement), 0, $e); 640 } 641 642
> $statement = ''; 643 } |
>
>
> in .../include/lib/Garradin/*Upgrade.php*:60
>
>
> → KD2\DB\SQLite3->import (1 arg.)
>
> $file
> string(36) ".../include/data/1.0.0_migration.sql"
>
> |56 try { 57 if (version_compare($v, '1.0.0-rc1', '<'))
58 { 59
> $db->beginSchemaUpdate(); 60 $db->import(ROOT .
> '/include/data/1.0.0_migration.sql'); 61 $db->commitSchemaUpdate();
62
> 63 // Import nouveau plan comptable 64 $chart = new
> \Garradin\Entities\Accounting\Chart; |
>
>
> in .../www/admin/*upgrade.php*:36
>
>
> → Garradin\Upgrade::upgrade (0 arg.)
>
> |32</script>'; 33 34flush(); 35 36Upgrade::upgrade(); 37 38echo
> '<h2>Mise à jour terminée.</h2> 39<p><a
> href="'.ADMIN_URL.'">Retour</a></p> 40 |
>
>
> Context
>
> id c31brd22
> date 2021-06-21T17:11:59+02:00
> os Linux
> language PHP 7.4.16
> environment development
> php_sapi fpm-fcgi
> remote_ip 89.234.156.29
> http_method GET
> files_sent array(0) { }
> rootDirectory /home/gestion_o2form/public_html_119
> garradin_data_root /home/gestion_o2form/public_html_119/data
> garradin_version 1.1.9
> url https://gestion.o2form.fr/admin/upgrade.php
> <https://gestion.o2form.fr/admin/upgrade.php>
>
>
>
Hello,
ce bug est corrigé, ça sera dans la 1.1.10 :)
Dans les suggestions : peut on faire en sorte que lorsqu’on creee un nouveau compte les
comptes de classe 6 soit obligatoirement un compte de charge ceux de classe 7 des comptes
de produits ?
Et les autres des comptes de bilan? Je me suis déjà planté deux fois . On décèle vite
l’erreur mais on se sent tellement bêêêête!
Envoyé de mon iPhone
> Le 29 juin 2021 à 21:30, BohwaZ/Garradin <bohwaz@garradin.eu> a écrit :
>
> Hello,
>
> ce bug est corrigé, ça sera dans la 1.1.10 :)
>
> --
> . ____
> / ___| Liste d'entraide des utilisateurs de Garradin
> | | _ http://garradin.eu/
> | |_| |
> \____| Désinscription : http://garradin.eu/aide/
Merci c'est noté :)