From f013ea54802fb69337653eb033e74502c68e5d1f Mon Sep 17 00:00:00 2001 From: Ricardo Bortotto Date: Fri, 14 Jun 2013 19:34:48 -0300 Subject: [PATCH] Alterado o tamanho do campo Nome do cadastro de componentes curriculares para 200 caracteres Closes #19. --- ieducar/misc/database/deltas/portabilis/52_altera_tamanho_campo_nome_componente_curricular.sql | 16 ++++++++++++++++ ieducar/modules/ComponenteCurricular/Model/Componente.php | 4 ++-- ieducar/modules/ComponenteCurricular/Views/EditController.php | 4 ++-- 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 ieducar/misc/database/deltas/portabilis/52_altera_tamanho_campo_nome_componente_curricular.sql diff --git a/ieducar/misc/database/deltas/portabilis/52_altera_tamanho_campo_nome_componente_curricular.sql b/ieducar/misc/database/deltas/portabilis/52_altera_tamanho_campo_nome_componente_curricular.sql new file mode 100644 index 0000000..13e0f2c --- /dev/null +++ b/ieducar/misc/database/deltas/portabilis/52_altera_tamanho_campo_nome_componente_curricular.sql @@ -0,0 +1,16 @@ + -- // + + -- + -- Altera tamanho da coluna 'nome' da tabela modules.componente_curricular + -- + -- @author Ricardo Bortolotto Dagostim + -- @license @@license@@ + -- @version $Id$ + + ALTER TABLE modules.componente_curricular ALTER COLUMN nome type character varying(200); + + -- //@UNDO + + ALTER TABLE modules.componente_curricular ALTER COLUMN nome type character varying(100); + + -- // diff --git a/ieducar/modules/ComponenteCurricular/Model/Componente.php b/ieducar/modules/ComponenteCurricular/Model/Componente.php index 5308cb1..33786ff 100644 --- a/ieducar/modules/ComponenteCurricular/Model/Componente.php +++ b/ieducar/modules/ComponenteCurricular/Model/Componente.php @@ -89,7 +89,7 @@ class ComponenteCurricular_Model_Componente extends CoreExt_Entity return array( 'instituicao' => new CoreExt_Validate_Choice(array('choices' => $instituicoes)), - 'nome' => new CoreExt_Validate_String(array('min' => 5, 'max' => 100)), + 'nome' => new CoreExt_Validate_String(array('min' => 5, 'max' => 200)), 'abreviatura' => new CoreExt_Validate_String(array('min' => 2, 'max' => 15)), 'tipo_base' => new CoreExt_Validate_Choice(array('choices' => $tipos)), 'area_conhecimento' => new CoreExt_Validate_Choice(array('choices' => $areas)), @@ -103,4 +103,4 @@ class ComponenteCurricular_Model_Componente extends CoreExt_Entity { return $this->nome; } -} \ No newline at end of file +} diff --git a/ieducar/modules/ComponenteCurricular/Views/EditController.php b/ieducar/modules/ComponenteCurricular/Views/EditController.php index d568c5a..04c3eb4 100644 --- a/ieducar/modules/ComponenteCurricular/Views/EditController.php +++ b/ieducar/modules/ComponenteCurricular/Views/EditController.php @@ -93,7 +93,7 @@ class EditController extends Core_Controller_Page_EditController // Nome $this->campoTexto('nome', $this->_getLabel('nome'), $this->getEntity()->nome, - 50, 100, TRUE, FALSE, FALSE, $this->_getHelp('nome')); + 50, 200, TRUE, FALSE, FALSE, $this->_getHelp('nome')); // Abreviatura $this->campoTexto('abreviatura', $this->_getLabel('abreviatura'), @@ -111,4 +111,4 @@ class EditController extends Core_Controller_Page_EditController $this->campoLista('area_conhecimento', $this->_getLabel('area_conhecimento'), $areas, $this->getEntity()->get('area_conhecimento')); } -} \ No newline at end of file +} -- libgit2 0.21.2