Commit 721ccd45aac0817a90bf3649caeddbf5eec9bf5b
1 parent
ba7c38fc
Exists in
master
Alterado tamanho do campo "Área de conhecimento";
Portabilis/ieducar#150
Showing
4 changed files
with
37 additions
and
2 deletions
Show diff stats
ieducar/misc/database/deltas/portabilis/74_aumenta_campo_area_conhecimento.sql
0 → 100644
@@ -0,0 +1,16 @@ | @@ -0,0 +1,16 @@ | ||
1 | +-- // | ||
2 | + | ||
3 | +-- | ||
4 | +-- Altera tamanho do campo setando limite para 60 caracteres | ||
5 | +-- | ||
6 | +-- @author Lucas Schmoeller da Silva <lucas@portabilis.com.br> | ||
7 | +-- @license @@license@@ | ||
8 | +-- @version $Id$ | ||
9 | + | ||
10 | +ALTER TABLE modules.area_conhecimento ALTER COLUMN nome type character varying(60); | ||
11 | + | ||
12 | +-- //@UNDO | ||
13 | + | ||
14 | +ALTER TABLE modules.area_conhecimento ALTER COLUMN nome type character varying(40); | ||
15 | + | ||
16 | +-- // | ||
0 | \ No newline at end of file | 17 | \ No newline at end of file |
ieducar/misc/database/migrations/20150902143638_altera_tamanho_campo_area_conhecimento.php
0 → 100644
@@ -0,0 +1,19 @@ | @@ -0,0 +1,19 @@ | ||
1 | +<?php | ||
2 | + | ||
3 | +use Phinx\Migration\AbstractMigration; | ||
4 | + | ||
5 | +class AlteraTamanhoCampoAreaConhecimento extends AbstractMigration | ||
6 | +{ | ||
7 | + /** | ||
8 | + * Change Method. | ||
9 | + * | ||
10 | + * Write your reversible migrations using this method. | ||
11 | + * | ||
12 | + * More information on writing migrations is available here: | ||
13 | + * http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class | ||
14 | + */ | ||
15 | + public function change() | ||
16 | + { | ||
17 | + $this->execute('ALTER TABLE modules.area_conhecimento ALTER COLUMN nome type character varying(60)'); | ||
18 | + } | ||
19 | +} |
ieducar/modules/AreaConhecimento/Model/Area.php
@@ -56,7 +56,7 @@ class AreaConhecimento_Model_Area extends CoreExt_Entity | @@ -56,7 +56,7 @@ class AreaConhecimento_Model_Area extends CoreExt_Entity | ||
56 | 56 | ||
57 | return array( | 57 | return array( |
58 | 'instituicao' => new CoreExt_Validate_Choice(array('choices' => $instituicoes)), | 58 | 'instituicao' => new CoreExt_Validate_Choice(array('choices' => $instituicoes)), |
59 | - 'nome' => new CoreExt_Validate_String(array('min' => 5, 'max' => 40)) | 59 | + 'nome' => new CoreExt_Validate_String(array('min' => 5, 'max' => 60)) |
60 | ); | 60 | ); |
61 | } | 61 | } |
62 | 62 |
ieducar/modules/AreaConhecimento/Views/EditController.php
@@ -94,6 +94,6 @@ class EditController extends Core_Controller_Page_EditController | @@ -94,6 +94,6 @@ class EditController extends Core_Controller_Page_EditController | ||
94 | 94 | ||
95 | // Nome | 95 | // Nome |
96 | $this->campoTexto('nome', $this->_getLabel('nome'), $this->getEntity()->nome, | 96 | $this->campoTexto('nome', $this->_getLabel('nome'), $this->getEntity()->nome, |
97 | - 40, 40, TRUE, FALSE, FALSE, $this->_getHelp('nome')); | 97 | + 60, 60, TRUE, FALSE, FALSE, $this->_getHelp('nome')); |
98 | } | 98 | } |
99 | } | 99 | } |
100 | \ No newline at end of file | 100 | \ No newline at end of file |