Added new col login_attempts to user-table

This commit is contained in:
int2001
2025-01-13 08:54:37 +00:00
parent eb97006787
commit f342c80e52
2 changed files with 30 additions and 1 deletions

View File

@@ -22,7 +22,7 @@ $config['migration_enabled'] = TRUE;
|
*/
$config['migration_version'] = 233;
$config['migration_version'] = 234;
/*
|--------------------------------------------------------------------------

View 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');
}
}
}