mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding valid options for sqlite collation. Tests added.
This commit is contained in:
parent
a33457155f
commit
23831546b5
2 changed files with 22 additions and 1 deletions
|
@ -114,7 +114,16 @@ class DboSqlite extends DboSource {
|
|||
* @access public
|
||||
*/
|
||||
var $fieldParameters = array(
|
||||
'collate' => array('value' => 'COLLATE', 'quote' => false, 'join' => ' ', 'column' => 'Collate', 'position' => 'afterDefault'),
|
||||
'collate' => array(
|
||||
'value' => 'COLLATE',
|
||||
'quote' => false,
|
||||
'join' => ' ',
|
||||
'column' => 'Collate',
|
||||
'position' => 'afterDefault',
|
||||
'options' => array(
|
||||
'BINARY', 'NOCASE', 'RTRIM'
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
|
@ -280,6 +280,18 @@ class DboSqliteTest extends CakeTestCase {
|
|||
$result = $this->db->buildColumn($data);
|
||||
$expected = '"testName" integer(10) DEFAULT \'10\' NOT NULL';
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$data = array(
|
||||
'name' => 'testName',
|
||||
'type' => 'integer',
|
||||
'length' => 10,
|
||||
'default' => 10,
|
||||
'null' => false,
|
||||
'collate' => 'BADVALUE'
|
||||
);
|
||||
$result = $this->db->buildColumn($data);
|
||||
$expected = '"testName" integer(10) DEFAULT \'10\' NOT NULL';
|
||||
$this->assertEqual($result, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue