diff --git a/README.md b/README.md index 212c87e1e8d..3f8c4f97ec5 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ ##DOWNLOADING -There are a number of ways to download the source code. Some are described here, an alternative all-inclusive guide is also located at http://www.tgstation13.org/wiki/index.php/Downloading_the_source_code +There are a number of ways to download the source code. Some are described here, an alternative all-inclusive guide is also located at http://www.tgstation13.org/wiki/Downloading_the_source_code Option 1: Download the source code as a zip by clicking the ZIP button in the code tab of https://github.com/tgstation/-tg-station @@ -25,7 +25,7 @@ Then you simply search for the -tg-station repository and click the big clone button. Option 3: -Follow this: http://www.tgstation13.org/wiki/index.php/Setting_up_git +Follow this: http://www.tgstation13.org/wiki/Setting_up_git (It's recommended that you use git-scm, as above, rather than the git CLI suggested by the guide) @@ -109,7 +109,7 @@ To enable an away mission open fileList.txt in the _maps/RandomZLevels directory The SQL backend for the library and stats tracking requires a MySQL server. Your server details go in /config/dbconfig.txt, and the SQL -schema is in /SQL/tgstation_schema.sql. More detailed setup instructions are located here: http://www.tgstation13.org/wiki/index.php/Downloading_the_source_code#Setting_up_the_database +schema is in /SQL/tgstation_schema.sql and /SQL/tgstation_schema_prefix.sql depending on if you want table prefixes. More detailed setup instructions are located here: http://www.tgstation13.org/wiki/Downloading_the_source_code#Setting_up_the_database ##IRC BOT SETUP diff --git a/SQL/database_changelog.txt b/SQL/database_changelog.txt index 7a670dd45f7..80af03e4561 100644 --- a/SQL/database_changelog.txt +++ b/SQL/database_changelog.txt @@ -1,3 +1,15 @@ +19 September 2014, by MrStonedOne + +Removed erro_ from table names. dbconfig.txt has a option allowing you to change the prefix used in code, defaults to "erro_" if left out for legacy reasons. + +If you are creating a new database and want to change the prefix, simply find and replace SS13_ to what ever you want (including nothing) and set the prefix value + +Two schema files are now included, one with prefixes and one without. + +If you have an existing database, and you want to rid your database of erros, you will have to rename all of the tables. A bit sql is included to do just that in errofreedatabase.sql Feel free to find and replace the prefix to what ever you want (or nothing) + +---------------------------------------------------- + 4 November 2013, by Errorage The column 'deleted' was added to the erro_library table. If set to anything other than null, the book is interpreted as deleted. @@ -14,11 +26,4 @@ UPDATE erro_library SET deleted = 1 WHERE id = someid ---------------------------------------------------- -19 September 2014, by MrStonedOne - -Removed erro_ from table names, replaced with SS13_. dbconfig.txt has a option allowing you to change the prefix used in code, defaults to "erro_" if left out for legacy reasons. - -If you are creating a new database and want to change the prefix, simply find and replace SS13_ to what ever you want and set the prefix value - -If you have an existing database, and you want to rid your database of erros, you will have to rename all of the tables. A bit sql is included to do just that in errofreedatabase.sql diff --git a/SQL/errofreedatabase.sql b/SQL/errofreedatabase.sql index bdc6c0326ab..ae5c0d7ee1c 100644 --- a/SQL/errofreedatabase.sql +++ b/SQL/errofreedatabase.sql @@ -12,4 +12,4 @@ ALTER TABLE erro_poll_option RENAME TO SS13_poll_option; ALTER TABLE erro_poll_question RENAME TO SS13_poll_question; ALTER TABLE erro_poll_textreply RENAME TO SS13_poll_textreply; ALTER TABLE erro_poll_vote RENAME TO SS13_poll_vote; -ALTER TABLE erro_privacy RENAME TO SS13_privacy; \ No newline at end of file +ALTER TABLE erro_privacy RENAME TO SS13_privacy; \ No newline at end of file diff --git a/SQL/tgstation_schema.sql b/SQL/tgstation_schema.sql index 5eb2e9d8d95..5e053d8e110 100644 --- a/SQL/tgstation_schema.sql +++ b/SQL/tgstation_schema.sql @@ -13,13 +13,13 @@ USE `feedback`; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- --- Table structure for table `erro_admin` +-- Table structure for table `admin` -- -DROP TABLE IF EXISTS `erro_admin`; +DROP TABLE IF EXISTS `admin`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `erro_admin` ( +CREATE TABLE `admin` ( `id` int(11) NOT NULL AUTO_INCREMENT, `ckey` varchar(32) NOT NULL, `rank` varchar(32) NOT NULL DEFAULT 'Administrator', @@ -31,13 +31,13 @@ CREATE TABLE `erro_admin` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `erro_admin_log` +-- Table structure for table `admin_log` -- -DROP TABLE IF EXISTS `erro_admin_log`; +DROP TABLE IF EXISTS `admin_log`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `erro_admin_log` ( +CREATE TABLE `admin_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `datetime` datetime NOT NULL, `adminckey` varchar(32) NOT NULL, @@ -48,13 +48,13 @@ CREATE TABLE `erro_admin_log` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `erro_admin_ranks` +-- Table structure for table `admin_ranks` -- -DROP TABLE IF EXISTS `erro_admin_ranks`; +DROP TABLE IF EXISTS `admin_ranks`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `erro_admin_ranks` ( +CREATE TABLE `admin_ranks` ( `id` int(11) NOT NULL AUTO_INCREMENT, `rank` varchar(40) NOT NULL, `flags` int(16) NOT NULL DEFAULT '0', @@ -62,23 +62,23 @@ CREATE TABLE `erro_admin_ranks` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; -insert into erro_admin_ranks (rank, flags) values ('Moderator',2); -insert into erro_admin_ranks (rank, flags) values ('Admin Candidate',2); -insert into erro_admin_ranks (rank, flags) values ('Trial Admin',5638); -insert into erro_admin_ranks (rank, flags) values ('Badmin',5727); -insert into erro_admin_ranks (rank, flags) values ('Game Admin',8063); -insert into erro_admin_ranks (rank, flags) values ('Game Master',65535); -insert into erro_admin_ranks (rank, flags) values ('Host',65535); -insert into erro_admin_ranks (rank, flags) values ('Coder',5168); +insert into admin_ranks (rank, flags) values ('Moderator',2); +insert into admin_ranks (rank, flags) values ('Admin Candidate',2); +insert into admin_ranks (rank, flags) values ('Trial Admin',5638); +insert into admin_ranks (rank, flags) values ('Badmin',5727); +insert into admin_ranks (rank, flags) values ('Game Admin',8063); +insert into admin_ranks (rank, flags) values ('Game Master',65535); +insert into admin_ranks (rank, flags) values ('Host',65535); +insert into admin_ranks (rank, flags) values ('Coder',5168); -- --- Table structure for table `erro_ban` +-- Table structure for table `ban` -- -DROP TABLE IF EXISTS `erro_ban`; +DROP TABLE IF EXISTS `ban`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `erro_ban` ( +CREATE TABLE `ban` ( `id` int(11) NOT NULL AUTO_INCREMENT, `bantime` datetime NOT NULL, `serverip` varchar(32) NOT NULL, @@ -107,13 +107,13 @@ CREATE TABLE `erro_ban` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `erro_connection_log` +-- Table structure for table `connection_log` -- -DROP TABLE IF EXISTS `erro_connection_log`; +DROP TABLE IF EXISTS `connection_log`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `erro_connection_log` ( +CREATE TABLE `connection_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `datetime` datetime DEFAULT NULL, `serverip` varchar(45) DEFAULT NULL, @@ -125,13 +125,13 @@ CREATE TABLE `erro_connection_log` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `erro_death` +-- Table structure for table `death` -- -DROP TABLE IF EXISTS `erro_death`; +DROP TABLE IF EXISTS `death`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `erro_death` ( +CREATE TABLE `death` ( `id` int(11) NOT NULL AUTO_INCREMENT, `pod` text NOT NULL COMMENT 'Place of death', `coord` text NOT NULL COMMENT 'X, Y, Z POD', @@ -152,13 +152,13 @@ CREATE TABLE `erro_death` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `erro_feedback` +-- Table structure for table `feedback` -- -DROP TABLE IF EXISTS `erro_feedback`; +DROP TABLE IF EXISTS `feedback`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `erro_feedback` ( +CREATE TABLE `feedback` ( `id` int(11) NOT NULL AUTO_INCREMENT, `time` datetime NOT NULL, `round_id` int(8) NOT NULL, @@ -170,13 +170,13 @@ CREATE TABLE `erro_feedback` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `erro_legacy_population` +-- Table structure for table `legacy_population` -- -DROP TABLE IF EXISTS `erro_legacy_population`; +DROP TABLE IF EXISTS `legacy_population`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `erro_legacy_population` ( +CREATE TABLE `legacy_population` ( `id` int(11) NOT NULL AUTO_INCREMENT, `playercount` int(11) DEFAULT NULL, `admincount` int(11) DEFAULT NULL, @@ -186,11 +186,11 @@ CREATE TABLE `erro_legacy_population` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `erro_library` +-- Table structure for table `library` -- -DROP TABLE IF EXISTS `erro_library`; -CREATE TABLE `erro_library` ( +DROP TABLE IF EXISTS `library`; +CREATE TABLE `library` ( `id` int(11) NOT NULL AUTO_INCREMENT, `author` varchar(45) NOT NULL, `title` varchar(45) NOT NULL, @@ -203,13 +203,13 @@ CREATE TABLE `erro_library` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- --- Table structure for table `erro_player` +-- Table structure for table `player` -- -DROP TABLE IF EXISTS `erro_player`; +DROP TABLE IF EXISTS `player`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `erro_player` ( +CREATE TABLE `player` ( `id` int(11) NOT NULL AUTO_INCREMENT, `ckey` varchar(32) NOT NULL, `firstseen` datetime NOT NULL, @@ -223,13 +223,13 @@ CREATE TABLE `erro_player` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `erro_poll_option` +-- Table structure for table `poll_option` -- -DROP TABLE IF EXISTS `erro_poll_option`; +DROP TABLE IF EXISTS `poll_option`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `erro_poll_option` ( +CREATE TABLE `poll_option` ( `id` int(11) NOT NULL AUTO_INCREMENT, `pollid` int(11) NOT NULL, `text` varchar(255) NOT NULL, @@ -244,13 +244,13 @@ CREATE TABLE `erro_poll_option` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `erro_poll_question` +-- Table structure for table `poll_question` -- -DROP TABLE IF EXISTS `erro_poll_question`; +DROP TABLE IF EXISTS `poll_question`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `erro_poll_question` ( +CREATE TABLE `poll_question` ( `id` int(11) NOT NULL AUTO_INCREMENT, `polltype` varchar(16) NOT NULL DEFAULT 'OPTION', `starttime` datetime NOT NULL, @@ -263,13 +263,13 @@ CREATE TABLE `erro_poll_question` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `erro_poll_textreply` +-- Table structure for table `poll_textreply` -- -DROP TABLE IF EXISTS `erro_poll_textreply`; +DROP TABLE IF EXISTS `poll_textreply`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `erro_poll_textreply` ( +CREATE TABLE `poll_textreply` ( `id` int(11) NOT NULL AUTO_INCREMENT, `datetime` datetime NOT NULL, `pollid` int(11) NOT NULL, @@ -282,13 +282,13 @@ CREATE TABLE `erro_poll_textreply` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `erro_poll_vote` +-- Table structure for table `poll_vote` -- -DROP TABLE IF EXISTS `erro_poll_vote`; +DROP TABLE IF EXISTS `poll_vote`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `erro_poll_vote` ( +CREATE TABLE `poll_vote` ( `id` int(11) NOT NULL AUTO_INCREMENT, `datetime` datetime NOT NULL, `pollid` int(11) NOT NULL, @@ -302,13 +302,13 @@ CREATE TABLE `erro_poll_vote` ( /*!40101 SET character_set_client = @saved_cs_client */; -- --- Table structure for table `erro_privacy` +-- Table structure for table `privacy` -- -DROP TABLE IF EXISTS `erro_privacy`; +DROP TABLE IF EXISTS `privacy`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `erro_privacy` ( +CREATE TABLE `privacy` ( `id` int(11) NOT NULL AUTO_INCREMENT, `datetime` datetime NOT NULL, `ckey` varchar(32) NOT NULL, diff --git a/SQL/tgstation_schema_prefixed.sql b/SQL/tgstation_schema_prefixed.sql new file mode 100644 index 00000000000..c1b740b6874 --- /dev/null +++ b/SQL/tgstation_schema_prefixed.sql @@ -0,0 +1,330 @@ +CREATE DATABASE IF NOT EXISTS `feedback` /*!40100 DEFAULT CHARACTER SET latin1 */; +USE `feedback`; + +/*!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 `SS13_admin` +-- + +DROP TABLE IF EXISTS `SS13_admin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SS13_admin` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `ckey` varchar(32) NOT NULL, + `rank` varchar(32) NOT NULL DEFAULT 'Administrator', + `level` int(2) NOT NULL DEFAULT '0', + `flags` int(16) NOT NULL DEFAULT '0', + `email` varchar(45) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `SS13_admin_log` +-- + +DROP TABLE IF EXISTS `SS13_admin_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SS13_admin_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `datetime` datetime NOT NULL, + `adminckey` varchar(32) NOT NULL, + `adminip` varchar(18) NOT NULL, + `log` text NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `SS13_admin_ranks` +-- + +DROP TABLE IF EXISTS `SS13_admin_ranks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SS13_admin_ranks` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `rank` varchar(40) NOT NULL, + `flags` int(16) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +insert into SS13_admin_ranks (rank, flags) values ('Moderator',2); +insert into SS13_admin_ranks (rank, flags) values ('Admin Candidate',2); +insert into SS13_admin_ranks (rank, flags) values ('Trial Admin',5638); +insert into SS13_admin_ranks (rank, flags) values ('Badmin',5727); +insert into SS13_admin_ranks (rank, flags) values ('Game Admin',8063); +insert into SS13_admin_ranks (rank, flags) values ('Game Master',65535); +insert into SS13_admin_ranks (rank, flags) values ('Host',65535); +insert into SS13_admin_ranks (rank, flags) values ('Coder',5168); + +-- +-- Table structure for table `SS13_ban` +-- + +DROP TABLE IF EXISTS `SS13_ban`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SS13_ban` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `bantime` datetime NOT NULL, + `serverip` varchar(32) NOT NULL, + `bantype` varchar(32) NOT NULL, + `reason` text NOT NULL, + `job` varchar(32) DEFAULT NULL, + `duration` int(11) NOT NULL, + `rounds` int(11) DEFAULT NULL, + `expiration_time` datetime NOT NULL, + `ckey` varchar(32) NOT NULL, + `computerid` varchar(32) NOT NULL, + `ip` varchar(32) NOT NULL, + `a_ckey` varchar(32) NOT NULL, + `a_computerid` varchar(32) NOT NULL, + `a_ip` varchar(32) NOT NULL, + `who` text NOT NULL, + `adminwho` text NOT NULL, + `edits` text, + `unbanned` int(2) DEFAULT NULL, + `unbanned_datetime` datetime DEFAULT NULL, + `unbanned_ckey` varchar(32) DEFAULT NULL, + `unbanned_computerid` varchar(32) DEFAULT NULL, + `unbanned_ip` varchar(32) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `SS13_connection_log` +-- + +DROP TABLE IF EXISTS `SS13_connection_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SS13_connection_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `datetime` datetime DEFAULT NULL, + `serverip` varchar(45) DEFAULT NULL, + `ckey` varchar(45) DEFAULT NULL, + `ip` varchar(18) DEFAULT NULL, + `computerid` varchar(45) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `SS13_death` +-- + +DROP TABLE IF EXISTS `SS13_death`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SS13_death` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `pod` text NOT NULL COMMENT 'Place of death', + `coord` text NOT NULL COMMENT 'X, Y, Z POD', + `tod` datetime NOT NULL COMMENT 'Time of death', + `job` text NOT NULL, + `special` text NOT NULL, + `name` text NOT NULL, + `byondkey` text NOT NULL, + `laname` text NOT NULL COMMENT 'Last attacker name', + `lakey` text NOT NULL COMMENT 'Last attacker key', + `gender` text NOT NULL, + `bruteloss` int(11) NOT NULL, + `brainloss` int(11) NOT NULL, + `fireloss` int(11) NOT NULL, + `oxyloss` int(11) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `SS13_feedback` +-- + +DROP TABLE IF EXISTS `SS13_feedback`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SS13_feedback` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `time` datetime NOT NULL, + `round_id` int(8) NOT NULL, + `var_name` varchar(32) NOT NULL, + `var_value` int(16) DEFAULT NULL, + `details` text, + PRIMARY KEY (`id`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `SS13_legacy_population` +-- + +DROP TABLE IF EXISTS `SS13_legacy_population`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SS13_legacy_population` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `playercount` int(11) DEFAULT NULL, + `admincount` int(11) DEFAULT NULL, + `time` datetime NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `SS13_library` +-- + +DROP TABLE IF EXISTS `SS13_library`; +CREATE TABLE `SS13_library` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `author` varchar(45) NOT NULL, + `title` varchar(45) NOT NULL, + `content` text NOT NULL, + `category` varchar(45) NOT NULL, + `ckey` varchar(45) DEFAULT 'LEGACY', + `datetime` datetime DEFAULT NULL, + `deleted` tinyint(1) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; + +-- +-- Table structure for table `SS13_player` +-- + +DROP TABLE IF EXISTS `SS13_player`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SS13_player` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `ckey` varchar(32) NOT NULL, + `firstseen` datetime NOT NULL, + `lastseen` datetime NOT NULL, + `ip` varchar(18) NOT NULL, + `computerid` varchar(32) NOT NULL, + `lastadminrank` varchar(32) NOT NULL DEFAULT 'Player', + PRIMARY KEY (`id`), + UNIQUE KEY `ckey` (`ckey`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `SS13_poll_option` +-- + +DROP TABLE IF EXISTS `SS13_poll_option`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SS13_poll_option` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `pollid` int(11) NOT NULL, + `text` varchar(255) NOT NULL, + `percentagecalc` tinyint(1) NOT NULL DEFAULT '1', + `minval` int(3) DEFAULT NULL, + `maxval` int(3) DEFAULT NULL, + `descmin` varchar(32) DEFAULT NULL, + `descmid` varchar(32) DEFAULT NULL, + `descmax` varchar(32) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `SS13_poll_question` +-- + +DROP TABLE IF EXISTS `SS13_poll_question`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SS13_poll_question` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `polltype` varchar(16) NOT NULL DEFAULT 'OPTION', + `starttime` datetime NOT NULL, + `endtime` datetime NOT NULL, + `question` varchar(255) NOT NULL, + `adminonly` tinyint(1) DEFAULT '0', + `multiplechoiceoptions` int(2) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `SS13_poll_textreply` +-- + +DROP TABLE IF EXISTS `SS13_poll_textreply`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SS13_poll_textreply` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `datetime` datetime NOT NULL, + `pollid` int(11) NOT NULL, + `ckey` varchar(32) NOT NULL, + `ip` varchar(18) NOT NULL, + `replytext` text NOT NULL, + `adminrank` varchar(32) NOT NULL DEFAULT 'Player', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `SS13_poll_vote` +-- + +DROP TABLE IF EXISTS `SS13_poll_vote`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SS13_poll_vote` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `datetime` datetime NOT NULL, + `pollid` int(11) NOT NULL, + `optionid` int(11) NOT NULL, + `ckey` varchar(255) NOT NULL, + `ip` varchar(16) NOT NULL, + `adminrank` varchar(32) NOT NULL, + `rating` int(2) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `SS13_privacy` +-- + +DROP TABLE IF EXISTS `SS13_privacy`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SS13_privacy` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `datetime` datetime NOT NULL, + `ckey` varchar(32) NOT NULL, + `option` varchar(128) NOT NULL, + PRIMARY KEY (`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 2013-03-24 18:02:35 \ No newline at end of file diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index a6e37698862..c15e4cfa516 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -1,7 +1,7 @@ /* * Holds procs designed to help with filtering text * Contains groups: - * SQL sanitization + * SQL sanitization/formating * Text sanitization * Text searches * Text modification diff --git a/config/dbconfig.txt b/config/dbconfig.txt index ecce4d9d832..dbc09df51df 100644 --- a/config/dbconfig.txt +++ b/config/dbconfig.txt @@ -21,9 +21,10 @@ FEEDBACK_DATABASE feedback ##IE: ## FEEDBACK_TABLEPREFIX erro_ ## FEEDBACK_TABLEPREFIX +## FEEDBACK_TABLEPREFIX SS13_ ## -## Suggested Default: (and whats used in the .sql file) -FEEDBACK_TABLEPREFIX SS13_ +## Leave as is if you are using the standard schema file. +FEEDBACK_TABLEPREFIX ## Username/Login used to access the database. FEEDBACK_LOGIN username