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

Merge branch...

Merge branch 'hotline#160807_suspension_du_moissonnage_des_ressources_de_la_mediatheque_departementale' into 'master'

hotline : #160807 : growth id_dewey

See merge request !4539
parents 3f6de315 0f1ef98a
Branches
Tags
1 merge request!4539hotline : #160807 : growth id_dewey
Pipeline #18429 passed with stage
in 20 minutes and 1 second
- 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 { ...@@ -4699,3 +4699,25 @@ class UpgradeDB_435_Test extends UpgradeDBTestCase {
$this->assertFieldType('records_identifiers', $field, $type); $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