Commit 5fd17b8eca9c9f74cf58c9e0b367e3ca4cba0228
Exists in
master
Merge branch 'fix_instituicao_date'
Showing
2 changed files
with
15 additions
and
2 deletions
Show diff stats
ieducar/intranet/educar_instituicao_cad.php
| ... | ... | @@ -194,6 +194,13 @@ class indice extends clsCadastro |
| 194 | 194 | $obj->data_base_remanejamento = Portabilis_Date_Utils::brToPgSQL($this->data_base_remanejamento); |
| 195 | 195 | $obj->data_base_transferencia = Portabilis_Date_Utils::brToPgSQL($this->data_base_transferencia); |
| 196 | 196 | |
| 197 | + if ($this->data_base_remanejamento == '') | |
| 198 | + unset($obj->data_base_remanejamento); | |
| 199 | + | |
| 200 | + if ($this->data_base_transferencia == '') | |
| 201 | + unset($obj->data_base_transferencia); | |
| 202 | + | |
| 203 | + | |
| 197 | 204 | $cadastrou = $obj->cadastra(); |
| 198 | 205 | if( $cadastrou ) |
| 199 | 206 | { |
| ... | ... | @@ -218,6 +225,12 @@ class indice extends clsCadastro |
| 218 | 225 | $obj->data_base_remanejamento = Portabilis_Date_Utils::brToPgSQL($this->data_base_remanejamento); |
| 219 | 226 | $obj->data_base_transferencia = Portabilis_Date_Utils::brToPgSQL($this->data_base_transferencia); |
| 220 | 227 | |
| 228 | + if ($this->data_base_remanejamento == '') | |
| 229 | + unset($obj->data_base_remanejamento); | |
| 230 | + | |
| 231 | + if ($this->data_base_transferencia == '') | |
| 232 | + unset($obj->data_base_transferencia); | |
| 233 | + | |
| 221 | 234 | $editou = $obj->edita(); |
| 222 | 235 | if( $editou ) |
| 223 | 236 | { | ... | ... |
ieducar/misc/database/migrations/20161007002450_add_columns_transferido_remanejado.php
| ... | ... | @@ -9,8 +9,8 @@ class AddColumnsTransferidoRemanejado extends AbstractMigration |
| 9 | 9 | { |
| 10 | 10 | $this->execute("ALTER TABLE pmieducar.matricula_turma ADD COLUMN transferido boolean;"); |
| 11 | 11 | $this->execute("ALTER TABLE pmieducar.matricula_turma ADD COLUMN remanejado boolean;"); |
| 12 | - $this->execute("ALTER TABLE pmieducar.instituicao ADD COLUMN data_base_remanejamento boolean;"); | |
| 13 | - $this->execute("ALTER TABLE pmieducar.instituicao ADD COLUMN data_base_transferencia boolean;"); | |
| 12 | + $this->execute("ALTER TABLE pmieducar.instituicao ADD COLUMN data_base_remanejamento date;"); | |
| 13 | + $this->execute("ALTER TABLE pmieducar.instituicao ADD COLUMN data_base_transferencia date;"); | |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | public function down() | ... | ... |