mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-18 07:29:51 +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
|
* @access public
|
||||||
*/
|
*/
|
||||||
var $fieldParameters = array(
|
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);
|
$result = $this->db->buildColumn($data);
|
||||||
$expected = '"testName" integer(10) DEFAULT \'10\' NOT NULL';
|
$expected = '"testName" integer(10) DEFAULT \'10\' NOT NULL';
|
||||||
$this->assertEqual($result, $expected);
|
$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