mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 02:14:13 +00:00
Added new col login_attempts to user-table
This commit is contained in:
@@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
||||
|
|
||||
*/
|
||||
|
||||
$config['migration_version'] = 233;
|
||||
$config['migration_version'] = 234;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
||||
29
application/migrations/234_login_attempts.php
Normal file
29
application/migrations/234_login_attempts.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
* This adds an option to enable grid and name lookup
|
||||
* for WWFF references
|
||||
*/
|
||||
|
||||
class Migration_login_attempts extends CI_Migration {
|
||||
|
||||
public function up()
|
||||
{
|
||||
if (!$this->db->field_exists('login_attempts', 'users')) {
|
||||
$fields = array(
|
||||
'login_attempts integer DEFAULT 0'
|
||||
);
|
||||
|
||||
$this->dbforge->add_column('users', $fields);
|
||||
}
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
if ($this->db->field_exists('login_attempts', 'users')) {
|
||||
$this->dbforge->drop_column('users', 'login_attempts');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user