summaryrefslogtreecommitdiff
path: root/SQL
diff options
context:
space:
mode:
Diffstat (limited to 'SQL')
-rw-r--r--SQL/mssql.initial.sql2
-rw-r--r--SQL/mssql/2013042700.sql1
-rw-r--r--SQL/mysql.initial.sql2
-rw-r--r--SQL/mysql/2013042700.sql1
-rw-r--r--SQL/postgres.initial.sql42
-rw-r--r--SQL/postgres/2013042700.sql14
-rw-r--r--SQL/sqlite.initial.sql2
-rw-r--r--SQL/sqlite/2013042700.sql1
8 files changed, 41 insertions, 24 deletions
diff --git a/SQL/mssql.initial.sql b/SQL/mssql.initial.sql
index 9139509a5..d43676ff9 100644
--- a/SQL/mssql.initial.sql
+++ b/SQL/mssql.initial.sql
@@ -371,6 +371,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', '2013011700')
+INSERT INTO [dbo].[system] ([name], [value]) VALUES ('roundcube-version', '2013042700')
GO
\ No newline at end of file
diff --git a/SQL/mssql/2013042700.sql b/SQL/mssql/2013042700.sql
new file mode 100644
index 000000000..fe6741a02
--- /dev/null
+++ b/SQL/mssql/2013042700.sql
@@ -0,0 +1 @@
+-- empty \ No newline at end of file
diff --git a/SQL/mysql.initial.sql b/SQL/mysql.initial.sql
index cb750c5ea..5a86dd8f8 100644
--- a/SQL/mysql.initial.sql
+++ b/SQL/mysql.initial.sql
@@ -196,4 +196,4 @@ CREATE TABLE `system` (
/*!40014 SET FOREIGN_KEY_CHECKS=1 */;
-INSERT INTO system (name, value) VALUES ('roundcube-version', '2013011700');
+INSERT INTO system (name, value) VALUES ('roundcube-version', '2013042700');
diff --git a/SQL/mysql/2013042700.sql b/SQL/mysql/2013042700.sql
new file mode 100644
index 000000000..fe6741a02
--- /dev/null
+++ b/SQL/mysql/2013042700.sql
@@ -0,0 +1 @@
+-- empty \ No newline at end of file
diff --git a/SQL/postgres.initial.sql b/SQL/postgres.initial.sql
index 32d8edee8..f3b368f7d 100644
--- a/SQL/postgres.initial.sql
+++ b/SQL/postgres.initial.sql
@@ -1,11 +1,11 @@
-- Roundcube Webmail initial database structure
--
--- Sequence "user_ids"
--- Name: user_ids; Type: SEQUENCE; Schema: public; Owner: postgres
+-- Sequence "users_seq"
+-- Name: users_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
-CREATE SEQUENCE user_ids
+CREATE SEQUENCE users_seq
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
@@ -17,7 +17,7 @@ CREATE SEQUENCE user_ids
--
CREATE TABLE users (
- user_id integer DEFAULT nextval('user_ids'::text) PRIMARY KEY,
+ user_id integer DEFAULT nextval('users_seq'::text) PRIMARY KEY,
username varchar(128) DEFAULT '' NOT NULL,
mail_host varchar(128) DEFAULT '' NOT NULL,
created timestamp with time zone DEFAULT now() NOT NULL,
@@ -45,11 +45,11 @@ CREATE INDEX session_changed_idx ON session (changed);
--
--- Sequence "identity_ids"
--- Name: identity_ids; Type: SEQUENCE; Schema: public; Owner: postgres
+-- Sequence "identities_seq"
+-- Name: identities_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
-CREATE SEQUENCE identity_ids
+CREATE SEQUENCE identities_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
@@ -62,7 +62,7 @@ CREATE SEQUENCE identity_ids
--
CREATE TABLE identities (
- identity_id integer DEFAULT nextval('identity_ids'::text) PRIMARY KEY,
+ identity_id integer DEFAULT nextval('identities_seq'::text) PRIMARY KEY,
user_id integer NOT NULL
REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
changed timestamp with time zone DEFAULT now() NOT NULL,
@@ -82,11 +82,11 @@ CREATE INDEX identities_email_idx ON identities (email, del);
--
--- Sequence "contact_ids"
--- Name: contact_ids; Type: SEQUENCE; Schema: public; Owner: postgres
+-- Sequence "contacts_seq"
+-- Name: contacts_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
-CREATE SEQUENCE contact_ids
+CREATE SEQUENCE contacts_seq
START WITH 1
INCREMENT BY 1
NO MAXVALUE
@@ -99,7 +99,7 @@ CREATE SEQUENCE contact_ids
--
CREATE TABLE contacts (
- contact_id integer DEFAULT nextval('contact_ids'::text) PRIMARY KEY,
+ contact_id integer DEFAULT nextval('contacts_seq'::text) PRIMARY KEY,
user_id integer NOT NULL
REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
changed timestamp with time zone DEFAULT now() NOT NULL,
@@ -115,11 +115,11 @@ CREATE TABLE contacts (
CREATE INDEX contacts_user_id_idx ON contacts (user_id, del);
--
--- Sequence "contactgroups_ids"
--- Name: contactgroups_ids; Type: SEQUENCE; Schema: public; Owner: postgres
+-- Sequence "contactgroups_seq"
+-- Name: contactgroups_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
-CREATE SEQUENCE contactgroups_ids
+CREATE SEQUENCE contactgroups_seq
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
@@ -131,7 +131,7 @@ CREATE SEQUENCE contactgroups_ids
--
CREATE TABLE contactgroups (
- contactgroup_id integer DEFAULT nextval('contactgroups_ids'::text) PRIMARY KEY,
+ contactgroup_id integer DEFAULT nextval('contactgroups_seq'::text) PRIMARY KEY,
user_id integer NOT NULL
REFERENCES users(user_id) ON DELETE CASCADE ON UPDATE CASCADE,
changed timestamp with time zone DEFAULT now() NOT NULL,
@@ -238,11 +238,11 @@ CREATE TABLE dictionary (
);
--
--- Sequence "searches_ids"
--- Name: searches_ids; Type: SEQUENCE; Schema: public; Owner: postgres
+-- Sequence "searches_seq"
+-- Name: searches_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
-CREATE SEQUENCE search_ids
+CREATE SEQUENCE searches_seq
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
@@ -254,7 +254,7 @@ CREATE SEQUENCE search_ids
--
CREATE TABLE searches (
- search_id integer DEFAULT nextval('search_ids'::text) PRIMARY KEY,
+ search_id integer DEFAULT nextval('searches_seq'::text) PRIMARY KEY,
user_id integer NOT NULL
REFERENCES users (user_id) ON DELETE CASCADE ON UPDATE CASCADE,
"type" smallint DEFAULT 0 NOT NULL,
@@ -274,4 +274,4 @@ CREATE TABLE "system" (
value text
);
-INSERT INTO system (name, value) VALUES ('roundcube-version', '2013011700');
+INSERT INTO system (name, value) VALUES ('roundcube-version', '2013042700');
diff --git a/SQL/postgres/2013042700.sql b/SQL/postgres/2013042700.sql
new file mode 100644
index 000000000..bbd567515
--- /dev/null
+++ b/SQL/postgres/2013042700.sql
@@ -0,0 +1,14 @@
+ALTER SEQUENCE user_ids RENAME TO users_seq;
+ALTER TABLE users ALTER COLUMN user_id SET DEFAULT nextval('users_seq'::text);
+
+ALTER SEQUENCE identity_ids RENAME TO identities_seq;
+ALTER TABLE identities ALTER COLUMN identity_id SET DEFAULT nextval('identities_seq'::text);
+
+ALTER SEQUENCE contact_ids RENAME TO contacts_seq;
+ALTER TABLE contacts ALTER COLUMN contact_id SET DEFAULT nextval('contacts_seq'::text);
+
+ALTER SEQUENCE contactgroups_ids RENAME TO contactgroups_seq;
+ALTER TABLE contactgroups ALTER COLUMN contactgroup_id SET DEFAULT nextval('contactgroups_seq'::text);
+
+ALTER SEQUENCE search_ids RENAME TO searches_seq;
+ALTER TABLE searches ALTER COLUMN search_id SET DEFAULT nextval('searches_seq'::text);
diff --git a/SQL/sqlite.initial.sql b/SQL/sqlite.initial.sql
index 83874ce7c..d9bafb7e0 100644
--- a/SQL/sqlite.initial.sql
+++ b/SQL/sqlite.initial.sql
@@ -209,4 +209,4 @@ CREATE TABLE system (
value text NOT NULL
);
-INSERT INTO system (name, value) VALUES ('roundcube-version', '2013011700');
+INSERT INTO system (name, value) VALUES ('roundcube-version', '2013042700');
diff --git a/SQL/sqlite/2013042700.sql b/SQL/sqlite/2013042700.sql
new file mode 100644
index 000000000..fe6741a02
--- /dev/null
+++ b/SQL/sqlite/2013042700.sql
@@ -0,0 +1 @@
+-- empty \ No newline at end of file