- Extensión "jQuery Chosen" - Arreglos en migraciones para indicar el tipo de tablas InnoDB git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_PROFIND_Web/trunk@67 3fe1ab16-cfe0-e34b-8c9f-7d8c168d430d
31 lines
1000 B
PHP
31 lines
1000 B
PHP
<?php
|
|
|
|
class m120905_184758_tbl_usuarios extends CDbMigration {
|
|
|
|
public function safeUp() {
|
|
$this->createTable('tbl_usuarios', array(
|
|
'id' => 'pk',
|
|
'id_empresa' => 'integer',
|
|
'estado' => 'decimal(1,0)',
|
|
'clave_seguridad' => 'string',
|
|
'email' => 'string NOT NULL',
|
|
'nombre' => 'string',
|
|
'apellidos' => 'string',
|
|
'password' => 'string NOT NULL',
|
|
'tipo' => 'string NOT NULL',
|
|
'titulo' => 'string',
|
|
'localidad' => 'string',
|
|
'telefono' => 'string',
|
|
'descripcion' => 'text',
|
|
'last_login_time' => 'datetime',
|
|
), 'ENGINE=InnoDB CHARSET=utf8');
|
|
|
|
$this->addForeignKey('fk_usuarios_1', 'tbl_usuarios', 'id_empresa', 'tbl_empresas', 'id', 'CASCADE', 'CASCADE');
|
|
}
|
|
|
|
public function safeDown() {
|
|
$this->dropForeignKey('fk_usuarios_1', 'tbl_usuarios');
|
|
$this->dropTable('tbl_usuarios');
|
|
}
|
|
|
|
} |