summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-01-20 16:31:29 +0100
committerAndrey Andreev <narf@devilix.net>2015-01-20 16:31:29 +0100
commit3053b81940f2b5e8f608290a43a77886ebc70ae4 (patch)
treee49da88ab09e795e8c8fd4e115eff75244e565ea
parent2c245616a7bc89e842b4f39693751c3d28c034f2 (diff)
[ci skip] Fix docs about ci_sessions table
Close #3486
-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