Merge branch 'maint/7.0'
[ninja.git] / system / config / sql_types.php
blob2431c707039d86847ad9c7325b6eda3803e88738
1 <?php defined('SYSPATH') OR die('No direct access allowed.');
2 /**
3 * @package Database
5 * SQL data types. If there are missing values, please report them:
7 * @link http://trac.kohanaphp.com/newticket
8 */
9 $config = array
11 'tinyint' => array('type' => 'int', 'max' => 127),
12 'smallint' => array('type' => 'int', 'max' => 32767),
13 'mediumint' => array('type' => 'int', 'max' => 8388607),
14 'int' => array('type' => 'int', 'max' => 2147483647),
15 'integer' => array('type' => 'int', 'max' => 2147483647),
16 'bigint' => array('type' => 'int', 'max' => 9223372036854775807),
17 'float' => array('type' => 'float'),
18 'float unsigned' => array('type' => 'float', 'min' => 0),
19 'boolean' => array('type' => 'boolean'),
20 'time' => array('type' => 'string', 'format' => '00:00:00'),
21 'date' => array('type' => 'string', 'format' => '0000-00-00'),
22 'year' => array('type' => 'string', 'format' => '0000'),
23 'datetime' => array('type' => 'string', 'format' => '0000-00-00 00:00:00'),
24 'char' => array('type' => 'string', 'exact' => TRUE),
25 'binary' => array('type' => 'string', 'binary' => TRUE, 'exact' => TRUE),
26 'varchar' => array('type' => 'string'),
27 'varbinary' => array('type' => 'string', 'binary' => TRUE),
28 'blob' => array('type' => 'string', 'binary' => TRUE),
29 'text' => array('type' => 'string')
32 // DOUBLE
33 $config['double'] = $config['double unsigned'] = $config['decimal'] = $config['real'] = $config['numeric'] = $config['float'];
35 // BIT
36 $config['bit'] = $config['boolean'];
38 // TIMESTAMP
39 $config['timestamp'] = $config['datetime'];
41 // ENUM
42 $config['enum'] = $config['set'] = $config['varchar'];
44 // TEXT
45 $config['tinytext'] = $config['mediumtext'] = $config['longtext'] = $config['text'];
47 // BLOB
48 $config['tinyblob'] = $config['mediumblob'] = $config['longblob'] = $config['clob'] = $config['blob'];