This commit is contained in:
2026-07-12 19:21:35 +02:00
parent f2d944b117
commit 41cb412cb0
49 changed files with 3170 additions and 52 deletions
@@ -0,0 +1,29 @@
<?php
namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class CreateRememberTokens extends Migration
{
public function up(): void
{
$this->forge->addField([
'id' => ['type' => 'INT', 'constraint' => 11, 'unsigned' => true, 'auto_increment' => true],
'selector' => ['type' => 'VARCHAR', 'constraint' => 32],
'validator_hash' => ['type' => 'CHAR', 'constraint' => 64],
'expires_at' => ['type' => 'DATETIME'],
'created_at' => ['type' => 'DATETIME', 'null' => true],
'updated_at' => ['type' => 'DATETIME', 'null' => true],
]);
$this->forge->addKey('id', true);
$this->forge->addUniqueKey('selector');
$this->forge->addKey('expires_at');
$this->forge->createTable('remember_tokens', true, ['ENGINE' => 'InnoDB']);
}
public function down(): void
{
$this->forge->dropTable('remember_tokens', true);
}
}