Skip to content
Snippets Groups Projects
Commit 3ac5ffb6 authored by Carsten  Rose's avatar Carsten Rose
Browse files

DatabaseTest.php, Generic.sql: default of gender changed to make good tests

parent 34127973
No related branches found
No related tags found
No related merge requests found
......@@ -199,11 +199,11 @@ class DatabaseTest extends AbstractDatabaseTest {
['Field' => 'id', 'Type' => 'bigint(20)', 'Null' => 'NO', 'Key' => 'PRI', 'Default' => '', 'Extra' => 'auto_increment'],
['Field' => 'name', 'Type' => 'varchar(128)', 'Null' => 'YES', 'Key' => '', 'Default' => '', 'Extra' => ''],
['Field' => 'firstname', 'Type' => 'varchar(128)', 'Null' => 'YES', 'Key' => '', 'Default' => '', 'Extra' => ''],
['Field' => 'gender', 'Type' => "enum('','male','female')", 'Null' => 'NO', 'Key' => '', 'Default' => '', 'Extra' => ''],
['Field' => 'gender', 'Type' => "enum('','male','female')", 'Null' => 'NO', 'Key' => '', 'Default' => 'male', 'Extra' => ''],
['Field' => 'groups', 'Type' => "set('','a','b','c')", 'Null' => 'NO', 'Key' => '', 'Default' => '', 'Extra' => ''],
];
$this->assertEquals($expected, $this->db->getTableDefinition('person'));
$this->assertEquals($expected, $this->db->getTableDefinition('Person'));
}
/**
......
......@@ -3,7 +3,7 @@ CREATE TABLE Person (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(128),
firstname VARCHAR(128),
gender ENUM('', 'male', 'female') NOT NULL DEFAULT '',
gender ENUM('', 'male', 'female') NOT NULL DEFAULT 'male',
groups SET('', 'a', 'b', 'c') NOT NULL DEFAULT ''
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment