-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCakeTreeMigrationModelFixture.php
More file actions
45 lines (42 loc) · 2.02 KB
/
CakeTreeMigrationModelFixture.php
File metadata and controls
45 lines (42 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
/**
* NetCommonsTreeBehaviorModelFixture
*
* @author Noriko Arai <arai@nii.ac.jp>
* @author Shohei Nakajima <nakajimashouhei@gmail.com>
* @link http://www.netcommons.org NetCommons Project
* @license http://www.netcommons.org/license.txt NetCommons License
* @copyright Copyright 2014, NetCommons Project
*/
App::uses('CakeTreeModelFixture', 'NetCommons.Test/Fixture');
/**
* NetCommonsTreeBehaviorModelFixture
*
* @author Shohei Nakajima <nakajimashouhei@gmail.com>
* @package NetCommons\NetCommons\Test\Fixture
* @SuppressWarnings(PHPMD.ExcessiveClassLength)
*/
class CakeTreeMigrationModelFixture extends CakeTreeModelFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'key' => 'index'),
'lft' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'key' => 'index'),
'rght' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'key' => 'index'),
'tree_name' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
'weight' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'key' => 'index'),
'sort_key' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8', 'key' => 'index'),
'child_count' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'key' => 'index'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'parent_id' => array('column' => 'parent_id', 'unique' => 0),
'lft' => array('column' => array('lft', 'rght'), 'unique' => 0),
'rght' => array('column' => array('rght', 'id'), 'unique' => 0),
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'InnoDB')
);
}