1
0
mirror of synced 2024-12-13 14:56:01 +03:00

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

This commit is contained in:
samw3 2007-10-16 00:03:15 +00:00
parent 61274843ed
commit d522ba7355
6 changed files with 648 additions and 648 deletions

View File

@ -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);
}
}

View File

@ -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']);
}
}

View File

@ -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);
}
}

File diff suppressed because it is too large Load Diff

View File

@ -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) . ')');
}

View File

@ -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']);
}
}