Skip to content
Snippets Groups Projects
Commit 7e079bdd authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #35088 fix int_maj_auto and profil_donnees column profil to int(11) unsigned

parent 4bb90f1e
Branches
Tags
7 merge requests!1659Master,!1622Dev#35088 oai import in cosmogramme,!1619Dev#35088 oai import in cosmogramme,!1611Dev#35088 oai import in cosmogramme,!1608Dev#40786 zendification de l ecran de parametrages des profils de donnees,!1607Dev#40786 zendification de l ecran de parametrages des profils de donnees,!1606Dev#40786 zendification de l ecran de parametrages des profils de donnees
<?php
error_reporting(E_ERROR | E_PARSE);
define("PATCH_LEVEL","292");
define("PATCH_LEVEL","293");
define("APPLI","cosmogramme");
define("COSMOPATH", "/var/www/html/vhosts/opac2/www/htdocs");
......
<?php
$adapter = Zend_Db_Table::getDefaultAdapter();
try {
$adapter->query("ALTER TABLE `profil_donnees` MODIFY `id_profil` int(11) unsigned NOT NULL auto_increment;");
$adapter->query("ALTER TABLE `int_maj_auto` MODIFY `profil` int(11) unsigned DEFAULT 0;");
} catch(Exception $e) {}
?>
\ No newline at end of file
......@@ -135,17 +135,14 @@ abstract class UpgradeDBTestCase extends PHPUnit_Framework_TestCase {
if ($type == $row['Type'])
return true;
}
} catch (Exception $e) { echo $e;}
} catch (Exception $e) {echo $e;}
$message = $message
? $message
: sprintf('Failed asserting that "%s" table CONTAINS a field "%s" of type "%s".',
$table, $name, $type);
$this->fail($message);
}
}
......@@ -598,3 +595,26 @@ class UpgradeDB_292_Test extends UpgradeDBTestCase {
$this->assertContains("14:web-service Waterbear\r\n", $this->query('select liste from variables where clef = "comm_sigb";')->fetch()['liste']);
}
}
class UpgradeDB_293_Test extends UpgradeDBTestCase {
public function prepare() {
try {
$this->query("ALTER TABLE profil_donnees MODIFY id_profil smallint(6);");
$this->query("ALTER TABLE int_maj_auto MODIFY profil tinyint(4);");
} catch(Exception $e) {}
}
/** @test */
public function intIdProfilShouldExists() {
$this->assertFieldType('profil_donnees','id_profil', 'int(11) unsigned');
}
/** @test */
public function intProfilShouldExists() {
$this->assertFieldType('int_maj_auto','profil', 'int(11) unsigned');
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment