CodeIgniter Forums
Prepare ci_sessions for future Migration - Printable Version

+- CodeIgniter Forums (
+-- Forum: CodeIgniter 4 (
+--- Forum: CodeIgniter 4 Support (
+--- Thread: Prepare ci_sessions for future Migration (/thread-79011.html)

Prepare ci_sessions for future Migration - nurmyrat - 04-08-2021

Hello CodeIgnitians.

Recently I started to work on some project and decided to do it with CodeIgniter ( Laravel was the first choice ) and had an idea to prepare 
common needed libraries and controllers at hand ( like in Laravel ) and later just have a new copy of a prepared ( by a composer ) project and
start a new one with everything at hand.

I copied the two migrations from Laravel and make a migration for CI 4
1) 2014_10_12_000000_create_users_table
2) 2014_10_12_100000_create_password_resets_table  (has this line $table->string('email')->index())

and also prepared ci_session database from documentation

However there was a problem with KEY/INDEX ( yes I know they are the same for MySQL)

        `id` varchar(128) NOT NULL,
        `ip_address` varchar(45) NOT NULL,
        `timestamp` int(10) unsigned DEFAULT 0 NOT NULL,
        `data` blob NOT NULL,
        KEY `ci_sessions_timestamp` (`timestamp`)

the following code 


has not the same effect with the SQL statement written above which in MySQL it is done with CREATE INDEX statement.

Is there any solution or way to replicate the CREATE INDEX statment with $this->forge->!!!   ?