summaryrefslogtreecommitdiff
path: root/SQL
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2008-05-19 09:07:13 +0000
committeralecpl <alec@alec.pl>2008-05-19 09:07:13 +0000
commitd7f3d796a240ed830346e74de46e108cc3fb4d3a (patch)
treebe4491f021c802bb0bf712788f178ca8fb78ef1f /SQL
parentb02d1c88a20cd8a2e9bb448843c5615408201562 (diff)
-Fixed Mysql DDL for default identities creation (#1485070)
Diffstat (limited to 'SQL')
-rw-r--r--SQL/mysql.initial.sql6
-rw-r--r--SQL/mysql.update.sql10
-rw-r--r--SQL/mysql5.initial.sql8
3 files changed, 17 insertions, 7 deletions
diff --git a/SQL/mysql.initial.sql b/SQL/mysql.initial.sql
index 019675ec4..fadc07280 100644
--- a/SQL/mysql.initial.sql
+++ b/SQL/mysql.initial.sql
@@ -50,12 +50,12 @@ CREATE TABLE `identities` (
`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 '',
+ `name` varchar(128) NOT NULL,
`organization` varchar(128) NOT NULL default '',
- `email` varchar(128) NOT NULL default '',
+ `email` varchar(128) NOT NULL,
`reply-to` varchar(128) NOT NULL default '',
`bcc` varchar(128) NOT NULL default '',
- `signature` text NOT NULL,
+ `signature` text NOT NULL default '',
`html_signature` tinyint(1) NOT NULL default '0',
PRIMARY KEY (`identity_id`),
KEY `user_id` (`user_id`)
diff --git a/SQL/mysql.update.sql b/SQL/mysql.update.sql
index 103cb61db..2a9603f3e 100644
--- a/SQL/mysql.update.sql
+++ b/SQL/mysql.update.sql
@@ -15,3 +15,13 @@ ALTER TABLE `cache`
ALTER TABLE `users`
ADD INDEX `username_index` (`username`),
ADD INDEX `alias_index` (`alias`);
+
+-- Updates from version 0.1.1
+
+ALTER TABLE `identities`
+ MODIFY `signature` text NOT NULL DEFAULT '',
+ MODIFY `bcc` varchar(128) NOT NULL DEFAULT '',
+ MODIFY `reply-to` varchar(128) NOT NULL DEFAULT '',
+ MODIFY `organization` varchar(128) NOT NULL DEFAULT '',
+ MODIFY `name` varchar(128) NOT NULL,
+ MODIFY `email` varchar(128) NOT NULL;
diff --git a/SQL/mysql5.initial.sql b/SQL/mysql5.initial.sql
index 881344b98..546eecd29 100644
--- a/SQL/mysql5.initial.sql
+++ b/SQL/mysql5.initial.sql
@@ -107,11 +107,11 @@ CREATE TABLE `identities` (
`del` tinyint(1) NOT NULL DEFAULT '0',
`standard` tinyint(1) NOT NULL DEFAULT '0',
`name` varchar(128) NOT NULL,
- `organization` varchar(128) NOT NULL,
+ `organization` varchar(128) NOT NULL DEFAULT '',
`email` varchar(128) NOT NULL,
- `reply-to` varchar(128) NOT NULL,
- `bcc` varchar(128) NOT NULL,
- `signature` text NOT NULL,
+ `reply-to` varchar(128) NOT NULL DEFAULT '',
+ `bcc` varchar(128) NOT NULL DEFAULT '',
+ `signature` text NOT NULL DEFAULT '',
`html_signature` tinyint(1) NOT NULL DEFAULT '0',
`user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY(`identity_id`),