summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--user_guide_src/source/installation/upgrade_300.rst1
-rw-r--r--user_guide_src/source/libraries/sessions.rst8
2 files changed, 5 insertions, 4 deletions
diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst
index c62b28fa3..484e03028 100644
--- a/user_guide_src/source/installation/upgrade_300.rst
+++ b/user_guide_src/source/installation/upgrade_300.rst
@@ -123,6 +123,7 @@ that you should make:
The table structure has changed a bit, and more specifically:
+ - ``session_id`` field is renamed to ``id``
- ``user_agent`` field is dropped
- ``user_data`` field is renamed to ``data`` and under MySQL is now of type BLOB
- ``last_activity`` field is renamed to ``timestamp``
diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst
index af8c1a8d2..2324d9100 100644
--- a/user_guide_src/source/libraries/sessions.rst
+++ b/user_guide_src/source/libraries/sessions.rst
@@ -554,18 +554,18 @@ And then of course, create the database table ...
For MySQL::
CREATE TABLE IF NOT EXISTS `ci_sessions` (
- `session_id` varchar(40) NOT NULL,
+ `id` varchar(40) NOT NULL,
`ip_address` varchar(45) NOT NULL,
`timestamp` int(10) unsigned DEFAULT 0 NOT NULL,
`data` blob DEFAULT '' NOT NULL,
- PRIMARY KEY (session_id, ip_address),
+ PRIMARY KEY (id, ip_address),
KEY `ci_sessions_timestamp` (`timestamp`)
);
For PostgreSQL::
CREATE TABLE "ci_sessions" (
- "session_id" varchar(40) NOT NULL,
+ "id" varchar(40) NOT NULL,
"ip_address" varchar(45) NOT NULL,
"timestamp" bigint DEFAULT 0 NOT NULL,
"data" text DEFAULT '' NOT NULL,
@@ -578,7 +578,7 @@ However, if you want to turn on the *sess_match_ip* setting, you should
also do the following, after creating the table::
// Works both on MySQL and PostgreSQL
- ALTER TABLE ci_sessions ADD CONSTRAINT ci_sessions_id_ip UNIQUE (session_id, ip_address);
+ ALTER TABLE ci_sessions ADD CONSTRAINT ci_sessions_id_ip UNIQUE (id, ip_address);
.. important:: Only MySQL and PostgreSQL databases are officially
supported, due to lack of advisory locking mechanisms on other