統計
| ブランチ: | リビジョン:

pictcode / app / Config / Schema / i18n.php @ 635eef61

履歴 | 表示 | アノテート | ダウンロード (2.134 KB)

1
<?php
2
/**
3
 * This is i18n Schema file
4
 *
5
 * Use it to configure database for i18n
6
 *
7
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
8
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
9
 *
10
 * Licensed under The MIT License
11
 * For full copyright and license information, please see the LICENSE.txt
12
 * Redistributions of files must retain the above copyright notice.
13
 *
14
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
15
 * @link          http://cakephp.org CakePHP(tm) Project
16
 * @package       app.Config.Schema
17
 * @since         CakePHP(tm) v 0.2.9
18
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
19
 */
20

    
21
/**
22
 * Using the Schema command line utility
23
 *
24
 * Use it to configure database for i18n
25
 *
26
 * cake schema run create i18n
27
 */
28
class I18nSchema extends CakeSchema {
29

    
30
/**
31
 * The name property
32
 *
33
 * @var string
34
 */
35
        public $name = 'i18n';
36

    
37
/**
38
 * Before callback.
39
 *
40
 * @param array $event Schema object properties
41
 * @return bool Should process continue
42
 */
43
        public function before($event = array()) {
44
                return true;
45
        }
46

    
47
/**
48
 * After callback.
49
 *
50
 * @param array $event Schema object properties
51
 * @return void
52
 */
53
        public function after($event = array()) {
54
        }
55

    
56
/**
57
 * The i18n table definition
58
 *
59
 * @var array
60
 */
61
        public $i18n = array(
62
                'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'),
63
                'locale' => array('type' => 'string', 'null' => false, 'length' => 6, 'key' => 'index'),
64
                'model' => array('type' => 'string', 'null' => false, 'key' => 'index'),
65
                'foreign_key' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'),
66
                'field' => array('type' => 'string', 'null' => false, 'key' => 'index'),
67
                'content' => array('type' => 'text', 'null' => true, 'default' => null),
68
                'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1), 'locale' => array('column' => 'locale', 'unique' => 0), 'model' => array('column' => 'model', 'unique' => 0), 'row_id' => array('column' => 'foreign_key', 'unique' => 0), 'field' => array('column' => 'field', 'unique' => 0))
69
        );
70

    
71
}