From 9f88ac5254f9c6c83054120f3c9d43e13e0ab014 Mon Sep 17 00:00:00 2001 From: Anthony Parsons Date: Mon, 15 Aug 2005 15:52:44 +0000 Subject: [PATCH] Stuff --- css/{default.css => furry.css} | 0 css/{default2.css => scaly.css} | 0 res/boards-data.sql | 2 +- res/boards-structure.sql | 20 ++++++++++++++------ 4 files changed, 15 insertions(+), 7 deletions(-) rename css/{default.css => furry.css} (100%) rename css/{default2.css => scaly.css} (100%) diff --git a/css/default.css b/css/furry.css similarity index 100% rename from css/default.css rename to css/furry.css diff --git a/css/default2.css b/css/scaly.css similarity index 100% rename from css/default2.css rename to css/scaly.css diff --git a/res/boards-data.sql b/res/boards-data.sql index 9dca3e2..dd800f8 100644 --- a/res/boards-data.sql +++ b/res/boards-data.sql @@ -20,7 +20,7 @@ /*!40000 ALTER TABLE `themes` DISABLE KEYS */; LOCK TABLES `themes` WRITE; -INSERT INTO `themes` (`themeid`, `theme_name`, `css_file`) VALUES (1,'FurryFAQs','default.css'),(2,'GameFAQs Classic','gamefaqs.css'),(3,'ScalyFAQs','default2.css'),(4,'GameFAQs Hell II','gfh2.css'),(5,'B-Type','b-type.css'); +INSERT INTO `themes` (`themeid`, `theme_name`, `css_file`) VALUES (1,'FurryFAQs','furry.css'),(2,'GameFAQs Classic','gamefaqs.css'),(3,'ScalyFAQs','scaly.css'),(4,'GameFAQs Hell II','gfh2.css'),(5,'B-Type','b-type.css'); UNLOCK TABLES; /*!40000 ALTER TABLE `themes` ENABLE KEYS */; diff --git a/res/boards-structure.sql b/res/boards-structure.sql index 436fac8..fcc310e 100644 --- a/res/boards-structure.sql +++ b/res/boards-structure.sql @@ -50,7 +50,8 @@ CREATE TABLE `invites` ( `userid` smallint(5) unsigned NOT NULL, `code` char(36) NOT NULL, PRIMARY KEY (`id`), - KEY `userid` (`userid`) + KEY `userid` (`userid`), + CONSTRAINT `invites_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- @@ -96,7 +97,10 @@ CREATE TABLE `messages` ( PRIMARY KEY (`messageid`), KEY `m_replyto` (`replyto`), KEY `m_poster` (`userid`), - KEY `m_topic` (`topicid`) + KEY `m_topic` (`topicid`), + CONSTRAINT `messages_ibfk_3` FOREIGN KEY (`replyto`) REFERENCES `messages` (`messageid`) ON DELETE CASCADE, + CONSTRAINT `messages_ibfk_1` FOREIGN KEY (`topicid`) REFERENCES `topics` (`topicid`) ON DELETE CASCADE, + CONSTRAINT `messages_ibfk_2` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- @@ -122,10 +126,13 @@ CREATE TABLE `topics` ( `userid` smallint(5) unsigned NOT NULL default '0', `boardid` tinyint(4) NOT NULL default '0', `visibility` enum('normal','deleted','modded','sticky') NOT NULL default 'normal', - `closed` bit(1) NOT NULL, - `lastpost` mediumint(8) unsigned NOT NULL, + `closed` bit(1) NOT NULL default '\0', + `lastpost` mediumint(8) unsigned default NULL, PRIMARY KEY (`topicid`), - KEY `t_poster` (`userid`) + KEY `t_poster` (`userid`), + KEY `lastpost` (`lastpost`), + CONSTRAINT `topics_ibfk_2` FOREIGN KEY (`lastpost`) REFERENCES `messages` (`messageid`), + CONSTRAINT `topics_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `users` (`userid`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- @@ -161,7 +168,8 @@ CREATE TABLE `users` ( `reg_ip` int(10) unsigned default '0', `date_format` varchar(40) NOT NULL default 'Y-m-d H:i:s', PRIMARY KEY (`userid`), - KEY `u_referrer` (`referrer`) + KEY `u_referrer` (`referrer`), + CONSTRAINT `users_ibfk_1` FOREIGN KEY (`referrer`) REFERENCES `users` (`userid`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; -- 2.11.4.GIT