mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-18 18:02:15 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6751 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c2b6246e83
commit
dadcfc7c6a
1 changed files with 4 additions and 1 deletions
|
|
@ -378,7 +378,10 @@
|
|||
**/
|
||||
function addColumn($table_name, $column_name, $type='number', $size='', $default = '', $notnull=false) {
|
||||
$type = $this->column_type[$type];
|
||||
if(strtoupper($type)=='INTEGER') $size = '';
|
||||
if(strtoupper($type)=='INTEGER') $size = null;
|
||||
else if(strtoupper($type)=='BIGINT') $size = null;
|
||||
else if(strtoupper($type)=='BLOB SUB_TYPE TEXT SEGMENT SIZE 32') $size = null;
|
||||
else if(strtoupper($type)=='VARCHAR' && !$size) $size = 256;
|
||||
|
||||
$query = sprintf("ALTER TABLE \"%s%s\" ADD \"%s\" ", $this->prefix, $table_name, $column_name);
|
||||
if($size) $query .= sprintf(" %s(%s) ", $type, $size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue