diff --git a/www/protected/migrations/m120926_090957_tbl_empresas.php b/www/protected/migrations/m120926_090957_tbl_empresas.php new file mode 100644 index 0000000..ed376c3 --- /dev/null +++ b/www/protected/migrations/m120926_090957_tbl_empresas.php @@ -0,0 +1,16 @@ +dropColumn('tbl_empresas', 'empleados'); + $this->addColumn('tbl_empresas', 'empleados', 'string'); + } + + public function down() + { + $this->dropColumn('tbl_empresas', 'empleados'); + $this->addColumn('tbl_empresas', 'empleados', 'integer'); + } +} \ No newline at end of file diff --git a/www/protected/models/Empresa.php b/www/protected/models/Empresa.php index 7d2d7e3..e6fd05e 100644 --- a/www/protected/models/Empresa.php +++ b/www/protected/models/Empresa.php @@ -41,9 +41,7 @@ class Empresa extends CActiveRecord { // NOTE: you should only define rules for those attributes that // will receive user inputs. return array( - array('empleados', 'numerical', 'integerOnly' => true), - array('cif, nombre, email, pagina_web, direccion', 'length', 'max' => 255), - array('empleados', 'numerical', 'integerOnly' => true), + array('empleados, cif, nombre, email, pagina_web, direccion', 'length', 'max' => 255), array('pagina_web', 'url', 'defaultScheme' => 'http'), array('email', 'email'), array('descripcion', 'safe'), diff --git a/www/themes/profind/views/empresa/_form.php b/www/themes/profind/views/empresa/_form.php index 7d0ce92..e1cf027 100644 --- a/www/themes/profind/views/empresa/_form.php +++ b/www/themes/profind/views/empresa/_form.php @@ -59,8 +59,18 @@