76 |
$table = $zot->table($table); |
$table = $zot->table($table); |
77 |
} |
} |
78 |
|
|
79 |
$field = $table->attr($field); |
if ($table and $table->attr($field)) { |
80 |
|
|
81 |
if ($field =~ /char\((\d+)\)/) { |
$field = $table->attr($field); |
82 |
$_->set_att('max_length' => $1); |
|
83 |
|
if ($field =~ /char\((\d+)\)/ and not $_->att('max_length')) { |
84 |
|
# agregar el atributo max_length con el valor |
85 |
|
# correspondiente para char y varchar (salvo que esté |
86 |
|
# agregado) |
87 |
|
|
88 |
|
$_->set_att('max_length' => $1); |
89 |
|
} |
90 |
|
elsif ($field =~ /numeric|integer|serial/ |
91 |
|
and not ( ($_->att('hidden') and $_->att('hidden') !~ /^n/i) |
92 |
|
or $_->att('typecast') )) { |
93 |
|
# agregar typecast="number" a entries de tipo serial |
94 |
|
# que no sean hidden ni tengan typecast fijado con |
95 |
|
# anterioridad |
96 |
|
|
97 |
|
$_->set_att('typecast' => 'number'); |
98 |
|
} |
99 |
} |
} |
100 |
} |
} |
101 |
} |
} |
|
|
|