-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------





--
-- Create schema `jodp-demo`
--

CREATE DATABASE IF NOT EXISTS `jodp-demo`;
USE `jodp-demo`;

--
-- Definition of table `authorities`
--

CREATE TABLE `authorities` (
  `authorityCode` varchar(45) NOT NULL,
  `authorityName` varchar(255) NOT NULL,
  PRIMARY KEY  (`authorityCode`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `authorities`
--



--
-- Definition of table `backgrounds`
--

CREATE TABLE `backgrounds` (
  `backgroundID` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `orgImage` longblob NOT NULL,
  `thumbImage` blob NOT NULL,
  PRIMARY KEY  (`backgroundID`),
  UNIQUE KEY `Index_2` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `backgrounds`
--

INSERT INTO `backgrounds` (`backgroundID`,`name`,`filename`,`orgImage`,`thumbImage`) VALUES 
 (11,'Konfidentiellt','Konfidentiellt.gif',0x[encoded data, 33634 characters],0x4749463839612A004600F50000D0D0D0D1D1D1D2D2D2D3D3D3D4D4D4D5D5D5D6D6D6D7D7D7D8D8D8D9D9D9DADADADBDBDBDCDCDCDDDDDDDEDEDEDFDFDFE0E0E0E1E1E1E2E2E2E3E3E3E4E4E4E5E5E5E6E6E6E7E7E7E8E8E8E9E9E9EAEAEAEBEBEBECECECEDEDEDEEEEEEEFEFEFF0F0F0F1F1F1F2F2F2F3F3F3F4F4F4F5F5F5F6F6F6F7F7F7F8F8F8F9F9F9FAFAFAFBFBFBFCFCFCFDFDFDFEFEFEFFFFFFD0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D0D02C000000002A0046004508FF005F081C48B0A0C183064398F0E001A1C387064B70B8B060810516021942DC48B08386171952BC2011614104141C530E6CC04081020C2D4AA8DCB862608A04093086283013E209001D546070F1028382031230F6F489E040041302232CDDD822C1C0150AA04E3D0842C1820A14173808E960AB59B3155A3A1021D045060720CE227C6021818812165C68954BB08282072A04B2982093AF41112B2CB84C10D8F0C016081636F8FBC0F1400E0B086C20A880A8658113324C9630E282651007321874E1F9B3410D155CCB7628E1C0020A295C48FDDC6242E317202643B0F06136C1C40B0A14378EA0C188172A10B09DBD028251051626D49CDD22050B8A47F7BAFF660040698A032265BB487081C00A0D243A6CB7ACC0410208CF394C9ED0C2F879120241D69F65234CF0820B18643081020C6C4081712F74E042091130B88071273CD081401D3050D96C2A3C80000211B0B09E6B23342410451264708102AE8170C20B050C780245061A6782040B60278205104278DE008541C88103C57DD082063D5638DB732138F01780C69580800215CCF741030D04F99D5717B0B0DC6C2C4090406C2FA480409008B000E30B07CC67D905120C140202104CC0C002ADC9766505BF5117C1086FB6800103751A27824B16ADE0407AB3A140410618AD70C18610F2A4825F0AEC669C015EC1B424842748599C0AC34158C20405BED0024FB239B0F04008025980C0047A7AFA9948161CA0000400CE08A10889BEF04100408EA7E20B1698548103685AE6C2010FA0E081030B6CD0A76B2A1CB08106AABDB0E3021C404841450C143702A4EA0DF8C2080B8C291B061168D09204141439EF020D1496C174C6A95053070D20F09C710E6CD041B310BC20A76B2E14506404FA3A06174117206040B5B29940429704B9E080B09F45F68204186080ED9528B9861F8F08087070900451C8000281D2CCC1C39F0504003B),
 (13,'Internt arbetsmaterial','Internt_arbetsmaterial.gif',0x[encoded data, 26696 characters],0x4749463839612D004600F50000C9C9C9CACACACBCBCBCCCCCCCDCDCDCECECECFCFCFD0D0D0D1D1D1D2D2D2D3D3D3D4D4D4D5D5D5D6D6D6D7D7D7D8D8D8D9D9D9DADADADBDBDBDCDCDCDDDDDDDEDEDEDFDFDFE0E0E0E1E1E1E2E2E2E3E3E3E4E4E4E5E5E5E6E6E6E7E7E7E8E8E8E9E9E9EAEAEAEBEBEBECECECEDEDEDEEEEEEEFEFEFF0F0F0F1F1F1F2F2F2F3F3F3F4F4F4F5F5F5F6F6F6F7F7F7F8F8F8F9F9F9FAFAFAFBFBFBFCFCFCFDFDFDFEFEFEFFFFFFC9C9C9C9C9C9C9C9C9C9C9C9C9C9C9C9C9C9C9C9C9C9C9C9C9C9C92C000000002D0046004508FF006D081C48B0A0C18308132A5CC850A089040A4CB4684831618D1228687CA8C8D16006100628D4E848D2C6850217469424A9E1850D193456726CE1A18005953229BE28D12286879C0D69B85830C0840BA048932A658862848C090F9626840161058D1123A51E3421430202195A0F7AC0D0C0008BB0065B6C1841C2255A821C5050C5F096A009031768C4A8CBB7AFDF8E3E0D6CA89195AF8B0F3360B06840F7AF0D0E0826A4701CC1428D10211C3F26B10244E1BE1F542C6810F36F8903154494F60BC27389BF28220C206183C4EABE1C48D4B800C23158CD0253AC3871A0F7DF1A2C2E18A0FD170184192CF6F6A501C3C680052CAA03B7217DBBF7EF61170CCFFE4EA3C68701DAFF5E9088C0ADFA032754FCFE5BC1ED7CBF1814CC186142B38C081B3CC081662B645040052B6836820A0C14309963256C3083021B39360203D59DA09909034C96A06329A8B0410547FD0543042FD4B082069AA9F0C0551900A7C1092E44E5570A299440C1060E00C702095E5D005C040580909E5F2BA8E080018D01979F66184030D2677DCD80000532983083660D2020DF968E098013987ED510C10330B440265F34CCE0C2040E00F0E05F319C76C07D7D75501B0125E216407F2F2430A7632E1C20027888D61510003B),
 (15,'Utkast','Testar.gif',0x[encoded data, 14918 characters],0x47494638396132004600F50000C2C2C2C3C3C3C4C4C4C5C5C5C6C6C6C7C7C7C8C8C8C9C9C9CACACACBCBCBCCCCCCCDCDCDCECECECFCFCFD0D0D0D1D1D1D2D2D2D3D3D3D4D4D4D5D5D5D6D6D6D7D7D7D8D8D8D9D9D9DADADADBDBDBDCDCDCDDDDDDDEDEDEDFDFDFE0E0E0E1E1E1E2E2E2E3E3E3E4E4E4E5E5E5E6E6E6E7E7E7E8E8E8E9E9E9EAEAEAEBEBEBECECECEDEDEDEEEEEEEFEFEFF0F0F0F1F1F1F2F2F2F3F3F3F4F4F4F5F5F5F6F6F6F7F7F7F8F8F8F9F9F9FAFAFAFBFBFBFCFCFCFDFDFDFEFEFEFFFFFFC2C2C2C2C2C22C00000000320046004508FF007B081C48B0A0C1830805AA0891B0A1C387027318D4E1C141860F1C3C70D800B163C110182E70E8D041820A82113278F498A2C08D88051644E8A0D1410306365676E4E1E0C1C11D1A1E5478C081874E88262054D058214000113905F20861F4284111090A4A80D081C1C80E1128C01048E28044AB47634CA8000107DA83300ED4A8E1E101860F1D3844B020E3E00A0918DE0AB65A21EF0707156614C4816270430D10CE0A34F1C00184077D1D275CD181C48E82393638D0700184E683381874BD0143C188811522387621C103850829AA0A1C5A95C78C12171E4C98709AC7850518684C70A09BE05F91119A5B2DF1C0680C0A106EB340B8C30486128E5750FF08EC31C6DED30E779C88F02083870A0D4048474F5FE08DAD1A3E30D85EDF238D022374E0C0061A4160C1583CA9D49F403340B0C10212D060D00E289CF0D9823818005E0F3538E881681058C4D08206E170426603DD40C10317D6670205146440E0060D7C7016062990389005167020110D00C420100D0E2C608104F369B64300280AA483031D3430C1031A48A0590D070D404103392294C2499AA1A000068871F0C16D8DD5D040045F7DB04161569228C2593CA810C1041E74101C071C2890E451510994C2521D2835564131F0B04201A78120A3042B20940308105C4052061C3810E882315C1081041180B9A00A5979448103429E465B9E8556906A432154FFF01A8953B5979107CB5590C15018CCAAE369C049D8C30371FE8A500B0E52A080B0C67A498104EE09788162F60DD0E482395460D40D996A90E79D6B51F0AB00AE4EE441031754408164F5E140C1041C88C081B034D4F0677D3B24609A403B706041071855C4EE823B5C26C206129014A35B333C7041B33D5434D404CCF6604301A2422C100B12A4EB00052FE808428C1940A9C3621E0CB0297D3C3040810A2450509807256F7083080BDCABD9050DA428800B325840145E0E60A9E34890E920830087F6805D0A2793B8C24B346470420F4452E0560E122CF02B56077570174D188CB820700EB875500D2A5CFB960D0684DADC0E4F9257D00E2C10E0C2692A50F6C0EA6DB9918500091F54E08003189034C1DEA7A1202E0F2718E8C17B10A0E080073CAFC9410A0244FA2B0F29DC499205119460140F1B445D9C06D4B6C0C08652AD1016491D4C70757D3A50C0C1030D70D0D007A59FA683CA04B57711C2E50E34C10723DCEED80E96A9DE83060CE9B07B0634413041081040D0F4603C241041F71348D0D8413A84E08048FFA2C742C52F602781493A432C4370E30D8C1EB510816081B8F561D34A4C5001DFA167026FB240C51AD2020968E080106880B7F26420B71164020C68D16046608281EC40040CC09E9984C302DDC440020F5819C144108199D1244F1AE840FDFAC3031A84600327D09F660202003B);


--
-- Definition of table `categories`
--

CREATE TABLE `categories` (
  `categoryID` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `description` text NOT NULL,
  `global` tinyint(1) NOT NULL,
  `categoryIndex` int(10) unsigned default NULL,
  PRIMARY KEY  (`categoryID`),
  KEY `Index_2` (`categoryIndex`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`categoryID`,`name`,`description`,`global`,`categoryIndex`) VALUES 
 (6,'Gemensamma mallar','Denna kategori innehåller mallar som är gemensamma för hela organisationen',1,0),
 (9,'Exempelkategori 1','Innehåller mallar som är tillhörs exempelkategori 1',0,2),
 (12,'Exempelkategori 2','Innehåller mallar som är tillhörs exempelkategori 2',0,5);


--
-- Definition of table `category-mappings`
--

CREATE TABLE `category-mappings` (
  `categoryMappingID` int(10) unsigned NOT NULL auto_increment,
  `categoryID` int(10) unsigned NOT NULL,
  `mapping` varchar(255) NOT NULL,
  `value` varchar(255) NOT NULL,
  PRIMARY KEY  (`categoryMappingID`),
  KEY `FK_category-mappings_1` (`categoryID`),
  CONSTRAINT `FK_category-mappings_1` FOREIGN KEY (`categoryID`) REFERENCES `categories` (`categoryID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `category-mappings`
--



--
-- Definition of table `categoryfields`
--

CREATE TABLE `categoryfields` (
  `categoryFieldID` int(10) unsigned NOT NULL auto_increment,
  `categoryID` int(10) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  `value` varchar(255) NOT NULL,
  PRIMARY KEY  (`categoryFieldID`),
  UNIQUE KEY `Index_3` (`categoryID`,`name`),
  KEY `FK_categoryFields_1` (`categoryID`),
  CONSTRAINT `FK_categoryFields_1` FOREIGN KEY (`categoryID`) REFERENCES `categories` (`categoryID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `categoryfields`
--

INSERT INTO `categoryfields` (`categoryFieldID`,`categoryID`,`name`,`value`) VALUES 
 (2,9,'Enhet','Exempelenheten');


--
-- Definition of table `components`
--

CREATE TABLE `components` (
  `componentID` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `contentXML` mediumtext,
  `styleXML` mediumtext,
  `validationType` varchar(10) default NULL,
  `adminFormType` varchar(45) default NULL,
  `userFormType` varchar(45) default NULL,
  PRIMARY KEY  (`componentID`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `components`
--

INSERT INTO `components` (`componentID`,`name`,`contentXML`,`styleXML`,`validationType`,`adminFormType`,`userFormType`) VALUES 
 (2,'Flervalslista',NULL,NULL,'STRINGLIST','TEXTAREA','DROPDOWN'),
 (3,'Dagens datum',NULL,NULL,'DATETIME','','TEXTFIELD'),
 (5,'Logotyp',NULL,NULL,NULL,'DROPDOWN',NULL);


--
-- Definition of table `componentvalues`
--

CREATE TABLE `componentvalues` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `fieldID` int(10) unsigned NOT NULL,
  `value` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `Index_3` (`fieldID`,`value`),
  CONSTRAINT `FK_componentvalues_2` FOREIGN KEY (`fieldID`) REFERENCES `fields` (`fieldID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2892 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `componentvalues`
--

INSERT INTO `componentvalues` (`id`,`fieldID`,`value`) VALUES 
 (2890,2533,'Exempelenhet 1\n'),
 (2891,2533,'Exempelenhet 2\n');


--
-- Definition of table `datasources`
--

CREATE TABLE `datasources` (
  `dataSourceID` int(10) unsigned NOT NULL auto_increment,
  `url` varchar(255) NOT NULL default '',
  `type` varchar(45) NOT NULL default '',
  `enabled` tinyint(1) NOT NULL default '0',
  `driver` varchar(255) default NULL,
  `username` varchar(255) default NULL,
  `password` varchar(255) default NULL,
  `name` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`dataSourceID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `datasources`
--



--
-- Definition of table `fields`
--

CREATE TABLE `fields` (
  `fieldID` int(10) unsigned NOT NULL auto_increment,
  `templateID` int(10) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` varchar(255) NOT NULL,
  `mapping` varchar(255) default NULL,
  `required` tinyint(1) NOT NULL,
  `categoryFieldMapping` int(10) unsigned default NULL,
  `componentFieldMapping` int(10) unsigned default NULL,
  PRIMARY KEY  (`fieldID`),
  UNIQUE KEY `Index_3` (`templateID`,`name`),
  KEY `FK_fields_2` (`categoryFieldMapping`),
  KEY `FK_fields_3` (`componentFieldMapping`),
  CONSTRAINT `FK_fields_1` FOREIGN KEY (`templateID`) REFERENCES `templates` (`templateID`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_fields_2` FOREIGN KEY (`categoryFieldMapping`) REFERENCES `categoryfields` (`categoryFieldID`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `FK_fields_3` FOREIGN KEY (`componentFieldMapping`) REFERENCES `components` (`componentID`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2545 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `fields`
--

INSERT INTO `fields` (`fieldID`,`templateID`,`name`,`description`,`mapping`,`required`,`categoryFieldMapping`,`componentFieldMapping`) VALUES 
 (2533,370,'Enhet','Enhet',NULL,0,NULL,2),
 (2534,370,'Handläggare','Handläggare',NULL,0,NULL,NULL),
 (2535,370,'Adressat','Adress mottagare',NULL,0,NULL,NULL),
 (2536,370,'Postnummer','Postnummer mottagare',NULL,0,NULL,NULL),
 (2537,370,'Postort','Postord mottagare',NULL,0,NULL,NULL),
 (2538,370,'Rubrik','Brevets rubrik',NULL,0,NULL,NULL),
 (2539,370,'Datum','Dagnes datum',NULL,0,NULL,3),
 (2540,371,'Namn','Namn',NULL,0,NULL,NULL),
 (2541,371,'Titel','Titel',NULL,0,NULL,NULL),
 (2542,371,'Datum','Dagens datum',NULL,0,NULL,3),
 (2543,371,'Beteckning','Beteckning',NULL,0,NULL,NULL),
 (2544,371,'Enhet','Enhet',NULL,0,2,NULL);


--
-- Definition of table `groups`
--

CREATE TABLE `groups` (
  `groupID` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `description` varchar(255) NOT NULL,
  `enabled` tinyint(1) NOT NULL,
  PRIMARY KEY  (`groupID`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `groups`
--

INSERT INTO `groups` (`groupID`,`name`,`description`,`enabled`) VALUES 
 (6,'Exempelgruppen 1','Innehåller användare som tillhör exempelgruppen 1',1);


--
-- Definition of table `logotype-groups`
--

CREATE TABLE `logotype-groups` (
  `logotypegroupID` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `description` varchar(255) NOT NULL,
  PRIMARY KEY  (`logotypegroupID`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `logotype-groups`
--

INSERT INTO `logotype-groups` (`logotypegroupID`,`name`,`description`) VALUES 
 (1,'Logotyp standard','Logotypen är av typen standard och knyts automatiskt till den användare som är inloggad.'),
 (2,'Logotyp svart/vit','Logotypen är svart/vit och knyts automatiskt till den användare som är inloggad.');


--
-- Definition of table `logotype-mappings`
--

CREATE TABLE `logotype-mappings` (
  `logotypeMappingID` int(10) unsigned NOT NULL auto_increment,
  `logotypeID` int(10) unsigned NOT NULL,
  `mapping` varchar(255) NOT NULL,
  PRIMARY KEY  (`logotypeMappingID`),
  UNIQUE KEY `Index_4` (`logotypeID`,`mapping`),
  KEY `FK_logotype-mappings_2` (`mapping`),
  CONSTRAINT `FK_logotype-mappings_1` FOREIGN KEY (`logotypeID`) REFERENCES `logotypes` (`logotypeID`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_logotype-mappings_2` FOREIGN KEY (`mapping`) REFERENCES `authorities` (`authorityCode`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=222 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `logotype-mappings`
--



--
-- Definition of table `logotypegroup-settings`
--

CREATE TABLE `logotypegroup-settings` (
  `logotypegroupsettingID` int(10) unsigned NOT NULL auto_increment,
  `logotypegroupID` int(10) unsigned NOT NULL,
  `name` varchar(255) NOT NULL,
  `value` varchar(255) NOT NULL,
  PRIMARY KEY  (`logotypegroupsettingID`),
  KEY `FK_logotype-settings_1` (`logotypegroupID`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `logotypegroup-settings`
--

INSERT INTO `logotypegroup-settings` (`logotypegroupsettingID`,`logotypegroupID`,`name`,`value`) VALUES 
 (4,1,'Liten för sidhuvud','70'),
 (5,1,'Stor för försättsblad','90');


--
-- Definition of table `logotypes`
--

CREATE TABLE `logotypes` (
  `logotypeID` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `logotype` blob NOT NULL,
  `logotypegroupID` int(10) unsigned default NULL,
  `height` double NOT NULL,
  `width` double NOT NULL,
  `thumb` blob NOT NULL,
  PRIMARY KEY  (`logotypeID`),
  KEY `FK_logotypes_1` (`logotypegroupID`),
  CONSTRAINT `FK_logotypes_1` FOREIGN KEY (`logotypegroupID`) REFERENCES `logotype-groups` (`logotypegroupID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=184 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `logotypes`
--



--
-- Definition of table `menuindex`
--

CREATE TABLE `menuindex` (
  `menuIndexID` int(10) unsigned NOT NULL auto_increment,
  `sectionID` int(10) unsigned NOT NULL default '0',
  `menuIndex` int(10) unsigned NOT NULL default '0',
  `moduleID` int(10) unsigned default NULL,
  `uniqueID` varchar(255) default NULL,
  `subSectionID` int(10) unsigned default NULL,
  `menuItemID` int(10) unsigned default NULL,
  PRIMARY KEY  (`menuIndexID`),
  UNIQUE KEY `UniqueID / ModuleID` (`moduleID`,`uniqueID`,`sectionID`),
  UNIQUE KEY `Index_5` (`sectionID`,`subSectionID`),
  KEY `FK_menuindex_3` (`subSectionID`),
  KEY `FK_menuindex_4` (`menuItemID`),
  CONSTRAINT `FK_menuindex_1` FOREIGN KEY (`moduleID`) REFERENCES `modules` (`moduleID`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_menuindex_2` FOREIGN KEY (`sectionID`) REFERENCES `sections` (`sectionID`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_menuindex_3` FOREIGN KEY (`subSectionID`) REFERENCES `sections` (`sectionID`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_menuindex_4` FOREIGN KEY (`menuItemID`) REFERENCES `virtualmenuitems` (`menuItemID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=300 DEFAULT CHARSET=latin1 COMMENT='InnoDB free: 206848 kB; (`sectionID`) REFER `foraldramotet-o';

--
-- Dumping data for table `menuindex`
--

INSERT INTO `menuindex` (`menuIndexID`,`sectionID`,`menuIndex`,`moduleID`,`uniqueID`,`subSectionID`,`menuItemID`) VALUES 
 (284,4,1,16,'16',NULL,NULL),
 (285,4,2,70,'70',NULL,NULL),
 (286,4,3,69,'69',NULL,NULL),
 (287,4,4,40,'40',NULL,NULL),
 (288,4,5,37,'37',NULL,NULL),
 (289,4,6,61,'61',NULL,NULL),
 (290,4,7,39,'39',NULL,NULL),
 (291,4,8,56,'56',NULL,NULL),
 (293,4,10,64,'64',NULL,NULL),
 (294,1,3,NULL,NULL,4,NULL),
 (295,1,1,NULL,NULL,6,NULL),
 (296,1,2,NULL,NULL,20,NULL),
 (297,1,4,NULL,NULL,13,NULL),
 (298,14,1,9,'9',NULL,NULL),
 (299,1,5,NULL,NULL,14,NULL);


--
-- Definition of table `modulegroups`
--

CREATE TABLE `modulegroups` (
  `moduleID` int(10) unsigned NOT NULL,
  `groupID` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`moduleID`,`groupID`),
  KEY `FK_modulegroups_2` (`groupID`),
  CONSTRAINT `FK_modulegroups_1` FOREIGN KEY (`moduleID`) REFERENCES `modules` (`moduleID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `modulegroups`
--



--
-- Definition of table `modules`
--

CREATE TABLE `modules` (
  `moduleID` int(10) unsigned NOT NULL auto_increment,
  `classname` varchar(255) NOT NULL default '',
  `name` text NOT NULL,
  `alias` varchar(45) NOT NULL default '',
  `description` text NOT NULL,
  `xslPath` text,
  `xslPathType` varchar(255) default NULL,
  `anonymousAccess` tinyint(1) NOT NULL default '0',
  `userAccess` tinyint(1) NOT NULL default '0',
  `adminAccess` tinyint(1) NOT NULL default '0',
  `enabled` tinyint(1) NOT NULL default '0',
  `visibleInMenu` tinyint(1) NOT NULL default '0',
  `sectionID` int(10) unsigned NOT NULL default '0',
  `dataSourceID` int(10) unsigned default NULL,
  `staticContentPackage` varchar(255) default NULL,
  PRIMARY KEY  (`moduleID`),
  UNIQUE KEY `Index_3` (`sectionID`,`alias`),
  KEY `FK_modules_1` (`sectionID`),
  KEY `FK_modules_2` (`dataSourceID`),
  CONSTRAINT `FK_modules_1` FOREIGN KEY (`sectionID`) REFERENCES `sections` (`sectionID`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_modules_2` FOREIGN KEY (`dataSourceID`) REFERENCES `datasources` (`dataSourceID`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=87 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `modules`
--

INSERT INTO `modules` (`moduleID`,`classname`,`name`,`alias`,`description`,`xslPath`,`xslPathType`,`anonymousAccess`,`userAccess`,`adminAccess`,`enabled`,`visibleInMenu`,`sectionID`,`dataSourceID`,`staticContentPackage`) VALUES 
 (8,'se.unlogic.hierarchy.modules.login.LoginModule','Logga in','loginmodule','Modul för inloggning','LoginModule.se.xsl','Classpath',1,0,0,1,0,13,NULL,NULL),
 (9,'se.unlogic.hierarchy.modules.logout.LogoutModule','Logga ut','logout','Modul fÃ¶r utloggning','LogoutModule.se.xsl','Classpath',0,1,1,1,1,14,NULL,NULL),
 (13,'se.unlogic.hierarchy.modules.pagemodules.PageViewModule','Sidvisningsmodul','page','Modul för visning av statiska sidor','PageViewModule.se.xsl','Classpath',1,1,1,1,1,1,NULL,'staticcontent'),
 (16,'se.unlogic.hierarchy.modules.useradmin.UserAdminModule','Användare','useradmin','Användare','UserAdminModule.xsl','Classpath',0,0,1,1,1,4,NULL,'staticcontent'),
 (17,'se.unlogic.hierarchy.modules.userprofile.UserProfileModule','Mina inställningar','userprofile','Modul för ändring av användaruppgifter','userprofile.xsl','Classpath',0,1,1,1,1,0,NULL,NULL),
 (37,'se.unlogic.hierarchy.modules.menuadmin.MenuAdminModule','Meny','menuadmin','Modul för menyadministration','MenuAdminModule.xsl','Classpath',0,0,1,1,1,4,NULL,'staticcontent'),
 (38,'se.unlogic.hierarchy.modules.pagemodules.PageViewModule','Sidvisningsmodul','page','Modul för visning av statiska sidor','PageViewModule.se.xsl','Classpath',1,1,1,1,0,4,NULL,'staticcontent'),
 (39,'se.unlogic.hierarchy.modules.pagemodules.PageAdminModule','Sidor','pageadmin','Modul för administration av statiska sidor','PageAdminModule.xsl','Classpath',0,0,1,1,1,4,NULL,'staticcontentadmin'),
 (40,'se.unlogic.hierarchy.modules.test.XSLReload','Ladda om stilmall','xslreload','Module for reloading XSL stylesheet','',NULL,0,0,1,1,1,4,NULL,'staticcontent'),
 (56,'se.unlogic.hierarchy.modules.runtimeinfo.RuntimeInfoModule','System info','runtimeinfo','Visar info om minne och processorer','runtimeinfo.xsl','Classpath',0,0,1,1,1,4,NULL,NULL),
 (61,'se.unlogic.hierarchy.modules.systemadmin.SystemAdminModule','Moduler och sektioner','systemadmin','Systemadministration','SystemAdminModule.xsl','Classpath',0,0,1,1,1,4,NULL,'staticcontent'),
 (64,'se.unlogic.hierarchy.modules.threadinfo.ThreadInfoModule','Tråd info','threadinfo','Visar alla aktiva trådar i systemet','threadinfo.xsl','Classpath',0,0,1,1,1,4,NULL,NULL),
 (67,'se.unlogic.hierarchy.modules.staticcontent.StaticContentModule','Staticcontent','static','Modul som möjligör åtkomt till statiska filer i classpath',NULL,NULL,1,1,1,1,0,1,NULL,NULL),
 (69,'se.unlogic.hierarchy.modules.usersessionadmin.UserSessionAdminModule','Inloggade användare','sessionadmin','Administration av inloggade användare','UserSessionAdminModule.xsl','Classpath',0,0,1,1,1,4,NULL,'staticcontent'),
 (70,'se.unlogic.hierarchy.modules.useradmin.GroupAdminModule','Grupper','groups','Grupp administration','GroupAdminModule.xsl','Classpath',0,0,1,1,1,4,NULL,'staticcontent'),
 (71,'se.unlogic.hierarchy.modules.dbuserprovider.DBUserProviderModule','DB User Provider','userprovider','Provides users and groups from multiple sources',NULL,NULL,0,0,0,1,0,4,NULL,NULL),
 (79,'se.unlogic.hierarchy.modules.pagemodules.PageViewModule','Sidvisningsmodul','page','Modul för visning av statiska sidor','PageViewModule.se.xsl','Classpath',1,1,1,1,1,20,NULL,'staticcontent'),
 (81,'se.akroken.osf.jodp.modules.PublicModule','Dokument','browse','Dokument arkiv','/se/jodp/demo/modules/PublicModule.xsl','Classpath',1,1,1,1,0,6,NULL,'/se/jodp/demo/modules/staticcontent'),
 (82,'se.akroken.osf.jodp.modules.AdminModule','Dokument adm','browse','Dokument administration','/se/jodp/demo/modules/AdminModule.xsl','Classpath',1,1,1,1,0,20,NULL,'/se/jodp/demo/modules/staticcontent');


--
-- Definition of table `modulesettings`
--

CREATE TABLE `modulesettings` (
  `counter` int(10) unsigned NOT NULL auto_increment,
  `moduleID` int(10) unsigned NOT NULL,
  `id` varchar(255) NOT NULL,
  `value` mediumtext NOT NULL,
  PRIMARY KEY  (`counter`),
  KEY `FK_modulesettings_1` (`moduleID`),
  CONSTRAINT `FK_modulesettings_1` FOREIGN KEY (`moduleID`) REFERENCES `modules` (`moduleID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `modulesettings`
--

INSERT INTO `modulesettings` (`counter`,`moduleID`,`id`,`value`) VALUES 
 (113,81,'allowConvert','false'),
 (114,81,'hostAddress1','127.0.0.1'),
 (115,81,'hostPort1','8100'),
 (116,81,'menuItemType','MENUITEM'),
 (117,82,'menuItemType','MENUITEM');


--
-- Definition of table `moduleusers`
--

CREATE TABLE `moduleusers` (
  `moduleID` int(10) unsigned NOT NULL auto_increment,
  `userID` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`moduleID`,`userID`),
  CONSTRAINT `FK_moduleusers_1` FOREIGN KEY (`moduleID`) REFERENCES `modules` (`moduleID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `moduleusers`
--



--
-- Definition of table `pagegroups`
--

CREATE TABLE `pagegroups` (
  `pageID` int(10) unsigned NOT NULL,
  `groupID` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`pageID`,`groupID`),
  CONSTRAINT `FK_pagegroups_1` FOREIGN KEY (`pageID`) REFERENCES `pages` (`pageID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pagegroups`
--



--
-- Definition of table `pages`
--

CREATE TABLE `pages` (
  `pageID` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `description` varchar(255) NOT NULL default '',
  `text` mediumtext NOT NULL,
  `enabled` varchar(45) NOT NULL default '',
  `visibleInMenu` tinyint(1) NOT NULL default '0',
  `anonymousAccess` tinyint(1) NOT NULL default '0',
  `userAccess` tinyint(1) NOT NULL default '0',
  `adminAccess` tinyint(1) NOT NULL default '0',
  `sectionID` int(10) unsigned NOT NULL default '0',
  `alias` varchar(255) NOT NULL default '',
  `breadCrumb` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`pageID`),
  UNIQUE KEY `Index_3` (`sectionID`,`alias`),
  KEY `FK_pages_1` (`sectionID`),
  CONSTRAINT `FK_pages_1` FOREIGN KEY (`sectionID`) REFERENCES `sections` (`sectionID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 COMMENT='InnoDB free: 191488 kB; (`sectionID`) REFER `fkdb-system/sec';

--
-- Dumping data for table `pages`
--

INSERT INTO `pages` (`pageID`,`name`,`description`,`text`,`enabled`,`visibleInMenu`,`anonymousAccess`,`userAccess`,`adminAccess`,`sectionID`,`alias`,`breadCrumb`) VALUES 
 (8,'Dokument','Beskrivning av dokumentgeneratorn','<h1>Dokumentgeneratorn</h1>\r\n<p>Dokumentgeneratorn &auml;r en Java-baserad webbapplikation f&ouml;r hantering och genering av dokument i OpenDocument Format. Dokument&nbsp;genereras direkt i webbl&auml;saren utan att anv&auml;nda makron eller&nbsp;annan&nbsp;programvara p&aring; klienten.</p>\r\n<p>Applikationens grafiska gr&auml;nssnitt &auml;r helt webbaserat och kan anpassas efter&nbsp;en&nbsp;organisations&nbsp;grafiska profil och riktlinjer f&ouml;r att&nbsp;sm&auml;lta in i ett intran&auml;t/portal. Med hj&auml;lp av webbgr&auml;nssnittet f&aring;r anv&auml;ndaren bl&auml;dra och s&ouml;ka bland organisationens dokumentmallar och utifr&aring;n dessa&nbsp;generera dokument.</p>\r\n<p>Det finns m&ouml;jlighet att&nbsp;h&auml;mta anv&auml;ndaruppgifter fr&aring;n en databas och utifr&aring;n dessa uppgifter prioritera vilka mallar som skall visas p&aring; f&ouml;rsta sidan n&auml;r anv&auml;ndaren bes&ouml;ker applikationen samt att automatisk fylla i&nbsp; f&auml;lt i de dokument som anv&auml;ndaren v&auml;ljer att generera.<br />\r\n&nbsp;</p>\r\n<h2>Administration</h2>\r\n<p>Utvalda&nbsp;anv&auml;ndare kan&nbsp;administrera Dokumentgeneratorn direkt i webbl&auml;saren.&nbsp;<br />\r\nDe administrativa funktionerna&nbsp;som kan&nbsp;hanteras &auml;r bland annat:</p>\r\n<ul type=\"disc\" style=\"margin-top: 0cm;\">\r\n    <li>Uppladdning av nya dokumentmallar</li>\r\n    <li>Borttagning av befintliga dokumentmallar</li>\r\n    <li>Kategorisering av dokumentmallar</li>\r\n    <li>Koppling av beh&ouml;righeter fr&aring;n&nbsp;metakatalogen till olika mallkategorier</li>\r\n    <li>Hantering av administrat&ouml;rskonton</li>\r\n</ul>\r\n<p>&nbsp;</p>','1',0,1,1,1,1,'firstpage',1);


--
-- Definition of table `pageusers`
--

CREATE TABLE `pageusers` (
  `pageID` int(10) unsigned NOT NULL,
  `userID` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`pageID`,`userID`),
  CONSTRAINT `FK_pageusers_1` FOREIGN KEY (`pageID`) REFERENCES `pages` (`pageID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pageusers`
--



--
-- Definition of table `sectiongroups`
--

CREATE TABLE `sectiongroups` (
  `sectionID` int(10) unsigned NOT NULL,
  `groupID` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`sectionID`,`groupID`),
  CONSTRAINT `FK_sectiongroups_1` FOREIGN KEY (`sectionID`) REFERENCES `sections` (`sectionID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `sectiongroups`
--



--
-- Definition of table `sections`
--

CREATE TABLE `sections` (
  `sectionID` int(10) unsigned NOT NULL auto_increment,
  `parentSectionID` int(10) unsigned default NULL,
  `alias` varchar(20) NOT NULL default '',
  `enabled` tinyint(1) NOT NULL default '0',
  `anonymousAccess` tinyint(1) NOT NULL default '0',
  `userAccess` tinyint(1) NOT NULL default '0',
  `adminAccess` tinyint(1) NOT NULL default '0',
  `visibleInMenu` tinyint(1) NOT NULL default '0',
  `name` varchar(255) NOT NULL default '',
  `description` varchar(255) NOT NULL default '',
  `anonymousDefaultURI` varchar(255) NOT NULL default '',
  `userDefaultURI` varchar(255) NOT NULL default '',
  `adminDefaultURI` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`sectionID`),
  UNIQUE KEY `Index_2` (`parentSectionID`,`alias`),
  CONSTRAINT `FK_sections_1` FOREIGN KEY (`parentSectionID`) REFERENCES `sections` (`sectionID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `sections`
--

INSERT INTO `sections` (`sectionID`,`parentSectionID`,`alias`,`enabled`,`anonymousAccess`,`userAccess`,`adminAccess`,`visibleInMenu`,`name`,`description`,`anonymousDefaultURI`,`userDefaultURI`,`adminDefaultURI`) VALUES 
 (1,NULL,'Home',1,1,1,1,1,'Home','Unlogic.se','/login/loginmodule','/page/firstpage','/page/firstpage'),
 (4,1,'administration',1,0,0,1,1,'Administration','System administration','/useradmin','/useradmin','/useradmin'),
 (6,1,'documents',1,1,1,1,1,'Dokument','Dokumentmallar','/browse','/browse','/browse'),
 (13,1,'login',1,1,0,0,1,'Logga in','Logga in i dokumentgeneratorn','/loginmodule','/loginmodule','/loginmodule'),
 (14,1,'logout',1,0,1,0,1,'Logga ut','Logga ut från dokumentgeneratorn','/logout','/logout','/logout'),
 (20,1,'document-admin',1,1,1,1,1,'Dokument adm.','Dokument administration','/browse','/browse','/browse');


--
-- Definition of table `sectionusers`
--

CREATE TABLE `sectionusers` (
  `sectionID` int(10) unsigned NOT NULL auto_increment,
  `userID` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`sectionID`,`userID`),
  CONSTRAINT `FK_sectionusers_1` FOREIGN KEY (`sectionID`) REFERENCES `sections` (`sectionID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `sectionusers`
--



--
-- Definition of table `templates`
--

CREATE TABLE `templates` (
  `templateID` int(10) unsigned NOT NULL auto_increment,
  `categoryID` int(10) unsigned NOT NULL,
  `filename` varchar(255) NOT NULL,
  `size` int(10) unsigned NOT NULL,
  `description` text NOT NULL,
  `blob` mediumblob NOT NULL,
  `name` varchar(255) NOT NULL,
  `allowBackground` tinyint(1) unsigned NOT NULL,
  `allowIndentation` tinyint(1) unsigned NOT NULL,
  `allowLogoswitch` tinyint(1) unsigned default NULL,
  PRIMARY KEY  (`templateID`),
  KEY `FK_templates_1` (`categoryID`),
  CONSTRAINT `FK_templates_1` FOREIGN KEY (`categoryID`) REFERENCES `categories` (`categoryID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=372 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `templates`
--

INSERT INTO `templates` (`templateID`,`categoryID`,`filename`,`size`,`description`,`blob`,`name`,`allowBackground`,`allowIndentation`,`allowLogoswitch`) VALUES 
 (370,6,'brev_externt.odt',12090,'Mallen används vi brevförsändelser',0x[encoded data, 24180 characters],'Brevmall',1,0,0),
 (371,9,'pm.odt',10362,'Denna mall används vid skapande av PM',0x[encoded data, 20724 characters],'PM mall',1,0,0);


--
-- Definition of table `userattributes`
--

CREATE TABLE `userattributes` (
  `userAttributeID` int(10) unsigned NOT NULL auto_increment,
  `name` varchar(255) NOT NULL,
  `enabled` tinyint(1) unsigned NOT NULL,
  PRIMARY KEY  (`userAttributeID`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `userattributes`
--

INSERT INTO `userattributes` (`userAttributeID`,`name`,`enabled`) VALUES 
 (1,'Adress',1),
 (2,'Användartyp',1),
 (3,'Avdelning',1),
 (4,'Efternamn',1),
 (5,'Extern E-post',1),
 (18,'Faxnummer',1),
 (19,'Förnamn',1),
 (20,'Funktion',1),
 (21,'Intern E-post',1),
 (22,'Mellannamn',1),
 (23,'Mobilnummer',1),
 (24,'Myndighetsbenämning',0),
 (25,'Myndighetskod',0),
 (26,'Namn',1),
 (27,'Ort',1),
 (28,'Personnummer',1),
 (29,'Placering',1),
 (30,'Postnummer',0),
 (31,'Sekundär myndighet',0),
 (32,'Sekundär myndighetskod',1),
 (33,'Svarskod',0),
 (34,'Telefonnummer',1),
 (35,'Titel',1);


--
-- Definition of table `usergroups`
--

CREATE TABLE `usergroups` (
  `userID` int(10) unsigned NOT NULL,
  `groupID` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`userID`,`groupID`),
  KEY `FK_usergroups_2` (`groupID`),
  CONSTRAINT `FK_usergroups_1` FOREIGN KEY (`userID`) REFERENCES `users` (`userID`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_usergroups_2` FOREIGN KEY (`groupID`) REFERENCES `groups` (`groupID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `usergroups`
--

INSERT INTO `usergroups` (`userID`,`groupID`) VALUES 
 (1,6);


--
-- Definition of table `users`
--

CREATE TABLE `users` (
  `userID` int(10) unsigned NOT NULL auto_increment,
  `username` varchar(255) NOT NULL default '',
  `password` varchar(255) NOT NULL default '',
  `firstname` varchar(255) NOT NULL default '',
  `lastname` varchar(255) NOT NULL default '',
  `email` varchar(255) NOT NULL default '',
  `admin` tinyint(1) NOT NULL default '0',
  `enabled` tinyint(1) NOT NULL default '0',
  `added` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `lastlogin` timestamp NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`userID`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`userID`,`username`,`password`,`firstname`,`lastname`,`email`,`admin`,`enabled`,`added`,`lastlogin`) VALUES 
 (1,'admin','*4ACFE3202A5FF5CF467898FC58AAB1D615029441','Admin','Adminsson','admin@admin',1,1,'2008-01-27 20:43:42','2009-08-12 15:09:18');


--
-- Definition of table `virtualmenuitemgroups`
--

CREATE TABLE `virtualmenuitemgroups` (
  `menuItemID` int(10) unsigned NOT NULL auto_increment,
  `groupID` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`menuItemID`,`groupID`),
  CONSTRAINT `FK_virtualmenuitemgroups_1` FOREIGN KEY (`menuItemID`) REFERENCES `virtualmenuitems` (`menuItemID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `virtualmenuitemgroups`
--



--
-- Definition of table `virtualmenuitems`
--

CREATE TABLE `virtualmenuitems` (
  `menuItemID` int(10) unsigned NOT NULL auto_increment,
  `itemtype` varchar(20) NOT NULL default '',
  `name` varchar(45) default NULL,
  `description` text,
  `url` text,
  `anonymousAccess` tinyint(1) NOT NULL default '0',
  `userAccess` tinyint(1) NOT NULL default '0',
  `adminAccess` tinyint(1) NOT NULL default '0',
  `sectionID` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`menuItemID`),
  KEY `FK_menuadmin_1` (`sectionID`),
  CONSTRAINT `FK_virtualmenuitems_1` FOREIGN KEY (`sectionID`) REFERENCES `sections` (`sectionID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `virtualmenuitems`
--



--
-- Definition of table `virtualmenuitemusers`
--

CREATE TABLE `virtualmenuitemusers` (
  `menuItemID` int(10) unsigned NOT NULL auto_increment,
  `userID` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`menuItemID`,`userID`),
  CONSTRAINT `FK_virtualmenuitemusers_1` FOREIGN KEY (`menuItemID`) REFERENCES `virtualmenuitems` (`menuItemID`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `virtualmenuitemusers`
--





