diff options
author | alecpl <alec@alec.pl> | 2012-01-12 07:29:48 +0000 |
---|---|---|
committer | alecpl <alec@alec.pl> | 2012-01-12 07:29:48 +0000 |
commit | be431441cb06de48b01fde2baf3ccf04094c0273 (patch) | |
tree | 4e2aa31fc1498bd7967d69e328a9168ee8315459 /SQL | |
parent | 89730fa4e26a1efb6328af34cf89827642920272 (diff) |
- Applied fixes from trunk up to r5756
Diffstat (limited to 'SQL')
-rw-r--r-- | SQL/mysql.initial.sql | 2 | ||||
-rw-r--r-- | SQL/mysql.update.sql | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/SQL/mysql.initial.sql b/SQL/mysql.initial.sql index f66bb1eee..b0a7ee7a9 100644 --- a/SQL/mysql.initial.sql +++ b/SQL/mysql.initial.sql @@ -101,7 +101,7 @@ CREATE TABLE `contacts` ( `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00', `del` tinyint(1) NOT NULL DEFAULT '0', `name` varchar(128) NOT NULL DEFAULT '', - `email` text NOT NULL DEFAULT '', + `email` text NOT NULL, `firstname` varchar(128) NOT NULL DEFAULT '', `surname` varchar(128) NOT NULL DEFAULT '', `vcard` longtext NULL, diff --git a/SQL/mysql.update.sql b/SQL/mysql.update.sql index 3e6b955fc..177ba936b 100644 --- a/SQL/mysql.update.sql +++ b/SQL/mysql.update.sql @@ -215,9 +215,11 @@ ALTER TABLE `session` CHANGE `sess_id` `sess_id` varchar(128) NOT NULL; -- Updates from version 0.7 +/*!40014 SET FOREIGN_KEY_CHECKS=0 */; + ALTER TABLE `contacts` DROP FOREIGN KEY `user_id_fk_contacts`; ALTER TABLE `contacts` DROP INDEX `user_contacts_index`; -ALTER TABLE `contacts` MODIFY `email` text NOT NULL DEFAULT ''; +ALTER TABLE `contacts` MODIFY `email` text NOT NULL; ALTER TABLE `contacts` ADD INDEX `user_contacts_index` (`user_id`,`del`); ALTER TABLE `contacts` ADD CONSTRAINT `user_id_fk_contacts` FOREIGN KEY (`user_id`) REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE; @@ -231,3 +233,5 @@ ALTER TABLE `contactgroups` ALTER `user_id` DROP DEFAULT; ALTER TABLE `contactgroupmembers` ALTER `contact_id` DROP DEFAULT; ALTER TABLE `identities` ALTER `user_id` DROP DEFAULT; ALTER TABLE `searches` ALTER `user_id` DROP DEFAULT; + +/*!40014 SET FOREIGN_KEY_CHECKS=1 */; |