summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/ibase
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/drivers/ibase')
-rw-r--r--system/database/drivers/ibase/ibase_forge.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/system/database/drivers/ibase/ibase_forge.php b/system/database/drivers/ibase/ibase_forge.php
index a0c4e6563..39c782816 100644
--- a/system/database/drivers/ibase/ibase_forge.php
+++ b/system/database/drivers/ibase/ibase_forge.php
@@ -137,7 +137,7 @@ class CI_DB_ibase_forge extends CI_DB_forge {
$sql = 'ALTER TABLE '.$this->db->escape_identifiers($table);
$sqls = array();
- for ($i = 0, $c = count($field), $sql .= $alter_type.' '; $i < $c; $i++)
+ for ($i = 0, $c = count($field); $i < $c; $i++)
{
if ($field[$i]['_literal'] !== FALSE)
{
@@ -146,13 +146,14 @@ class CI_DB_ibase_forge extends CI_DB_forge {
if (isset($field[$i]['type']))
{
- $sqls[] = $sql.' TYPE '.$field[$i]['type'].$field[$i]['length'];
+ $sqls[] = $sql.' ALTER COLUMN '.$this->db->escape_identififers($field[$i]['name'])
+ .' TYPE '.$field[$i]['type'].$field[$i]['length'];
}
if ( ! empty($field[$i]['default']))
{
- $sqls[] = $sql.' ALTER '.$this->db->escape_identifiers($field[$i]['name'])
- .' SET '.$field[$i]['default'];
+ $sqls[] = $sql.' ALTER COLUMN '.$this->db->escape_identifiers($field[$i]['name'])
+ .' SET DEFAULT '.$field[$i]['default'];
}
if (isset($field[$i]['null']))
@@ -165,7 +166,7 @@ class CI_DB_ibase_forge extends CI_DB_forge {
if ( ! empty($field[$i]['new_name']))
{
- $sqls[] = $sql.' ALTER '.$this->db->escape_identifiers($field[$i]['name'])
+ $sqls[] = $sql.' ALTER COLUMN '.$this->db->escape_identifiers($field[$i]['name'])
.' TO '.$this->db->escape_identifiers($field[$i]['new_name']);
}
}