Location: PHPKode > projects > Buzzword > buzzword-0.8.12/links/schema.inc
<?php

/*
 * buzzword
 * Copyright (c) 2003 Jon Tai
 *
 * $Id: schema.inc 267 2004-03-31 03:14:55Z bradt $
 *
 * 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."links_categories` (".
    "  `category_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 '',".
    "  PRIMARY KEY  (`category_key`),".
    "  KEY `created` (`created`),".
    "  KEY `modified` (`modified`),".
    "  KEY `is_private` (`is_private`),".
    "  KEY `is_hidden` (`is_hidden`)".
    ") TYPE=MyISAM;"
);

mysql_query(
    "CREATE TABLE `".DB_PREFIX."links_links` (".
    "  `link_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,".
    "  `url` text NOT NULL,".
    "  `description` longtext NOT NULL,".
    "  `parent` int(10) unsigned NOT NULL default '0',".
    "  PRIMARY KEY  (`link_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."links_links_comments` (".
    "  `comment_key` int(10) unsigned NOT NULL default '0',".
    "  `link_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 `link_key` (`link_key`),".
    "  KEY `created` (`created`),".
    "  KEY `is_private` (`is_private`)".
    ") TYPE=MyISAM;"
);

?>
Return current item: Buzzword