PM-595 Creacion de Dynaforms a traves de PMtables

Creacion de Dynaforms a traves de PMtables
This commit is contained in:
norahmollo
2014-10-16 14:08:25 -04:00
parent 0b55675cab
commit 2f803edbd9
3 changed files with 17 additions and 9 deletions

View File

@@ -289,6 +289,14 @@ class PmTable
$columnNode->setAttribute( 'size', $column->field_size );
}
if ($column->field_type == 'DECIMAL') {
if ($column->field_size > 2) {
$columnNode->setAttribute( 'scale', 2 );
} else {
$columnNode->setAttribute( 'scale', 1 );
}
}
$columnNode->setAttribute( 'required', ($column->field_null ? 'false' : 'true') );
// only define the primaryKey attribute if it is defined