summaryrefslogtreecommitdiff
path: root/SQL/mysql.initial.sql
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-08-06 11:08:58 +0200
committerAleksander Machniak <alec@alec.pl>2012-08-06 11:08:58 +0200
commit565c472918e7f9707cd8d7909ad5dbcc5a921fdf (patch)
tree8c4c40ab241766d931c69ee3ddcca5b3511cc800 /SQL/mysql.initial.sql
parent83121ece3348bfe09bb1026eace79a74a5ccf2c9 (diff)
Removed users.alias column, added option ('user_aliases')
to use email address from identities as username (#1488581)
Diffstat (limited to 'SQL/mysql.initial.sql')
-rw-r--r--SQL/mysql.initial.sql7
1 files changed, 3 insertions, 4 deletions
diff --git a/SQL/mysql.initial.sql b/SQL/mysql.initial.sql
index 46fa2c3cf..47d9db4a2 100644
--- a/SQL/mysql.initial.sql
+++ b/SQL/mysql.initial.sql
@@ -22,14 +22,12 @@ CREATE TABLE `users` (
`user_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`username` varchar(128) BINARY NOT NULL,
`mail_host` varchar(128) NOT NULL,
- `alias` varchar(128) BINARY NOT NULL,
`created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
`last_login` datetime DEFAULT NULL,
`language` varchar(5),
`preferences` text,
PRIMARY KEY(`user_id`),
- UNIQUE `username` (`username`, `mail_host`),
- INDEX `alias_index` (`alias`)
+ UNIQUE `username` (`username`, `mail_host`)
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;
@@ -156,7 +154,8 @@ CREATE TABLE `identities` (
PRIMARY KEY(`identity_id`),
CONSTRAINT `user_id_fk_identities` FOREIGN KEY (`user_id`)
REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- INDEX `user_identities_index` (`user_id`, `del`)
+ INDEX `user_identities_index` (`user_id`, `del`),
+ INDEX `email_identities_index` (`email`, `del`)
) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;