-- MySQL dump 10.13  Distrib 5.1.46, for suse-linux-gnu (x86_64)
--
-- Host: localhost    Database: photoxchange
-- ------------------------------------------------------
-- Server version	5.1.46

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `AUTHORIZATION_RULES`
--

DROP TABLE IF EXISTS `AUTHORIZATION_RULES`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AUTHORIZATION_RULES` (
  `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `TYPE` varchar(255) NOT NULL DEFAULT '',
  `VERSION` int(11) NOT NULL DEFAULT '0',
  `RESULT` varchar(255) DEFAULT NULL,
  `RESOURCE_CLASSNAME` varchar(255) DEFAULT NULL,
  `USERCONDITION_ID` bigint(20) DEFAULT NULL,
  `PATHCONDITION_ID` bigint(20) DEFAULT NULL,
  `OPERATIONCONDITION_ID` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `FK422045712468C452` (`OPERATIONCONDITION_ID`),
  KEY `FK42204571FD5B8562` (`USERCONDITION_ID`),
  KEY `FK422045712A7093A2` (`PATHCONDITION_ID`),
  CONSTRAINT `FK422045712468C452` FOREIGN KEY (`OPERATIONCONDITION_ID`) REFERENCES `OPERATION_CONDITIONS` (`ID`),
  CONSTRAINT `FK422045712A7093A2` FOREIGN KEY (`PATHCONDITION_ID`) REFERENCES `PATH_CONDITIONS` (`ID`),
  CONSTRAINT `FK42204571FD5B8562` FOREIGN KEY (`USERCONDITION_ID`) REFERENCES `USER_CONDITIONS` (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AUTHORIZATION_SERVICE`
--

DROP TABLE IF EXISTS `AUTHORIZATION_SERVICE`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AUTHORIZATION_SERVICE` (
  `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `TYPE` varchar(255) NOT NULL DEFAULT '',
  `VERSION` int(11) NOT NULL DEFAULT '0',
  `NAME` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `AUTHORIZATION_SERVICE_RULES`
--

DROP TABLE IF EXISTS `AUTHORIZATION_SERVICE_RULES`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AUTHORIZATION_SERVICE_RULES` (
  `ID` bigint(20) NOT NULL DEFAULT '0',
  `RULE_ID` bigint(20) NOT NULL DEFAULT '0',
  `POSITION` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`,`POSITION`),
  KEY `FK7DFDBD476CC274C0` (`ID`),
  KEY `FK7DFDBD47C0669E1B` (`RULE_ID`),
  CONSTRAINT `FK7DFDBD476CC274C0` FOREIGN KEY (`ID`) REFERENCES `AUTHORIZATION_SERVICE` (`ID`),
  CONSTRAINT `FK7DFDBD47C0669E1B` FOREIGN KEY (`RULE_ID`) REFERENCES `AUTHORIZATION_RULES` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `GROUPS`
--

DROP TABLE IF EXISTS `GROUPS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `GROUPS` (
  `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `VERSION` int(11) NOT NULL DEFAULT '0',
  `NAME` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `NAME` (`NAME`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `OPERATION_CONDITIONS`
--

DROP TABLE IF EXISTS `OPERATION_CONDITIONS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `OPERATION_CONDITIONS` (
  `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `TYPE` varchar(255) NOT NULL DEFAULT '',
  `VERSION` int(11) NOT NULL DEFAULT '0',
  `OPERATION` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `PATH_CONDITIONS`
--

DROP TABLE IF EXISTS `PATH_CONDITIONS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PATH_CONDITIONS` (
  `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `TYPE` varchar(255) NOT NULL DEFAULT '',
  `VERSION` int(11) NOT NULL DEFAULT '0',
  `PATTERN` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `USERS`
--

DROP TABLE IF EXISTS `USERS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `USERS` (
  `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `VERSION` int(11) NOT NULL DEFAULT '0',
  `NAME` varchar(255) DEFAULT NULL,
  `PASSWORD` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `NAME` (`NAME`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `USER_CONDITIONS`
--

DROP TABLE IF EXISTS `USER_CONDITIONS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `USER_CONDITIONS` (
  `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `TYPE` varchar(255) NOT NULL DEFAULT '',
  `VERSION` int(11) NOT NULL DEFAULT '0',
  `GROUPNAME` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Table structure for table `USER_GROUPS`
--

DROP TABLE IF EXISTS `USER_GROUPS`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `USER_GROUPS` (
  `USER_ID` bigint(20) NOT NULL DEFAULT '0',
  `GROUP_ID` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`USER_ID`,`GROUP_ID`),
  KEY `FKFF921CC86389D110` (`GROUP_ID`),
  KEY `FKFF921CC885E12764` (`USER_ID`),
  CONSTRAINT `FKFF921CC86389D110` FOREIGN KEY (`GROUP_ID`) REFERENCES `GROUPS` (`ID`),
  CONSTRAINT `FKFF921CC885E12764` FOREIGN KEY (`USER_ID`) REFERENCES `USERS` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2011-08-09 12:27:14
