Created
August 16, 2011 18:40
-
-
Save tomkrush/1149816 to your computer and use it in GitHub Desktop.
CodeIgniter Jot Migration for Sessions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Create_Table_Sessions | |
{ | |
function up() | |
{ | |
create_table('ci_sessions', array( | |
array('name' => 'session_id', 'type' => 'varchar(40)', 'DEFAULT' => '0', 'NOT NULL' => TRUE), | |
array('name' => 'ip_address', 'type' => 'varchar(16)', 'DEFAULT' => '0', 'NOT NULL' => TRUE), | |
array('name' => 'user_agent', 'type' => 'varchar(50)', 'NOT NULL' => TRUE), | |
array('name' => 'last_activity', 'type' => 'int(10)', 'UNSIGNED' => TRUE, 'DEFAULT' => '0', 'NOT NULL' => TRUE), | |
array('name' => 'user_data', 'type' => 'text', 'DEFAULT' => '', 'NOT NULL' => TRUE), | |
), array('primary_key' => 'session_id')); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment