mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
Merge pull request #1266 from izuzero/develop.15
DB Column 생성 시 기본값으로 0을 지정할 수 없는 문제 해결
This commit is contained in:
commit
4443745bd7
3 changed files with 6 additions and 6 deletions
|
|
@ -479,7 +479,7 @@ class DBCubrid extends DB
|
|||
* @param boolean $notnull not null status, default value is false
|
||||
* @return void
|
||||
*/
|
||||
function addColumn($table_name, $column_name, $type = 'number', $size = '', $default = '', $notnull = FALSE)
|
||||
function addColumn($table_name, $column_name, $type = 'number', $size = '', $default = null, $notnull = FALSE)
|
||||
{
|
||||
$type = strtoupper($this->column_type[$type]);
|
||||
if($type == 'INTEGER')
|
||||
|
|
@ -506,7 +506,7 @@ class DBCubrid extends DB
|
|||
$query .= sprintf("%s ", $type);
|
||||
}
|
||||
|
||||
if($default)
|
||||
if(isset($default))
|
||||
{
|
||||
if($type == 'INTEGER' || $type == 'BIGINT' || $type == 'INT')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ class DBMssql extends DB
|
|||
* @param boolean $notnull not null status, default value is false
|
||||
* @return void
|
||||
*/
|
||||
function addColumn($table_name, $column_name, $type = 'number', $size = '', $default = '', $notnull = false)
|
||||
function addColumn($table_name, $column_name, $type = 'number', $size = '', $default = null, $notnull = false)
|
||||
{
|
||||
if($this->isColumnExists($table_name, $column_name))
|
||||
{
|
||||
|
|
@ -399,7 +399,7 @@ class DBMssql extends DB
|
|||
$query .= sprintf(" %s ", $type);
|
||||
}
|
||||
|
||||
if($default)
|
||||
if(isset($default))
|
||||
{
|
||||
$query .= sprintf(" default '%s' ", $default);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ class DBMysql extends DB
|
|||
* @param boolean $notnull not null status, default value is false
|
||||
* @return void
|
||||
*/
|
||||
function addColumn($table_name, $column_name, $type = 'number', $size = '', $default = '', $notnull = false)
|
||||
function addColumn($table_name, $column_name, $type = 'number', $size = '', $default = null, $notnull = false)
|
||||
{
|
||||
$type = $this->column_type[$type];
|
||||
if(strtoupper($type) == 'INTEGER')
|
||||
|
|
@ -316,7 +316,7 @@ class DBMysql extends DB
|
|||
{
|
||||
$query .= sprintf(" %s ", $type);
|
||||
}
|
||||
if($default)
|
||||
if(isset($default))
|
||||
{
|
||||
$query .= sprintf(" default '%s' ", $default);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue