hopefully final www.sql file

Adjustments in install_zotero.sh for adding values to LUM_Role table in zotero_www
master
Patrick Höhn 2014-10-28 19:44:51 +01:00
parent 4615155a52
commit b6bbde73a2
2 changed files with 17 additions and 12 deletions

View File

@ -152,6 +152,11 @@ cat ids.sql | $DB zotero_ids
echo "Load in www schema"
$DB zotero_www < $(cur_dir)www.sql
echo "Setup roleIDs"
echo "INSERT INTO LUM_ROLE VALUES ('Deleted', 1);" | $DB zotero_www
echo "INSERT INTO LUM_ROLE VALUES ('Invalid', 2);" | $DB zotero_www
echo "INSERT INTO LUM_ROLE VALUES ('Valid', 3);" | $DB zotero_www
echo "#################################"
echo "Configuration database connection"
echo "#################################"

24
www.sql
View File

@ -20,44 +20,44 @@
-- ***** END LICENSE BLOCK *****
CREATE TABLE `sessions` (
`userID` int(10) unsigned NOT NULL,
`userID` mediumint unsigned NOT NULL,
`id` int(10) unsigned NOT NULL,
`dateModified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`lifetime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
KEY (`userID`),
KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `user_email` (
`userID` int(10) unsigned NOT NULL,
`email` varchar(255) NOT NULL,
CREATE TABLE `users_email` (
`userID` mediumint unsigned NOT NULL,
`email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`userID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `storage_institutions` (
`storageQuota` mediumint(8) unsigned NOT NULL,
`storageQuota` mediumintt(8) unsigned NOT NULL,
`domain` varchar(255) NOT NULL,
`institutionID` int(10) unsigned NOT NULL,
PRIMARY KEY (`institutionID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `storage_institution_email` (
`email` varchar(255) NOT NULL,
`email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`institutionID` int(10) unsigned NOT NULL,
PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `users` (
`userID` int(10) unsigned NOT NULL,
`username` varchar(255) NOT NULL,
`userID` mediumint unsigned auto_increment NOT NULL,
`username` varchar(40) NOT NULL,
`password` char(40) NULL,
UNIQUE KEY (`username`),
UNIQUE KEY (`userID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `users_meta` (
`userID` int(10) unsigned NOT NULL,
`metaKey` varchar(20) NOT NULL,
`userID` mediumint unsigned NOT NULL,
`metaKey` enum('profile_realname', 'publishLibrary', 'publishNotes') NOT NULL,
`metaValue` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@ -69,6 +69,6 @@ PRIMARY KEY (`UserID`)
CREATE TABLE `LUM_Role` (
`RoleID` int(10) unsigned NOT NULL,
`Name` varchar(20) NOT NULL,
`Name' enum('Deleted','Invalid','Valid') NOT NULL,
PRIMARY KEY (`RoleID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;