2023-11-04 17:31:07 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This adds an option to enable the
|
|
|
|
* QUICKLOG Feature
|
|
|
|
*/
|
|
|
|
|
2023-11-04 17:43:38 +00:00
|
|
|
class Migration_user_quicklog extends CI_Migration {
|
2023-11-04 17:31:07 +00:00
|
|
|
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
if (!$this->db->field_exists('user_quicklog', 'users')) {
|
|
|
|
$fields = array(
|
|
|
|
'user_quicklog integer DEFAULT 0 AFTER user_default_confirmation',
|
|
|
|
);
|
|
|
|
|
2023-11-05 11:29:59 +00:00
|
|
|
$this->dbforge->add_column('users', $fields);
|
|
|
|
}
|
|
|
|
if (!$this->db->field_exists('user_quicklog_enter', 'users')) {
|
|
|
|
$fields = array(
|
|
|
|
'user_quicklog_enter integer DEFAULT 0 AFTER user_default_confirmation',
|
|
|
|
);
|
|
|
|
|
2023-11-04 17:31:07 +00:00
|
|
|
$this->dbforge->add_column('users', $fields);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
if ($this->db->field_exists('user_quicklog', 'users')) {
|
|
|
|
$this->dbforge->drop_column('users', 'user_quicklog');
|
|
|
|
}
|
2023-11-05 11:29:59 +00:00
|
|
|
if ($this->db->field_exists('user_quicklog_enter', 'users')) {
|
|
|
|
$this->dbforge->drop_column('users', 'user_quicklog_enter');
|
|
|
|
}
|
2023-11-04 17:31:07 +00:00
|
|
|
}
|
|
|
|
}
|