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" echo "Load in www schema"
$DB zotero_www < $(cur_dir)www.sql $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 "#################################"
echo "Configuration database connection" echo "Configuration database connection"
echo "#################################" echo "#################################"

24
www.sql
View File

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