You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
1.6 KiB
78 lines
1.6 KiB
<?php |
|
/** |
|
* CodeIgniter-Aauth |
|
* |
|
* Aauth is a User Authorization Library for CodeIgniter 4.x, which aims to make |
|
* easy some essential jobs such as login, permissions and access operations. |
|
* Despite ease of use, it has also very advanced features like grouping, |
|
* access management, public access etc.. |
|
* |
|
* @package CodeIgniter-Aauth |
|
* @author Magefly Team |
|
* @copyright 2014-2017 Emre Akay |
|
* @copyright 2018 Magefly |
|
* @license https://opensource.org/licenses/MIT MIT License |
|
* @link https://github.com/magefly/CodeIgniter-Aauth |
|
*/ |
|
|
|
namespace App\Database\Migrations; |
|
|
|
use CodeIgniter\Database\Migration; |
|
|
|
/** |
|
* Create CI session table |
|
* |
|
* @package CodeIgniter-Aauth |
|
* |
|
* @codeCoverageIgnore |
|
*/ |
|
class Migration_create_ci_sessions_table extends Migration |
|
{ |
|
/** |
|
* Create Table |
|
* |
|
* @return void |
|
*/ |
|
public function up() |
|
{ |
|
$this->forge->addField([ |
|
'id' => [ |
|
'type' => 'VARCHAR', |
|
'constraint' => 128, |
|
'null' => false, |
|
], |
|
'ip_address' => [ |
|
'type' => 'VARCHAR', |
|
'constraint' => 45, |
|
'null' => false, |
|
], |
|
'timestamp' => [ |
|
'type' => 'INT', |
|
'constraint' => 10, |
|
'unsigned' => true, |
|
'null' => false, |
|
'default' => 0, |
|
], |
|
'data' => [ |
|
'type' => 'TEXT', |
|
'null' => false, |
|
'default' => '', |
|
], |
|
]); |
|
$this->forge->addKey('id', true); |
|
$this->forge->addKey('timestamp'); |
|
$this->forge->createTable('ci_sessions', true); |
|
} |
|
|
|
//-------------------------------------------------------------------- |
|
|
|
/** |
|
* Drops Table |
|
* |
|
* @return void |
|
*/ |
|
public function down() |
|
{ |
|
$this->forge->dropTable('ci_sessions', true); |
|
} |
|
}
|
|
|