summaryrefslogtreecommitdiffstats
path: root/application/migrations/020_update_session_table.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2017-09-26 13:41:09 +0200
committerFlorian Pritz <bluewind@xinu.at>2017-09-26 13:41:09 +0200
commit2342ef0eed12a5dd8c368b37c5b8d8d193f10aed (patch)
tree5190764e3049c7c348868ead7565efb50a63582c /application/migrations/020_update_session_table.php
parentd8978f969093cc1d244a4a293d8135f0a4029109 (diff)
Migration 20: Fix id column size
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/migrations/020_update_session_table.php')
-rw-r--r--application/migrations/020_update_session_table.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/application/migrations/020_update_session_table.php b/application/migrations/020_update_session_table.php
index 9052071e0..716b95efb 100644
--- a/application/migrations/020_update_session_table.php
+++ b/application/migrations/020_update_session_table.php
@@ -24,11 +24,14 @@ class Migration_update_session_table extends CI_Migration {
ALTER TABLE "'.$prefix.'ci_sessions"
RENAME COLUMN "user_data" TO "data";
');
+ $this->db->query('
+ ALTER TABLE ci_sessions ALTER COLUMN id SET DATA TYPE varchar(128);
+ ');
} else {
$this->db->query('
ALTER TABLE `'.$prefix.'ci_sessions`
DROP `user_agent`,
- CHANGE `session_id` `id` VARCHAR(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 0,
+ CHANGE `session_id` `id` VARCHAR(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
CHANGE `last_activity` `timestamp` INT(10) UNSIGNED NOT NULL DEFAULT 0,
CHANGE `user_data` `data` BLOB NOT NULL;
');