assets/install.mysql
-- MySQL dump 10.13 Distrib 5.1.41, for debian-linux-gnu (i486)
--
-- Host: localhost Database: fdcl
-- ------------------------------------------------------
-- Server version 5.1.41-3ubuntu12.7
/*!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 `albums`
--
DROP TABLE IF EXISTS `albums`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `albums` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`topic` varchar(20) NOT NULL DEFAULT '',
`name` varchar(25) NOT NULL DEFAULT '',
`term` varchar(20) NOT NULL DEFAULT '',
`poster_id` int(11) NOT NULL DEFAULT '0',
`hits` bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=175 DEFAULT CHARSET=latin1 COMMENT='Sections of pictures';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `comments`
--
DROP TABLE IF EXISTS `comments`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `comments` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`photo_id` int(11) NOT NULL,
`username` varchar(30) NOT NULL,
`user_ip` varchar(16) NOT NULL,
`comment` varchar(255) NOT NULL,
`date` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `id` (`photo_id`)
) ENGINE=MyISAM AUTO_INCREMENT=326 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `exif`
--
DROP TABLE IF EXISTS `exif`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `exif` (
`photoid` int(11) NOT NULL,
`tag` varchar(50) NOT NULL,
`value` varchar(255) NOT NULL,
PRIMARY KEY (`photoid`,`tag`),
KEY `photoid` (`photoid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `likebetter`
--
DROP TABLE IF EXISTS `likebetter`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `likebetter` (
`id` int(11) DEFAULT NULL,
`chosen` tinyint(1) DEFAULT NULL,
`addr` int(10) unsigned DEFAULT NULL,
UNIQUE KEY `id_2` (`id`,`addr`,`chosen`),
KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `logs`
--
DROP TABLE IF EXISTS `logs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `logs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`record_type` enum('album','photo','preference','user') NOT NULL DEFAULT 'album',
`record_id` int(11) NOT NULL DEFAULT '0',
`value_field` varchar(40) NOT NULL DEFAULT '',
`value_new` text NOT NULL,
`user_name` varchar(30) NOT NULL DEFAULT '',
`user_ip` varchar(16) NOT NULL DEFAULT '',
`user_date` date NOT NULL DEFAULT '0000-00-00',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=17511 DEFAULT CHARSET=latin1 COMMENT='Logs modifications to the system';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `photos`
--
DROP TABLE IF EXISTS `photos`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `photos` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`filename` varchar(255) NOT NULL,
`path` varchar(255) NOT NULL DEFAULT '',
`description` varchar(255) NOT NULL DEFAULT '',
`username` varchar(30) DEFAULT NULL,
`status` int(11) NOT NULL DEFAULT '0',
`flag` enum('indecent','photography','subject','bracketing') DEFAULT NULL,
`width` int(11) DEFAULT NULL,
`height` int(11) DEFAULT NULL,
`tn_width` int(11) DEFAULT NULL,
`tn_height` int(11) DEFAULT NULL,
`hits` bigint(20) NOT NULL DEFAULT '0',
`created` date DEFAULT NULL,
`fsize` int(11) NOT NULL DEFAULT '0',
`modified` int(1) DEFAULT NULL,
`mtime` int(11) DEFAULT NULL,
`keywords` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `fingerprint` (`filename`,`fsize`),
FULLTEXT KEY `description` (`description`)
) ENGINE=MyISAM AUTO_INCREMENT=14725 DEFAULT CHARSET=latin1 COMMENT='Photos and their descriptions';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `preferences`
--
DROP TABLE IF EXISTS `preferences`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `preferences` (
`prefmodule` varchar(64) NOT NULL DEFAULT 'core',
`prefkey` varchar(64) NOT NULL DEFAULT '',
`prefvalue` varchar(255) NOT NULL DEFAULT '',
`prefdefault` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`prefmodule`,`prefkey`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
INSERT INTO `preferences` VALUES('CameraLife','sitedate',NOW(),NOW());
INSERT INTO `preferences` VALUES('CameraLife','db_version','1','1');
--
-- Table structure for table `ratings`
--
DROP TABLE IF EXISTS `ratings`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ratings` (
`id` int(11) NOT NULL,
`username` varchar(30) DEFAULT NULL,
`user_ip` varchar(16) NOT NULL,
`rating` int(11) NOT NULL,
`date` datetime NOT NULL,
UNIQUE KEY `id_3` (`id`,`username`,`user_ip`),
KEY `id` (`id`),
KEY `id_2` (`id`,`username`,`user_ip`),
KEY `id_4` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `test`
--
DROP TABLE IF EXISTS `test`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `test` (
`id` int(11) NOT NULL DEFAULT '0',
`rec` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM 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` int(20) NOT NULL auto_increment,
`username` varchar(30) NOT NULL DEFAULT '',
`password` varchar(255) NOT NULL DEFAULT '',
`auth` int(11) NOT NULL DEFAULT '0',
`cookie` varchar(64) NOT NULL DEFAULT '',
`last_online` date NOT NULL DEFAULT '0000-00-00',
`last_ip` varchar(20) DEFAULT NULL,
`email` varchar(80) DEFAULT NULL,
PRIMARY KEY (`username`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Users of the system';
/*!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 2010-11-26 16:47:04