root/trunk/system/config/sql_types.php

Revision 3700, 1.8 kB (checked in by Shadowhand, 12 days ago)

Updates to trunk:

  • Removed all SYSPATH file checks
  • Deleted some modules: code_coverage (3.0), shoutbox (defunct), user_guide (defunct), kobot (3.0), object_db (3.0)
  • Updated ORM and ORM_Iterator to match 3.0, enabling the new HABTM stuff, see r3636 and r3640
  • Property svn:eol-style set to LF
  • Property copyright set to Copyright (c) 2007 Kohana Team
  • Property svn:keywords set to Id
Line 
1<?php
2/**
3 * @package  Database
4 *
5 * SQL data types. If there are missing values, please report them:
6 *
7 * @link  http://trac.kohanaphp.com/newticket
8 */
9$config = array
10(
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    'boolean'      => array('type' => 'boolean'),
19    'time'         => array('type' => 'string', 'format' => '00:00:00'),
20    'date'         => array('type' => 'string', 'format' => '0000-00-00'),
21    'year'         => array('type' => 'string', 'format' => '0000'),
22    'datetime'     => array('type' => 'string', 'format' => '0000-00-00 00:00:00'),
23    'char'         => array('type' => 'string', 'exact' => TRUE),
24    'binary'       => array('type' => 'string', 'binary' => TRUE, 'exact' => TRUE),
25    'varchar'      => array('type' => 'string'),
26    'varbinary'    => array('type' => 'string', 'binary' => TRUE),
27    'blob'         => array('type' => 'string', 'binary' => TRUE),
28    'text'         => array('type' => 'string')
29);
30
31// DOUBLE
32$config['double'] = $config['double unsigned'] = $config['decimal'] = $config['real'] = $config['numeric'] = $config['float'];
33
34// BIT
35$config['bit'] = $config['boolean'];
36
37// TIMESTAMP
38$config['timestamp'] = $config['datetime'];
39
40// ENUM
41$config['enum'] = $config['set'] = $config['varchar'];
42
43// TEXT
44$config['tinytext'] = $config['mediumtext'] = $config['longtext'] = $config['text'];
45
46// BLOB
47$config['tinyblob'] = $config['mediumblob'] = $config['longblob'] = $config['clob'] = $config['blob'];
Note: See TracBrowser for help on using the browser.