Commit d522ba73 authored by samw3's avatar samw3

changes db drivers to match the new two parameter Export::getDeclaration()

parent 61274843
......@@ -326,7 +326,7 @@ class Doctrine_Export_Firebird extends Doctrine_Export
if ($query) {
$query.= ', ';
}
$query.= 'ADD ' . $this->getDeclaration($field['type'], $fieldName, $field, $name);
$query.= 'ADD ' . $this->getDeclaration($fieldName, $field);
}
}
......
......@@ -187,7 +187,7 @@ class Doctrine_Export_Frontbase extends Doctrine_Export
if ($query) {
$query.= ', ';
}
$query.= 'ADD ' . $this->conn->getDeclaration($field['type'], $fieldName, $field);
$query.= 'ADD ' . $this->conn->getDeclaration($fieldName, $field);
}
}
......@@ -220,7 +220,7 @@ class Doctrine_Export_Frontbase extends Doctrine_Export
$oldFieldName = $fieldName;
}
$oldFieldName = $this->conn->quoteIdentifier($oldFieldName, true);
$query.= 'CHANGE ' . $oldFieldName . ' ' . $this->conn->getDeclaration($field['definition']['type'], $oldFieldName, $field['definition']);
$query.= 'CHANGE ' . $oldFieldName . ' ' . $this->conn->getDeclaration($oldFieldName, $field['definition']);
}
}
......@@ -231,7 +231,7 @@ class Doctrine_Export_Frontbase extends Doctrine_Export
}
$oldFieldName = $rename[$renamedFieldName];
$field = $changes['rename'][$oldFieldName];
$query.= 'CHANGE ' . $this->conn->getDeclaration($field['definition']['type'], $oldFieldName, $field['definition']);
$query.= 'CHANGE ' . $this->conn->getDeclaration($oldFieldName, $field['definition']);
}
}
......
......@@ -183,7 +183,7 @@ class Doctrine_Export_Mssql extends Doctrine_Export
if ($query) {
$query .= ', ';
}
$query .= 'ADD ' . $this->conn->getDeclaration($field['type'], $fieldName, $field);
$query .= 'ADD ' . $this->conn->getDeclaration($fieldName, $field);
}
}
......
......@@ -302,7 +302,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export
if ($query) {
$query.= ', ';
}
$query.= 'ADD ' . $this->getDeclaration($field['type'], $fieldName, $field);
$query.= 'ADD ' . $this->getDeclaration($fieldName, $field);
}
}
......@@ -336,7 +336,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export
}
$oldFieldName = $this->conn->quoteIdentifier($oldFieldName, true);
$query .= 'CHANGE ' . $oldFieldName . ' '
. $this->getDeclaration($field['definition']['type'], $fieldName, $field['definition']);
. $this->getDeclaration($fieldName, $field['definition']);
}
}
......@@ -348,7 +348,7 @@ class Doctrine_Export_Mysql extends Doctrine_Export
$field = $changes['rename'][$renamedField];
$renamedField = $this->conn->quoteIdentifier($renamedField, true);
$query .= 'CHANGE ' . $renamedField . ' '
. $this->getDeclaration($field['definition']['type'], $field['name'], $field['definition']);
. $this->getDeclaration($field['name'], $field['definition']);
}
}
......
......@@ -423,7 +423,7 @@ END;
if ( ! empty($changes['add']) && is_array($changes['add'])) {
$fields = array();
foreach ($changes['add'] as $fieldName => $field) {
$fields[] = $this->conn->getDeclaration($field['type'], $fieldName, $field);
$fields[] = $this->conn->getDeclaration($fieldName, $field);
}
$result = $this->conn->exec('ALTER TABLE ' . $name . ' ADD (' . implode(', ', $fields) . ')');
}
......@@ -431,7 +431,7 @@ END;
if ( ! empty($changes['change']) && is_array($changes['change'])) {
$fields = array();
foreach ($changes['change'] as $fieldName => $field) {
$fields[] = $fieldName. ' ' . $this->conn->getDeclaration($field['definition']['type'], '', $field['definition']);
$fields[] = $fieldName. ' ' . $this->conn->getDeclaration('', $field['definition']);
}
$result = $this->conn->exec('ALTER TABLE ' . $name . ' MODIFY (' . implode(', ', $fields) . ')');
}
......
......@@ -360,7 +360,7 @@ class Doctrine_Export_Sqlite extends Doctrine_Export
if ($query) {
$query.= ', ';
}
$query.= 'ADD ' . $this->getDeclaration($field['type'], $fieldName, $field);
$query.= 'ADD ' . $this->getDeclaration($fieldName, $field);
}
}
......@@ -384,7 +384,7 @@ class Doctrine_Export_Sqlite extends Doctrine_Export
}
$oldFieldName = $this->conn->quoteIdentifier($oldFieldName, true);
$query .= 'CHANGE ' . $oldFieldName . ' '
. $this->getDeclaration($field['definition']['type'], $fieldName, $field['definition']);
. $this->getDeclaration($fieldName, $field['definition']);
}
}
......@@ -396,7 +396,7 @@ class Doctrine_Export_Sqlite extends Doctrine_Export
$field = $changes['rename'][$renamedField];
$renamedField = $this->conn->quoteIdentifier($renamedField, true);
$query .= 'CHANGE ' . $renamedField . ' '
. $this->getDeclaration($field['definition']['type'], $field['name'], $field['definition']);
. $this->getDeclaration($field['name'], $field['definition']);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment