2010-05-24, 01:07 AM
Hello i would like to know if there is any room for improvement on this.
CREATE TABLE `accounts` (
`uid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(120) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`password` varchar(120) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`usergroup` tinyint(3) unsigned NOT NULL DEFAULT '0',
`email` varchar(220) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
PRIMARY KEY (`uid`),
KEY `username` (`username`),
KEY `usergroup` (`usergroup`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
CREATE TABLE `templates` (
`tid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(120) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`template` text COLLATE utf8_unicode_ci NOT NULL,
`templatename` varchar(120) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
PRIMARY KEY (`tid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;
CREATE TABLE `usergroups` (
`gid` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`groupname` varchar(120) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`style` varchar(120) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`permissions` varchar(200) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
PRIMARY KEY (`gid`),
KEY `permissions` (`permissions`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ;