Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/roundcube/roundcubemail.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/SQL
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2016-08-12 14:02:39 +0300
committerAleksander Machniak <alec@alec.pl>2016-08-12 14:02:39 +0300
commit0836b213db0baa57fc20f8e4287f6b6a333f3359 (patch)
treed8adf28fe004fc1b0bdc5f6b921b1ae7c908f42a /SQL
parent6f150372e152d980ca4c00d3e5a8da556ecae904 (diff)
Removed useless 'created' column from 'session' table (#5389)
Diffstat (limited to 'SQL')
-rw-r--r--SQL/mssql.initial.sql4
-rw-r--r--SQL/mssql/2016081200.sql2
-rw-r--r--SQL/mysql.initial.sql3
-rw-r--r--SQL/mysql/2016081200.sql1
-rw-r--r--SQL/oracle.initial.sql3
-rw-r--r--SQL/oracle/2016081200.sql1
-rw-r--r--SQL/postgres.initial.sql3
-rw-r--r--SQL/postgres/2016081200.sql1
-rw-r--r--SQL/sqlite.initial.sql3
-rw-r--r--SQL/sqlite/2016081200.sql9
10 files changed, 19 insertions, 11 deletions
diff --git a/SQL/mssql.initial.sql b/SQL/mssql.initial.sql
index 181d61ef3..ac9d93f28 100644
--- a/SQL/mssql.initial.sql
+++ b/SQL/mssql.initial.sql
@@ -1,7 +1,6 @@
CREATE TABLE [dbo].[cache] (
[user_id] [int] NOT NULL ,
[cache_key] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
- [created] [datetime] NOT NULL ,
[expires] [datetime] NULL ,
[data] [text] COLLATE Latin1_General_CI_AI NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
@@ -315,7 +314,6 @@ GO
ALTER TABLE [dbo].[session] ADD
CONSTRAINT [DF_session_sess_id] DEFAULT ('') FOR [sess_id],
- CONSTRAINT [DF_session_created] DEFAULT (getdate()) FOR [created],
CONSTRAINT [DF_session_ip] DEFAULT ('') FOR [ip]
GO
@@ -395,6 +393,6 @@ CREATE TRIGGER [contact_delete_member] ON [dbo].[contacts]
WHERE [contact_id] IN (SELECT [contact_id] FROM deleted)
GO
-INSERT INTO [dbo].[system] ([name], [value]) VALUES ('roundcube-version', '2015111100')
+INSERT INTO [dbo].[system] ([name], [value]) VALUES ('roundcube-version', '2016081200')
GO
\ No newline at end of file
diff --git a/SQL/mssql/2016081200.sql b/SQL/mssql/2016081200.sql
new file mode 100644
index 000000000..3f866c395
--- /dev/null
+++ b/SQL/mssql/2016081200.sql
@@ -0,0 +1,2 @@
+ALTER TABLE [dbo].[session] DROP COLUMN [created]
+GO
diff --git a/SQL/mysql.initial.sql b/SQL/mysql.initial.sql
index df1d015aa..22ffcd043 100644
--- a/SQL/mysql.initial.sql
+++ b/SQL/mysql.initial.sql
@@ -7,7 +7,6 @@
CREATE TABLE `session` (
`sess_id` varchar(128) NOT NULL,
- `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
`changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
`ip` varchar(40) NOT NULL,
`vars` mediumtext NOT NULL,
@@ -211,4 +210,4 @@ CREATE TABLE `system` (
/*!40014 SET FOREIGN_KEY_CHECKS=1 */;
-INSERT INTO system (name, value) VALUES ('roundcube-version', '2015111100');
+INSERT INTO system (name, value) VALUES ('roundcube-version', '2016081200');
diff --git a/SQL/mysql/2016081200.sql b/SQL/mysql/2016081200.sql
new file mode 100644
index 000000000..aa09087ab
--- /dev/null
+++ b/SQL/mysql/2016081200.sql
@@ -0,0 +1 @@
+ALTER TABLE `session` DROP COLUMN `created`;
diff --git a/SQL/oracle.initial.sql b/SQL/oracle.initial.sql
index 82ee1d89b..fabd2606b 100644
--- a/SQL/oracle.initial.sql
+++ b/SQL/oracle.initial.sql
@@ -26,7 +26,6 @@ END;
CREATE TABLE "session" (
"sess_id" varchar(128) NOT NULL PRIMARY KEY,
- "created" timestamp with time zone DEFAULT current_timestamp NOT NULL,
"changed" timestamp with time zone DEFAULT current_timestamp NOT NULL,
"ip" varchar(41) NOT NULL,
"vars" long NOT NULL
@@ -220,4 +219,4 @@ CREATE TABLE "system" (
"value" long
);
-INSERT INTO "system" ("name", "value") VALUES ('roundcube-version', '2015111100');
+INSERT INTO "system" ("name", "value") VALUES ('roundcube-version', '2016081200');
diff --git a/SQL/oracle/2016081200.sql b/SQL/oracle/2016081200.sql
new file mode 100644
index 000000000..aacfe4186
--- /dev/null
+++ b/SQL/oracle/2016081200.sql
@@ -0,0 +1 @@
+ALTER TABLE "session" DROP COLUMN "created";
diff --git a/SQL/postgres.initial.sql b/SQL/postgres.initial.sql
index 2fc85c3a8..6b2c93902 100644
--- a/SQL/postgres.initial.sql
+++ b/SQL/postgres.initial.sql
@@ -37,7 +37,6 @@ CREATE TABLE users (
CREATE TABLE "session" (
sess_id varchar(128) DEFAULT '' PRIMARY KEY,
- created timestamp with time zone DEFAULT now() NOT NULL,
changed timestamp with time zone DEFAULT now() NOT NULL,
ip varchar(41) NOT NULL,
vars text NOT NULL
@@ -292,4 +291,4 @@ CREATE TABLE "system" (
value text
);
-INSERT INTO system (name, value) VALUES ('roundcube-version', '2015111100');
+INSERT INTO system (name, value) VALUES ('roundcube-version', '2016081200');
diff --git a/SQL/postgres/2016081200.sql b/SQL/postgres/2016081200.sql
new file mode 100644
index 000000000..7235b402a
--- /dev/null
+++ b/SQL/postgres/2016081200.sql
@@ -0,0 +1 @@
+ALTER TABLE "session" DROP COLUMN created;
diff --git a/SQL/sqlite.initial.sql b/SQL/sqlite.initial.sql
index 4c1b7791c..081fe6ab8 100644
--- a/SQL/sqlite.initial.sql
+++ b/SQL/sqlite.initial.sql
@@ -86,7 +86,6 @@ CREATE UNIQUE INDEX ix_users_username ON users(username, mail_host);
CREATE TABLE session (
sess_id varchar(128) NOT NULL PRIMARY KEY,
- created datetime NOT NULL default '0000-00-00 00:00:00',
changed datetime NOT NULL default '0000-00-00 00:00:00',
ip varchar(40) NOT NULL default '',
vars text NOT NULL
@@ -203,4 +202,4 @@ CREATE TABLE system (
value text NOT NULL
);
-INSERT INTO system (name, value) VALUES ('roundcube-version', '2015111100');
+INSERT INTO system (name, value) VALUES ('roundcube-version', '2016081200');
diff --git a/SQL/sqlite/2016081200.sql b/SQL/sqlite/2016081200.sql
new file mode 100644
index 000000000..8c3a3f183
--- /dev/null
+++ b/SQL/sqlite/2016081200.sql
@@ -0,0 +1,9 @@
+DROP TABLE session;
+CREATE TABLE session (
+ sess_id varchar(128) NOT NULL PRIMARY KEY,
+ changed datetime NOT NULL default '0000-00-00 00:00:00',
+ ip varchar(40) NOT NULL default '',
+ vars text NOT NULL
+);
+
+CREATE INDEX ix_session_changed ON session (changed);