Page MenuHomePhorge

No OneTemporary

Size
28 KB
Referenced Files
None
Subscribers
None
diff --git a/SQL/mssql.initial.sql b/SQL/mssql.initial.sql
index 59916e81f..f3b5d5ca7 100644
--- a/SQL/mssql.initial.sql
+++ b/SQL/mssql.initial.sql
@@ -1,206 +1,206 @@
CREATE TABLE [dbo].[cache] (
[cache_id] [int] IDENTITY (1, 1) NOT NULL ,
[user_id] [int] NOT NULL ,
[session_id] [varchar] (32) COLLATE Latin1_General_CI_AI NULL ,
[cache_key] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[created] [datetime] NOT NULL ,
[data] [text] COLLATE Latin1_General_CI_AI NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[contacts] (
[contact_id] [int] IDENTITY (1, 1) NOT NULL ,
[user_id] [int] NOT NULL ,
[changed] [datetime] NOT NULL ,
[del] [char] (1) COLLATE Latin1_General_CI_AI NOT NULL ,
[name] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[email] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[firstname] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[surname] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[vcard] [text] COLLATE Latin1_General_CI_AI NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[identities] (
[identity_id] [int] IDENTITY (1, 1) NOT NULL ,
[user_id] [int] NOT NULL ,
[del] [char] (1) COLLATE Latin1_General_CI_AI NOT NULL ,
[standard] [char] (1) COLLATE Latin1_General_CI_AI NOT NULL ,
[name] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[organization] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[email] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[reply-to] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[bcc] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[signature] [text] COLLATE Latin1_General_CI_AI NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[messages] (
[message_id] [int] IDENTITY (1, 1) NOT NULL ,
[user_id] [int] NOT NULL ,
[del] [tinyint] NOT NULL ,
[cache_key] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[created] [datetime] NOT NULL ,
[idx] [int] NOT NULL ,
[uid] [int] NOT NULL ,
[subject] [varchar] (255) COLLATE Latin1_General_CI_AI NOT NULL ,
[from] [varchar] (255) COLLATE Latin1_General_CI_AI NOT NULL ,
[to] [varchar] (255) COLLATE Latin1_General_CI_AI NOT NULL ,
[cc] [varchar] (255) COLLATE Latin1_General_CI_AI NOT NULL ,
[date] [datetime] NOT NULL ,
[size] [int] NOT NULL ,
[headers] [text] COLLATE Latin1_General_CI_AI NOT NULL ,
[structure] [text] COLLATE Latin1_General_CI_AI NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[session] (
[sess_id] [varchar] (32) COLLATE Latin1_General_CI_AI NOT NULL ,
[created] [datetime] NOT NULL ,
[changed] [datetime] NULL ,
- [ip] [varchar] (15) COLLATE Latin1_General_CI_AI NOT NULL ,
+ [ip] [varchar] (40) COLLATE Latin1_General_CI_AI NOT NULL ,
[vars] [text] COLLATE Latin1_General_CI_AI NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[users] (
[user_id] [int] IDENTITY (1, 1) NOT NULL ,
[username] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[mail_host] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[alias] [varchar] (128) COLLATE Latin1_General_CI_AI NOT NULL ,
[created] [datetime] NOT NULL ,
[last_login] [datetime] NULL ,
[language] [varchar] (5) COLLATE Latin1_General_CI_AI NOT NULL ,
[preferences] [text] COLLATE Latin1_General_CI_AI NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[cache] WITH NOCHECK ADD
PRIMARY KEY CLUSTERED
(
[cache_id]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[contacts] WITH NOCHECK ADD
CONSTRAINT [PK_contacts_contact_id] PRIMARY KEY CLUSTERED
(
[contact_id]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[identities] WITH NOCHECK ADD
PRIMARY KEY CLUSTERED
(
[identity_id]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[messages] WITH NOCHECK ADD
PRIMARY KEY CLUSTERED
(
[message_id]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[session] WITH NOCHECK ADD
CONSTRAINT [PK_session_sess_id] PRIMARY KEY CLUSTERED
(
[sess_id]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[users] WITH NOCHECK ADD
CONSTRAINT [PK_users_user_id] PRIMARY KEY CLUSTERED
(
[user_id]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[cache] ADD
CONSTRAINT [DF_cache_user_id] DEFAULT ('0') FOR [user_id],
CONSTRAINT [DF_cache_session_id] DEFAULT (null) FOR [session_id],
CONSTRAINT [DF_cache_cache_key] DEFAULT ('') FOR [cache_key],
CONSTRAINT [DF_cache_created] DEFAULT (getdate()) FOR [created]
GO
CREATE INDEX [IX_cache_user_id] ON [dbo].[cache]([user_id]) ON [PRIMARY]
GO
CREATE INDEX [IX_cache_cache_key] ON [dbo].[cache]([cache_key]) ON [PRIMARY]
GO
CREATE INDEX [IX_cache_session_id] ON [dbo].[cache]([session_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[contacts] ADD
CONSTRAINT [DF_contacts_user_id] DEFAULT (0) FOR [user_id],
CONSTRAINT [DF_contacts_changed] DEFAULT (getdate()) FOR [changed],
CONSTRAINT [DF_contacts_del] DEFAULT ('0') FOR [del],
CONSTRAINT [DF_contacts_name] DEFAULT ('') FOR [name],
CONSTRAINT [DF_contacts_email] DEFAULT ('') FOR [email],
CONSTRAINT [DF_contacts_firstname] DEFAULT ('') FOR [firstname],
CONSTRAINT [DF_contacts_surname] DEFAULT ('') FOR [surname],
CONSTRAINT [CK_contacts_del] CHECK ([del] = '1' or [del] = '0')
GO
CREATE INDEX [IX_contacts_user_id] ON [dbo].[contacts]([user_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[identities] ADD
CONSTRAINT [DF_identities_user] DEFAULT ('0') FOR [user_id],
CONSTRAINT [DF_identities_del] DEFAULT ('0') FOR [del],
CONSTRAINT [DF_identities_standard] DEFAULT ('0') FOR [standard],
CONSTRAINT [DF_identities_name] DEFAULT ('') FOR [name],
CONSTRAINT [DF_identities_organization] DEFAULT ('') FOR [organization],
CONSTRAINT [DF_identities_email] DEFAULT ('') FOR [email],
CONSTRAINT [DF_identities_reply] DEFAULT ('') FOR [reply-to],
CONSTRAINT [DF_identities_bcc] DEFAULT ('') FOR [bcc],
CHECK ([standard] = '1' or [standard] = '0'),
CHECK ([del] = '1' or [del] = '0')
GO
CREATE INDEX [IX_identities_user_id] ON [dbo].[identities]([user_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[messages] ADD
CONSTRAINT [DF_messages_user_id] DEFAULT (0) FOR [user_id],
CONSTRAINT [DF_messages_del] DEFAULT (0) FOR [del],
CONSTRAINT [DF_messages_cache_key] DEFAULT ('') FOR [cache_key],
CONSTRAINT [DF_messages_created] DEFAULT (getdate()) FOR [created],
CONSTRAINT [DF_messages_idx] DEFAULT (0) FOR [idx],
CONSTRAINT [DF_messages_uid] DEFAULT (0) FOR [uid],
CONSTRAINT [DF_messages_subject] DEFAULT ('') FOR [subject],
CONSTRAINT [DF_messages_from] DEFAULT ('') FOR [from],
CONSTRAINT [DF_messages_to] DEFAULT ('') FOR [to],
CONSTRAINT [DF_messages_cc] DEFAULT ('') FOR [cc],
CONSTRAINT [DF_messages_date] DEFAULT (getdate()) FOR [date],
CONSTRAINT [DF_messages_size] DEFAULT (0) FOR [size]
GO
CREATE INDEX [IX_messages_user_id] ON [dbo].[messages]([user_id]) ON [PRIMARY]
GO
CREATE INDEX [IX_messages_cache_key] ON [dbo].[messages]([cache_key]) ON [PRIMARY]
GO
CREATE INDEX [IX_messages_idx] ON [dbo].[messages]([idx]) ON [PRIMARY]
GO
CREATE INDEX [IX_messages_uid] ON [dbo].[messages]([uid]) ON [PRIMARY]
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
ALTER TABLE [dbo].[users] ADD
CONSTRAINT [DF_users_username] DEFAULT ('') FOR [username],
CONSTRAINT [DF_users_mail_host] DEFAULT ('') FOR [mail_host],
CONSTRAINT [DF_users_alias] DEFAULT ('') FOR [alias],
CONSTRAINT [DF_users_created] DEFAULT (getdate()) FOR [created],
CONSTRAINT [DF_users_language] DEFAULT ('en') FOR [language]
GO
diff --git a/SQL/mysql.initial.sql b/SQL/mysql.initial.sql
index 4a92734d5..4bba84c6a 100644
--- a/SQL/mysql.initial.sql
+++ b/SQL/mysql.initial.sql
@@ -1,128 +1,128 @@
-- RoundCube Webmail initial database structure
-- Version 0.1-rc1
--
-- --------------------------------------------------------
--
-- Table structure for table `cache`
--
CREATE TABLE `cache` (
`cache_id` int(10) unsigned NOT NULL auto_increment,
`user_id` int(10) unsigned NOT NULL default '0',
`session_id` varchar(40) default NULL,
`cache_key` varchar(128) NOT NULL default '',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`data` longtext NOT NULL,
PRIMARY KEY (`cache_id`),
KEY `user_id` (`user_id`),
KEY `cache_key` (`cache_key`),
KEY `session_id` (`session_id`)
);
-- --------------------------------------------------------
--
-- Table structure for table `contacts`
--
CREATE TABLE `contacts` (
`contact_id` int(10) unsigned NOT NULL auto_increment,
`user_id` int(10) unsigned NOT NULL default '0',
`changed` datetime NOT NULL default '0000-00-00 00:00:00',
`del` tinyint(1) NOT NULL default '0',
`name` varchar(128) NOT NULL default '',
`email` varchar(128) NOT NULL default '',
`firstname` varchar(128) NOT NULL default '',
`surname` varchar(128) NOT NULL default '',
`vcard` text NOT NULL,
PRIMARY KEY (`contact_id`),
KEY `user_id` (`user_id`)
);
-- --------------------------------------------------------
--
-- Table structure for table `identities`
--
CREATE TABLE `identities` (
`identity_id` int(10) unsigned NOT NULL auto_increment,
`user_id` int(10) unsigned NOT NULL default '0',
`del` tinyint(1) NOT NULL default '0',
`standard` tinyint(1) NOT NULL default '0',
`name` varchar(128) NOT NULL default '',
`organization` varchar(128) NOT NULL default '',
`email` varchar(128) NOT NULL default '',
`reply-to` varchar(128) NOT NULL default '',
`bcc` varchar(128) NOT NULL default '',
`signature` text NOT NULL,
`html_signature` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`identity_id`),
KEY `user_id` (`user_id`)
);
-- --------------------------------------------------------
--
-- Table structure for table `session`
--
CREATE TABLE `session` (
`sess_id` varchar(40) NOT NULL default '',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`changed` datetime NOT NULL default '0000-00-00 00:00:00',
- `ip` VARCHAR(15) NOT NULL default '',
+ `ip` VARCHAR(40) NOT NULL default '',
`vars` text NOT NULL,
PRIMARY KEY (`sess_id`)
);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`user_id` int(10) unsigned NOT NULL auto_increment,
`username` varchar(128) NOT NULL default '',
`mail_host` varchar(128) NOT NULL default '',
`alias` varchar(128) NOT NULL default '',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`last_login` datetime NOT NULL default '0000-00-00 00:00:00',
`language` varchar(5) NOT NULL default 'en',
`preferences` text NOT NULL default '',
PRIMARY KEY (`user_id`)
);
-- --------------------------------------------------------
--
-- Table structure for table `messages`
--
CREATE TABLE `messages` (
`message_id` int(11) unsigned NOT NULL auto_increment,
`user_id` int(11) unsigned NOT NULL default '0',
`del` tinyint(1) NOT NULL default '0',
`cache_key` varchar(128) NOT NULL default '',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`idx` int(11) unsigned NOT NULL default '0',
`uid` int(11) unsigned NOT NULL default '0',
`subject` varchar(255) NOT NULL default '',
`from` varchar(255) NOT NULL default '',
`to` varchar(255) NOT NULL default '',
`cc` varchar(255) NOT NULL default '',
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`size` int(11) unsigned NOT NULL default '0',
`headers` text NOT NULL,
`structure` text,
PRIMARY KEY (`message_id`),
KEY `user_id` (`user_id`),
KEY `idx` (`idx`),
KEY `uid` (`uid`),
UNIQUE `uniqueness` (`user_id`, `cache_key`, `uid`)
);
diff --git a/SQL/mysql.update-0.1a.sql b/SQL/mysql.update-0.1a.sql
index 054814af5..60f22b3d6 100644
--- a/SQL/mysql.update-0.1a.sql
+++ b/SQL/mysql.update-0.1a.sql
@@ -1,51 +1,51 @@
-- RoundCube Webmail update script for MySQL databases
-- Updates from version 0.1-20051007
-ALTER TABLE `session` ADD `ip` VARCHAR(15) NOT NULL AFTER changed;
+ALTER TABLE `session` ADD `ip` VARCHAR(40) NOT NULL AFTER changed;
ALTER TABLE `users` ADD `alias` VARCHAR(128) NOT NULL AFTER mail_host;
-- RoundCube Webmail update script for MySQL databases
-- Updates from version 0.1-20051021
ALTER TABLE `session` CHANGE `sess_id` `sess_id` VARCHAR(40) NOT NULL;
ALTER TABLE `contacts` CHANGE `del` `del` TINYINT(1) NOT NULL;
ALTER TABLE `contacts` ADD `changed` DATETIME NOT NULL AFTER `user_id`;
UPDATE `contacts` SET `del`=0 WHERE `del`=1;
UPDATE `contacts` SET `del`=1 WHERE `del`=2;
ALTER TABLE `identities` CHANGE `default` `standard` TINYINT(1) NOT NULL;
ALTER TABLE `identities` CHANGE `del` `del` TINYINT(1) NOT NULL;
UPDATE `identities` SET `del`=0 WHERE `del`=1;
UPDATE `identities` SET `del`=1 WHERE `del`=2;
UPDATE `identities` SET `standard`=0 WHERE `standard`=1;
UPDATE `identities` SET `standard`=1 WHERE `standard`=2;
CREATE TABLE `messages` (
`message_id` int(11) unsigned NOT NULL auto_increment,
`user_id` int(11) unsigned NOT NULL default '0',
`del` tinyint(1) NOT NULL default '0',
`cache_key` varchar(128) NOT NULL default '',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`idx` int(11) unsigned NOT NULL default '0',
`uid` int(11) unsigned NOT NULL default '0',
`subject` varchar(255) NOT NULL default '',
`from` varchar(255) NOT NULL default '',
`to` varchar(255) NOT NULL default '',
`cc` varchar(255) NOT NULL default '',
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`size` int(11) unsigned NOT NULL default '0',
`headers` text NOT NULL,
`structure` text,
PRIMARY KEY (`message_id`),
KEY `user_id` (`user_id`),
KEY `idx` (`idx`),
KEY `uid` (`uid`),
UNIQUE `uniqueness` (`cache_key`, `uid`)
) TYPE=MyISAM;
diff --git a/SQL/mysql.update.sql b/SQL/mysql.update.sql
index 27d45ebad..e904be278 100644
--- a/SQL/mysql.update.sql
+++ b/SQL/mysql.update.sql
@@ -1,19 +1,21 @@
-- RoundCube Webmail update script for MySQL databases
-- Updates from version 0.1-beta and 0.1-beta2
TRUNCATE TABLE `messages`;
ALTER TABLE `messages`
DROP `body`,
DROP INDEX `cache_key`,
ADD `structure` TEXT,
ADD UNIQUE `uniqueness` (`user_id`, `cache_key`, `uid`);
ALTER TABLE `identities`
ADD `html_signature` tinyint(1) default 0 NOT NULL;
+ALTER TABLE `session` CHANGE `ip` `ip` VARCHAR(40)
+
-- Uncomment these lines if you're using MySQL 4.1 or higher
-- ALTER TABLE `users`
-- DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci,
-- CHANGE `username` `username` VARCHAR( 128 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
-- CHANGE `alias` `alias` VARCHAR( 128 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
diff --git a/SQL/mysql5.initial.sql b/SQL/mysql5.initial.sql
index aeec961ad..79817691e 100644
--- a/SQL/mysql5.initial.sql
+++ b/SQL/mysql5.initial.sql
@@ -1,126 +1,126 @@
-- RoundCube Webmail initial database structure
-- Version 0.1-rc1
-- --------------------------------------------------------
SET FOREIGN_KEY_CHECKS=0;
-- Table structure for table `session`
CREATE TABLE `session` (
`sess_id` varchar(40) NOT NULL,
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `ip` varchar(15) NOT NULL,
+ `ip` varchar(40) NOT NULL,
`vars` text NOT NULL,
PRIMARY KEY(`sess_id`)
) TYPE=MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
-- Table structure for table `users`
CREATE TABLE `users` (
`user_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`username` varchar(128) NOT NULL,
`mail_host` varchar(128) NOT NULL,
`alias` varchar(128) NOT NULL,
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_login` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`language` varchar(5) NOT NULL DEFAULT 'en',
`preferences` text NOT NULL DEFAULT '',
PRIMARY KEY(`user_id`)
) TYPE=MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
-- Table structure for table `messages`
CREATE TABLE `messages` (
`message_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
`del` tinyint(1) NOT NULL DEFAULT '0',
`cache_key` varchar(128) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL,
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`idx` int(11) UNSIGNED NOT NULL DEFAULT '0',
`uid` int(11) UNSIGNED NOT NULL DEFAULT '0',
`subject` varchar(255) NOT NULL,
`from` varchar(255) NOT NULL,
`to` varchar(255) NOT NULL,
`cc` varchar(255) NOT NULL,
`date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`size` int(11) UNSIGNED NOT NULL DEFAULT '0',
`headers` text NOT NULL,
`structure` text,
PRIMARY KEY(`message_id`),
INDEX `idx`(`idx`),
INDEX `uid`(`uid`),
UNIQUE `uniqueness` (`user_id`, `cache_key`, `uid`),
CONSTRAINT `user_id_fk_messages` FOREIGN KEY (`user_id`)
REFERENCES `users`(`user_id`)
ON DELETE CASCADE
ON UPDATE CASCADE
) TYPE=MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
-- Table structure for table `cache`
CREATE TABLE `cache` (
`cache_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`session_id` varchar(40) CHARACTER SET ascii COLLATE ascii_general_ci,
`cache_key` varchar(128) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL,
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`data` longtext NOT NULL,
`user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY(`cache_id`),
INDEX `cache_key`(`cache_key`),
INDEX `session_id`(`session_id`),
CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`)
REFERENCES `users`(`user_id`)
ON DELETE CASCADE
ON UPDATE CASCADE
) TYPE=MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
-- Table structure for table `contacts`
CREATE TABLE `contacts` (
`contact_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`changed` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`del` tinyint(1) NOT NULL DEFAULT '0',
`name` varchar(128) NOT NULL,
`email` varchar(128) NOT NULL,
`firstname` varchar(128) NOT NULL,
`surname` varchar(128) NOT NULL,
`vcard` text NULL,
`user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY(`contact_id`),
CONSTRAINT `user_id_fk_contacts` FOREIGN KEY (`user_id`)
REFERENCES `users`(`user_id`)
ON DELETE CASCADE
ON UPDATE CASCADE
) TYPE=MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
-- Table structure for table `identities`
CREATE TABLE `identities` (
`identity_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`del` tinyint(1) NOT NULL DEFAULT '0',
`standard` tinyint(1) NOT NULL DEFAULT '0',
`name` varchar(128) NOT NULL,
`organization` varchar(128) NOT NULL,
`email` varchar(128) NOT NULL,
`reply-to` varchar(128) NOT NULL,
`bcc` varchar(128) NOT NULL,
`signature` text NOT NULL,
`html_signature` tinyint(1) NOT NULL DEFAULT '0',
`user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY(`identity_id`),
CONSTRAINT `user_id_fk_identities` FOREIGN KEY (`user_id`)
REFERENCES `users`(`user_id`)
ON DELETE CASCADE
ON UPDATE CASCADE
) TYPE=MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
SET FOREIGN_KEY_CHECKS=1;
diff --git a/SQL/postgres.initial.sql b/SQL/postgres.initial.sql
index bf82b9b5d..356a579fc 100644
--- a/SQL/postgres.initial.sql
+++ b/SQL/postgres.initial.sql
@@ -1,170 +1,170 @@
--
-- Sequence "user_ids"
-- Name: user_ids; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE user_ids
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
--
-- Table "users"
-- Name: users; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE users (
user_id integer DEFAULT nextval('user_ids'::text) PRIMARY KEY,
username character varying(128) DEFAULT ''::character varying NOT NULL,
mail_host character varying(128) DEFAULT ''::character varying NOT NULL,
alias character varying(128) DEFAULT ''::character varying NOT NULL,
created timestamp with time zone DEFAULT now() NOT NULL,
last_login timestamp with time zone DEFAULT now() NOT NULL,
"language" character varying(5) DEFAULT 'en'::character varying NOT NULL,
preferences text DEFAULT ''::text NOT NULL
);
--
-- Table "session"
-- Name: session; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE "session" (
sess_id character varying(40) DEFAULT ''::character varying PRIMARY KEY,
created timestamp with time zone DEFAULT now() NOT NULL,
changed timestamp with time zone DEFAULT now() NOT NULL,
- ip character varying(16) NOT NULL,
+ ip character varying(41) NOT NULL,
vars text NOT NULL
);
--
-- Sequence "identity_ids"
-- Name: identity_ids; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE identity_ids
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
--
-- Table "identities"
-- Name: identities; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE identities (
identity_id integer DEFAULT nextval('identity_ids'::text) PRIMARY KEY,
user_id integer NOT NULL REFERENCES users (user_id),
del integer DEFAULT 0 NOT NULL,
standard integer DEFAULT 0 NOT NULL,
name character varying(128) NOT NULL,
organization character varying(128),
email character varying(128) NOT NULL,
"reply-to" character varying(128),
bcc character varying(128),
signature text,
html_signature integer DEFAULT 0 NOT NULL
);
--
-- Sequence "contact_ids"
-- Name: contact_ids; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE contact_ids
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
--
-- Table "contacts"
-- Name: contacts; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE contacts (
contact_id integer DEFAULT nextval('contact_ids'::text) PRIMARY KEY,
user_id integer NOT NULL REFERENCES users (user_id),
changed timestamp with time zone DEFAULT now() NOT NULL,
del integer DEFAULT 0 NOT NULL,
name character varying(128) DEFAULT ''::character varying NOT NULL,
email character varying(128) DEFAULT ''::character varying NOT NULL,
firstname character varying(128) DEFAULT ''::character varying NOT NULL,
surname character varying(128) DEFAULT ''::character varying NOT NULL,
vcard text
);
--
-- Sequence "cache_ids"
-- Name: cache_ids; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE cache_ids
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
--
-- Table "cache"
-- Name: cache; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE "cache" (
cache_id integer DEFAULT nextval('cache_ids'::text) PRIMARY KEY,
user_id integer NOT NULL REFERENCES users (user_id),
session_id character varying(40) REFERENCES "session" (sess_id),
cache_key character varying(128) DEFAULT ''::character varying NOT NULL,
created timestamp with time zone DEFAULT now() NOT NULL,
data text NOT NULL
);
--
-- Sequence "message_ids"
-- Name: message_ids; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE message_ids
INCREMENT BY 1
NO MAXVALUE
NO MINVALUE
CACHE 1;
--
-- Table "messages"
-- Name: messages; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE "messages" (
message_id integer DEFAULT nextval('message_ids'::text) PRIMARY KEY,
user_id integer NOT NULL REFERENCES users (user_id),
del integer DEFAULT 0 NOT NULL,
cache_key character varying(128) DEFAULT ''::character varying NOT NULL,
created timestamp with time zone DEFAULT now() NOT NULL,
idx integer DEFAULT 0 NOT NULL,
uid integer DEFAULT 0 NOT NULL,
subject character varying(128) DEFAULT ''::character varying NOT NULL,
"from" character varying(128) DEFAULT ''::character varying NOT NULL,
"to" character varying(128) DEFAULT ''::character varying NOT NULL,
cc character varying(128) DEFAULT ''::character varying NOT NULL,
date timestamp with time zone NOT NULL,
size integer DEFAULT 0 NOT NULL,
headers text NOT NULL,
structure text
);
ALTER TABLE "messages" ADD UNIQUE (user_id, cache_key, uid);
diff --git a/SQL/sqlite.initial.sql b/SQL/sqlite.initial.sql
index fd2a22f77..4ae752983 100644
--- a/SQL/sqlite.initial.sql
+++ b/SQL/sqlite.initial.sql
@@ -1,128 +1,128 @@
-- RoundCube Webmail initial database structure
-- Version 0.1-rc1
--
-- --------------------------------------------------------
--
-- Table structure for table `cache`
--
CREATE TABLE cache (
cache_id integer NOT NULL PRIMARY KEY,
user_id integer NOT NULL default 0,
session_id varchar(40) default NULL,
cache_key varchar(128) NOT NULL default '',
created datetime NOT NULL default '0000-00-00 00:00:00',
data longtext NOT NULL
);
CREATE INDEX ix_cache_user_id ON cache(user_id);
CREATE INDEX ix_cache_cache_key ON cache(cache_key);
CREATE INDEX ix_cache_session_id ON cache(session_id);
-- --------------------------------------------------------
--
-- Table structure for table contacts
--
CREATE TABLE contacts (
contact_id integer NOT NULL PRIMARY KEY,
user_id integer NOT NULL default '0',
changed datetime NOT NULL default '0000-00-00 00:00:00',
del tinyint NOT NULL default '0',
name varchar(128) NOT NULL default '',
email varchar(128) NOT NULL default '',
firstname varchar(128) NOT NULL default '',
surname varchar(128) NOT NULL default '',
vcard text NOT NULL default ''
);
CREATE INDEX ix_contacts_user_id ON contacts(user_id);
-- --------------------------------------------------------
--
-- Table structure for table identities
--
CREATE TABLE identities (
identity_id integer NOT NULL PRIMARY KEY,
user_id integer NOT NULL default '0',
del tinyint NOT NULL default '0',
standard tinyint NOT NULL default '0',
name varchar(128) NOT NULL default '',
organization varchar(128) default '',
email varchar(128) NOT NULL default '',
"reply-to" varchar(128) NOT NULL default '',
bcc varchar(128) NOT NULL default '',
signature text NOT NULL default '',
html_signature tinyint NOT NULL default '0'
);
CREATE INDEX ix_identities_user_id ON identities(user_id);
-- --------------------------------------------------------
--
-- Table structure for table users
--
CREATE TABLE users (
user_id integer NOT NULL PRIMARY KEY,
username varchar(128) NOT NULL default '',
mail_host varchar(128) NOT NULL default '',
alias varchar(128) NOT NULL default '',
created datetime NOT NULL default '0000-00-00 00:00:00',
last_login datetime NOT NULL default '0000-00-00 00:00:00',
language varchar(5) NOT NULL default 'en',
preferences text NOT NULL default ''
);
-- --------------------------------------------------------
--
-- Table structure for table session
--
CREATE TABLE session (
sess_id varchar(40) 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(15) NOT NULL default '',
+ ip varchar(40) NOT NULL default '',
vars text NOT NULL
);
-- --------------------------------------------------------
--
-- Table structure for table messages
--
CREATE TABLE messages (
message_id integer NOT NULL PRIMARY KEY,
user_id integer NOT NULL default '0',
del tinyint NOT NULL default '0',
cache_key varchar(128) NOT NULL default '',
created datetime NOT NULL default '0000-00-00 00:00:00',
idx integer NOT NULL default '0',
uid integer NOT NULL default '0',
subject varchar(255) NOT NULL default '',
"from" varchar(255) NOT NULL default '',
"to" varchar(255) NOT NULL default '',
cc varchar(255) NOT NULL default '',
date datetime NOT NULL default '0000-00-00 00:00:00',
size integer NOT NULL default '0',
headers text NOT NULL,
structure text
);
CREATE INDEX ix_messages_user_id ON messages(user_id);
CREATE INDEX ix_messages_cache_key ON messages(cache_key);
CREATE INDEX ix_messages_idx ON messages(idx);
CREATE INDEX ix_messages_uid ON messages(uid);

File Metadata

Mime Type
text/x-diff
Expires
Wed, Jul 8, 7:08 PM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1051838
Default Alt Text
(28 KB)

Event Timeline