From f2b361d48ed822dfc5d2d848cc37e3fe87d1f7e8 Mon Sep 17 00:00:00 2001
From: Björn Geiger
Date: Thu, 6 Oct 2011 13:33:00 +0200
Subject: minor

---
 setup/pbs.sql | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

(limited to 'setup/pbs.sql')

diff --git a/setup/pbs.sql b/setup/pbs.sql
index a3f4cfc..6c0f1d5 100755
--- a/setup/pbs.sql
+++ b/setup/pbs.sql
@@ -292,12 +292,34 @@ ALTER TABLE `pbs_session` ADD `bootmenuentryID` INT AFTER `clientID` ;
 ALTER TABLE `pbs_session` ADD `membershipID` INT NULL AFTER `bootisoID` ;
 
 
+CREATE TABLE IF NOT EXISTS `pbs_session` (
+  `sessionID` int(11) NOT NULL AUTO_INCREMENT,
+  `alphasessionID` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
+  `clientID` int(11) DEFAULT NULL,
+  `bootmenuentryID` int(11) DEFAULT NULL,
+  `bootosID` int(11) DEFAULT NULL,
+  `bootisoID` int(11) DEFAULT NULL,
+  `membershipID` int(11) DEFAULT NULL,
+  `personID` int(11) DEFAULT NULL,
+  `time` varchar(14) COLLATE utf8_unicode_ci NOT NULL,
+  `ip` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
+  `ip6` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
+  PRIMARY KEY (`sessionID`),
+  UNIQUE KEY `alphasessionID` (`alphasessionID`),
+  KEY `clientID` (`clientID`),
+  KEY `bootosID` (`bootosID`),
+  KEY `pbs_session_ibfk_3` (`bootisoID`),
+  KEY `pbs_session_ibfk_4` (`membershipID`),
+  KEY `pbs_session_ibfk_5` (`personID`)
+) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=915 ;
 ALTER TABLE `pbs_session`
+  ADD CONSTRAINT `pbs_session_ibfk_5` FOREIGN KEY (`personID`) REFERENCES `pbs_person` (`personID`) ON DELETE CASCADE,
   ADD CONSTRAINT `pbs_session_ibfk_1` FOREIGN KEY (`clientID`) REFERENCES `pbs_client` (`clientID`) ON DELETE CASCADE,
   ADD CONSTRAINT `pbs_session_ibfk_2` FOREIGN KEY (`bootosID`) REFERENCES `pbs_bootos` (`bootosID`) ON DELETE SET NULL,
   ADD CONSTRAINT `pbs_session_ibfk_3` FOREIGN KEY (`bootisoID`) REFERENCES `pbs_bootiso` (`bootisoID`) ON DELETE SET NULL,
   ADD CONSTRAINT `pbs_session_ibfk_4` FOREIGN KEY (`membershipID`) REFERENCES `pbs_membership` (`membershipID`) ON DELETE CASCADE;
 
+
 CREATE TABLE IF NOT EXISTS `pbs_pool` (
   `poolID` int(11) NOT NULL AUTO_INCREMENT,
   `title` varchar(30) NOT NULL,
-- 
cgit v1.2.3-55-g7522

