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:
@@ -575,6 +575,7 @@ class PmTable
|
||||
$types['LONGVARCHAR'] = 'LONGVARCHAR';
|
||||
$types['DATE'] = 'DATE';
|
||||
$types['TIME'] = 'TIME';
|
||||
$types['DATETIME'] = 'DATETIME';
|
||||
//$types['BLOB'] = 'BLOB'; <- disabled
|
||||
//$types['CLOB'] = 'CLOB'; <- disabled
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -302,7 +302,7 @@ Ext.onReady(function(){
|
||||
id: 'field_type',
|
||||
header: _("ID_TYPE"),
|
||||
dataIndex: 'field_type',
|
||||
width: 75,
|
||||
width: 105,
|
||||
editor: new fm.ComboBox({
|
||||
typeAhead: true,
|
||||
triggerAction: 'all',
|
||||
@@ -1289,6 +1289,14 @@ function loadTableRowsFromArray(records)
|
||||
if (records.length == 0) return;
|
||||
|
||||
for (i=0;i<records.length; i++) {
|
||||
|
||||
// to map virtual field types
|
||||
switch (records[i].FLD_TYPE) {
|
||||
case 'TIMESTAMP':
|
||||
records[i].FLD_TYPE = 'DATETIME';
|
||||
break;
|
||||
}
|
||||
|
||||
var row = new PMRow({
|
||||
uid : records[i].FLD_UID,
|
||||
field_uid : records[i].FLD_DYN_UID,
|
||||
@@ -1346,8 +1354,8 @@ function mapPMFieldType(id)
|
||||
sizeField='11';
|
||||
break;
|
||||
case 'date':
|
||||
typeField='DATE';
|
||||
sizeField='';
|
||||
typeField='VARCHAR';
|
||||
sizeField='10';
|
||||
break;
|
||||
case 'textarea':
|
||||
typeField='VARCHAR';
|
||||
|
||||
Reference in New Issue
Block a user