<?php
/*
* buzzword
* Copyright (c) 2003 Jon Tai
*
* $Id: schema.inc,v 1.4 2003/12/07 10:15:26 jon Exp $
*
* This file is part of buzzword.
*
* buzzword is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* buzzword is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with buzzword; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
mysql_query(
"CREATE TABLE `".DB_PREFIX."gallery_galleries` (".
" `gallery_key` int(10) unsigned NOT NULL default '0',".
" `created` datetime NOT NULL default '0000-00-00 00:00:00',".
" `modified` datetime NOT NULL default '0000-00-00 00:00:00',".
" `is_private` char(1) NOT NULL default '',".
" `is_hidden` char(1) NOT NULL default '',".
" `title` text NOT NULL,".
" `description` longtext NOT NULL,".
" `allow_comments` char(1) NOT NULL default '',".
" `path` varchar(255) NOT NULL default '',".
" `parent` int(10) unsigned NOT NULL default '0',".
" `highlight` int(10) unsigned NOT NULL default '0',".
" PRIMARY KEY (`gallery_key`),".
" KEY `created` (`created`),".
" KEY `modified` (`modified`),".
" KEY `is_private` (`is_private`),".
" KEY `is_hidden` (`is_hidden`),".
" KEY `parent` (`parent`)".
") TYPE=MyISAM;"
);
mysql_query(
"CREATE TABLE `".DB_PREFIX."gallery_images` (".
" `image_key` int(10) unsigned NOT NULL default '0',".
" `is_private` char(1) NOT NULL default '',".
" `is_hidden` char(1) NOT NULL default '',".
" `title` text NOT NULL,".
" `description` longtext NOT NULL,".
" `path` varchar(255) NOT NULL default '',".
" `parent` int(10) unsigned NOT NULL default '0',".
" `thumbnail` longblob NOT NULL,".
" `thumbnail_checksum` varchar(32) NOT NULL default '',".
" `thumbnail_created` datetime NOT NULL default '0000-00-00 00:00:00',".
" `display` longblob NOT NULL,".
" `display_checksum` varchar(64) NOT NULL default '',".
" `display_created` datetime NOT NULL default '0000-00-00 00:00:00',".
" `orientation` smallint(5) unsigned NOT NULL default '0',".
" PRIMARY KEY (`image_key`),".
" KEY `is_private` (`is_private`),".
" KEY `is_hidden` (`is_hidden`),".
" KEY `parent` (`parent`)".
") TYPE=MyISAM;"
);
mysql_query(
"CREATE TABLE `".DB_PREFIX."gallery_images_comments` (".
" `comment_key` int(10) unsigned NOT NULL default '0',".
" `image_key` int(10) unsigned NOT NULL default '0',".
" `created` datetime NOT NULL default '0000-00-00 00:00:00',".
" `is_private` char(1) NOT NULL default '',".
" `title` text NOT NULL,".
" `body` longtext NOT NULL,".
" `author` tinytext NOT NULL,".
" `email` tinytext NOT NULL,".
" `email_is_private` char(1) NOT NULL default '',".
" PRIMARY KEY (`comment_key`),".
" KEY `image_key` (`image_key`),".
" KEY `created` (`created`),".
" KEY `is_private` (`is_private`)".
") TYPE=MyISAM;"
);
?>