kopia lustrzana https://github.com/magicbug/Cloudlog
add last login column to users table
rodzic
8298e1bfcf
commit
e498f85074
|
@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
|||
|
|
||||
*/
|
||||
|
||||
$config['migration_version'] = 166;
|
||||
$config['migration_version'] = 167;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
defined('BASEPATH') or exit('No direct script access allowed');
|
||||
|
||||
class Migration_add_last_login extends CI_Migration
|
||||
{
|
||||
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->field_exists('last_login_date', 'users')) {
|
||||
$fields = array(
|
||||
'last_login_date TIMESTAMP NULL DEFAULT NULL AFTER `reset_password_date`',
|
||||
);
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
$this->dbforge->drop_column('users', 'last_login_date');
|
||||
}
|
||||
}
|
Ładowanie…
Reference in New Issue