BUG 8609 "Missing datetime field type" SOLVED

- the reporter is right, DATETIME field type is missing
- DATETIME field type was added, it is not a directly supported type by our ORM (propel), but we're handling that with its equivalent TIMESTAMP, but don't worry it is transparent by final users.
This commit is contained in:
Erik Amaru Ortiz
2012-03-08 16:08:37 -04:00
parent 7bb6359bb2
commit 4e6ade5d1b
3 changed files with 21 additions and 4 deletions

View File

@@ -248,6 +248,8 @@ class pmTablesProxy extends HttpProxyController
switch ($column->field_type) {
case 'INT': $columns[$i]->field_type = 'INTEGER'; break;
case 'TEXT': $columns[$i]->field_type = 'LONGVARCHAR'; break;
// propel DATETIME equivalent is TIMESTAMP
case 'DATETIME': $columns[$i]->field_type = 'TIMESTAMP'; break;
}
// VALIDATIONS
@@ -318,7 +320,13 @@ class pmTablesProxy extends HttpProxyController
}
if ($isReportTable && $alterTable) {
$oAdditionalTables->populateReportTable($data['REP_TAB_NAME'], $pmTable->getDataSource(), $data['REP_TAB_TYPE'], $data['PRO_UID'], $data['REP_TAB_GRID']);
// the table was create successfully but we're catching problems while populating table
try {
$oAdditionalTables->populateReportTable($data['REP_TAB_NAME'], $pmTable->getDataSource(), $data['REP_TAB_TYPE'], $data['PRO_UID'], $data['REP_TAB_GRID']);
}
catch (Exception $e) {
$result->message = $result->msg = $e->getMessage();
}
}
$result->success = true;