Skip to content
Snippets Groups Projects
Commit 0f1ef98a authored by Sebastien ANDRE's avatar Sebastien ANDRE
Browse files

hotline : #160807 : growth id_dewey

parent bca2ef95
Branches
Tags
1 merge request!4539hotline : #160807 : growth id_dewey
Pipeline #18416 passed with stage
in 47 minutes and 51 seconds
- correctif #160807 : Cosmogramme : taille maximum des indices Dewey élargie à 255 caractères
\ No newline at end of file
<?php
$adapter = Zend_Db_Table_Abstract::getDefaultAdapter();
try {
$adapter->query('alter table codif_dewey drop primary key');
} catch(Exception $e) {}
try {
$adapter->query('alter table codif_dewey modify id_dewey varchar(255)');
$adapter->query('alter table codif_dewey add primary key (id_dewey)');
} catch(Exception $e) {}
......@@ -4699,3 +4699,25 @@ class UpgradeDB_435_Test extends UpgradeDBTestCase {
$this->assertFieldType('records_identifiers', $field, $type);
}
}
class UpgradeDB_436_Test extends UpgradeDBTestCase {
public function prepare() {
$this->silentQuery('alter table codif_dewey modify id_dewey varchar(30)');
}
/** @test */
public function tableCodifDeweyShouldHaveColumnIdDeweyWithTypeVarchar255() {
$this->assertFieldType('codif_dewey', 'id_dewey', 'varchar(255)');
}
/** @test */
public function tableCodifDeweyShouldHaveIdDeweyAsPrimary() {
$columns = $this->query("show columns from codif_dewey where field='id_dewey'")->fetch();
$this->assertEquals('PRI', $columns['Key']);
}
}
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