Overview
Artifact ID: | 68f7ad6c4030445392b2531f5e4383b690a1c3839e20e5ef4938efd92172b848 |
---|---|
Ticket: | 81c7bec89a496693270f5bb9886004ad84e23b25
Problème migration fichiers wiki site internet |
User & Date: | Olav__ on 2021-03-13 15:24:15 |
Changes
- foundin changed to: "1.1.0-alpha3"
- icomment:
Bonjour, L'upgrade de la base en V1.1.0-alpha3 plante avec les données de notre wiki C'est peut être un problème similaire à celui qu'il y avait dans le ticket a83b624310b555d522cdb641c62bb9832091fc47 ? Une erreur s'est produite Exception CHECK constraint failed: files in .../include/lib/KD2/DB/SQLite3.php:520 516 { 517 $this->connect(); 518 $query = $this->applyTablePrefix($statement); 519 print ($query."<br>---------------<br>"); 520 return $this->db->exec($statement); 521 } 522 523 /** 524 * Runs a query and returns the first row from the result in .../include/lib/KD2/DB/SQLite3.php:520 → SQLite3->exec (1 arg.) $query string(227) "-- Set file size UPDATE files SET size = (SELECT LENGTH(content) FROM files_contents WHERE id = files.id); UPDATE wiki_as_files SET new_parent = (SELECT w.new_id FROM wiki_as_files w WHERE w.old_id = wiki_as_files.old_parent); " 516 { 517 $this->connect(); 518 $query = $this->applyTablePrefix($statement); 519 print ($query."<br>---------------<br>"); 520 return $this->db->exec($statement); 521 } 522 523 /** 524 * Runs a query and returns the first row from the result in .../include/lib/KD2/DB/SQLite3.php:637 → KD2\DB\SQLite3->exec (1 arg.) $statement string(227) "-- Set file size UPDATE files SET size = (SELECT LENGTH(content) FROM files_contents WHERE id = files.id); UPDATE wiki_as_files SET new_parent = (SELECT w.new_id FROM wiki_as_files w WHERE w.old_id = wiki_as_files.old_parent); " 633 continue; 634 } 635 636 try { 637 $this->exec($statement); 638 } 639 catch (\Exception $e) { 640 throw new \Exception(sprintf("Error in '%s': %s\n%s", basename($file), $e->getMessage(), $statement), 0, $e); 641 } in .../include/lib/Garradin/Upgrade.php:107 → KD2\DB\SQLite3->import (1 arg.) $file string(36) ".../include/data/1.1.0_migration.sql" 103 } 104 } 105 106 $champs = new Champs($db->firstColumn('SELECT valeur FROM config WHERE cle = \'champs_membres\';')); 107 $db->import(ROOT . '/include/data/1.1.0_migration.sql'); 108 109 // Rename membres table 110 $champs->createTable($champs::TABLE .'_tmp'); 111 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.1.0_migration.sql': CHECK constraint failed: files -- Set file size UPDATE files SET size = (SELECT LENGTH(content) FROM files_contents WHERE id = files.id); UPDATE wiki_as_files SET new_parent = (SELECT w.new_id FROM wiki_as_files w WHERE w.old_id = wiki_as_files.old_parent); in .../include/lib/KD2/DB/SQLite3.php:640 636 try { 637 $this->exec($statement); 638 } 639 catch (\Exception $e) { 640 throw new \Exception(sprintf("Error in '%s': %s\n%s", basename($file), $e->getMessage(), $statement), 0, $e); 641 } 642 643 $statement = ''; 644 } in .../include/lib/Garradin/Upgrade.php:107 → KD2\DB\SQLite3->import (1 arg.) $file string(36) ".../include/data/1.1.0_migration.sql" 103 } 104 } 105 106 $champs = new Champs($db->firstColumn('SELECT valeur FROM config WHERE cle = \'champs_membres\';')); 107 $db->import(ROOT . '/include/data/1.1.0_migration.sql'); 108 109 // Rename membres table 110 $champs->createTable($champs::TABLE .'_tmp'); 111 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 3zw6ebrh date 2021-03-13T15:19:23+01:00 os Linux language PHP 7.4.3 environment development php_sapi apache2handler remote_ip 127.0.0.1 http_method GET files_sent array(0) { } rootDirectory /var/www/garradin garradin_data_root /var/www/garradin/data garradin_version 1.1.0-alpha3 url http://127.0.0.1:81/admin/upgrade.php Merci d'avance pour l'analyse, Olav
- login: "Olav__"
- mimetype: "text/x-markdown"
- private_contact changed to: "1907055154ea8bb143cff2c522cbf8a0f8b2d55f"
- severity changed to: "Critique"
- status changed to: "Open"
- title changed to: " Problème migration fichiers wiki site internet"
- type changed to: "Bug"