hercules/sql-files/logs.sql

187 lines
5.8 KiB
MySQL
Raw Permalink Normal View History

-- This file is part of Hercules.
-- http://herc.ws - http://github.com/HerculesWS/Hercules
--
-- Copyright (C) 2012-2025 Hercules Dev Team
-- Copyright (C) Athena Dev Teams
--
-- Hercules 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 3 of the License, or
-- (at your option) any later version.
--
-- This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
-- PickLog Types
-- (M)onsters Drop
-- (P)layers Drop/Take
-- Mobs Drop (L)oot Drop/Take
-- Players (T)rade Give/Take
-- Players (V)ending Sell/Take
-- (S)hop Sell/Take
-- (N)PC Give/Take
-- (C)onsumable Items
-- (A)dministrators Create/Delete
-- Sto(R)age
-- (G)uild Storage
-- (E)mail attachment
-- (B)uying Store
-- Pr(O)duced Items/Ingredients
-- Auct(I)oned Items
-- (X) Other
-- (D) Stolen from mobs
-- (U) MVP Prizes
--
-- Table structure for table `atcommandlog`
--
CREATE TABLE IF NOT EXISTS `atcommandlog` (
`atcommand_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,
`atcommand_date` DATETIME NULL,
`account_id` INT UNSIGNED NOT NULL DEFAULT '0',
`char_id` INT UNSIGNED NOT NULL DEFAULT '0',
`char_name` VARCHAR(25) NOT NULL DEFAULT '',
`map` VARCHAR(11) NOT NULL DEFAULT '',
`command` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (`atcommand_id`),
INDEX (`account_id`),
INDEX (`char_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
--
-- Table structure for table `branchlog`
--
CREATE TABLE IF NOT EXISTS `branchlog` (
`branch_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,
`branch_date` DATETIME NULL,
`account_id` INT NOT NULL DEFAULT '0',
`char_id` INT NOT NULL DEFAULT '0',
`char_name` VARCHAR(25) NOT NULL DEFAULT '',
`map` VARCHAR(11) NOT NULL DEFAULT '',
PRIMARY KEY(`branch_id`),
INDEX (`account_id`),
INDEX (`char_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
--
-- Table structure for table `chatlog`
--
CREATE TABLE IF NOT EXISTS `chatlog` (
`id` BIGINT NOT NULL AUTO_INCREMENT,
`time` DATETIME NULL,
`type` ENUM('O','W','P','G','M','C') NOT NULL DEFAULT 'O',
`type_id` INT NOT NULL DEFAULT '0',
`src_charid` INT NOT NULL DEFAULT '0',
`src_accountid` INT NOT NULL DEFAULT '0',
`src_map` VARCHAR(11) NOT NULL DEFAULT '',
`src_map_x` SMALLINT NOT NULL DEFAULT '0',
`src_map_y` SMALLINT NOT NULL DEFAULT '0',
`dst_charname` VARCHAR(25) NOT NULL DEFAULT '',
`message` VARCHAR(150) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
INDEX (`src_accountid`),
INDEX (`src_charid`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
--
-- Table structure for table `loginlog`
--
Merged the /loginmerge branch (topic:192754) * the login server storage, ipban and logging systems have been abstracted and now provide a common interface; the rest has been merged into a single login server core (no more login/login_sql duplicity) * storage systems are now added via compiler options (WITH_SQL / WITH_TXT) * multiple storage engines can be compiled in at the same time, and the config option account.engine defines which one will be used. * due to MySQL autoincrement limitations, accounts with id '0' will not be supported; account IDs from this point on should start from '1'. * login_log() functions now again record IP addresses in dotted format, not as 4-byte integers (undo from r6868). * removed config options that defined column names in the login table * removed `memo` and `error message` columns from login db/savefile * moved `loginlog` table to the logs database * added sql files upgrade_svn12975.sql and upgrade_svn12975_log.sql * due to changes to the login table layout, I added an !optional! sql file (upgrade_svn12975_view.sql) that will provide a certain degree of backwards compatibility with existing software; read the instructions inside carefully! * moved third-party includes/libs to a separate directory * updated project files / makefiles Changed the way GM levels are handled * removed conf/gm_account.txt * added the gm level column to the txt savefile (after 'email' column) * gm level information is now transferred along with account data For open problems see bugreport:1889. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13000 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-26 20:45:57 +00:00
CREATE TABLE IF NOT EXISTS `loginlog` (
`time` DATETIME NULL,
`ip` VARCHAR(15) NOT NULL DEFAULT '',
`user` VARCHAR(23) NOT NULL DEFAULT '',
`rcode` TINYINT NOT NULL DEFAULT '0',
`log` VARCHAR(255) NOT NULL DEFAULT '',
Merged the /loginmerge branch (topic:192754) * the login server storage, ipban and logging systems have been abstracted and now provide a common interface; the rest has been merged into a single login server core (no more login/login_sql duplicity) * storage systems are now added via compiler options (WITH_SQL / WITH_TXT) * multiple storage engines can be compiled in at the same time, and the config option account.engine defines which one will be used. * due to MySQL autoincrement limitations, accounts with id '0' will not be supported; account IDs from this point on should start from '1'. * login_log() functions now again record IP addresses in dotted format, not as 4-byte integers (undo from r6868). * removed config options that defined column names in the login table * removed `memo` and `error message` columns from login db/savefile * moved `loginlog` table to the logs database * added sql files upgrade_svn12975.sql and upgrade_svn12975_log.sql * due to changes to the login table layout, I added an !optional! sql file (upgrade_svn12975_view.sql) that will provide a certain degree of backwards compatibility with existing software; read the instructions inside carefully! * moved third-party includes/libs to a separate directory * updated project files / makefiles Changed the way GM levels are handled * removed conf/gm_account.txt * added the gm level column to the txt savefile (after 'email' column) * gm level information is now transferred along with account data For open problems see bugreport:1889. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13000 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-26 20:45:57 +00:00
INDEX (`ip`)
) ENGINE=MyISAM;
--
-- Table structure for table `mvplog`
--
CREATE TABLE IF NOT EXISTS `mvplog` (
`mvp_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,
`mvp_date` DATETIME NULL,
`kill_char_id` INT NOT NULL DEFAULT '0',
`monster_id` SMALLINT NOT NULL DEFAULT '0',
`prize` INT NOT NULL DEFAULT '0',
`mvpexp` MEDIUMINT NOT NULL DEFAULT '0',
`map` VARCHAR(11) NOT NULL DEFAULT '',
PRIMARY KEY (`mvp_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
--
-- Table structure for table `npclog`
--
CREATE TABLE IF NOT EXISTS `npclog` (
`npc_id` MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT,
`npc_date` DATETIME NULL,
`account_id` INT UNSIGNED NOT NULL DEFAULT '0',
`char_id` INT UNSIGNED NOT NULL DEFAULT '0',
`char_name` VARCHAR(25) NOT NULL DEFAULT '',
`map` VARCHAR(11) NOT NULL DEFAULT '',
`mes` VARCHAR(255) NOT NULL DEFAULT '',
PRIMARY KEY (`npc_id`),
INDEX (`account_id`),
INDEX (`char_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
--
-- Table structure for table `picklog`
--
CREATE TABLE IF NOT EXISTS `picklog` (
`id` INT NOT NULL AUTO_INCREMENT,
`time` DATETIME NULL,
`char_id` INT NOT NULL DEFAULT '0',
2022-10-08 20:37:31 +01:00
`type` ENUM('M','P','L','T','V','S','N','C','A','R','G','E','B','O','I','X','D','U','K','Y','Z','W','Q','J','H','@','0','1','2','3','4','5') NOT NULL DEFAULT 'P',
`nameid` INT NOT NULL DEFAULT '0',
`amount` INT NOT NULL DEFAULT '1',
`refine` TINYINT UNSIGNED NOT NULL DEFAULT '0',
2021-10-21 18:53:57 +01:00
`grade` TINYINT UNSIGNED NOT NULL DEFAULT '0',
`card0` INT NOT NULL DEFAULT '0',
`card1` INT NOT NULL DEFAULT '0',
`card2` INT NOT NULL DEFAULT '0',
`card3` INT NOT NULL DEFAULT '0',
`opt_idx0` SMALLINT unsigned NOT NULL default '0',
`opt_val0` SMALLINT unsigned NOT NULL default '0',
`opt_idx1` SMALLINT unsigned NOT NULL default '0',
`opt_val1` SMALLINT unsigned NOT NULL default '0',
`opt_idx2` SMALLINT unsigned NOT NULL default '0',
`opt_val2` SMALLINT unsigned NOT NULL default '0',
`opt_idx3` SMALLINT unsigned NOT NULL default '0',
`opt_val3` SMALLINT unsigned NOT NULL default '0',
`opt_idx4` SMALLINT unsigned NOT NULL default '0',
`opt_val4` SMALLINT unsigned NOT NULL default '0',
`unique_id` BIGINT UNSIGNED NOT NULL DEFAULT '0',
`map` VARCHAR(11) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
INDEX (`type`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
--
-- Table structure for table `zenylog`
--
CREATE TABLE IF NOT EXISTS `zenylog` (
`id` INT NOT NULL AUTO_INCREMENT,
`time` DATETIME NULL,
`char_id` INT NOT NULL DEFAULT '0',
`src_id` INT NOT NULL DEFAULT '0',
2022-10-08 20:37:31 +01:00
`type` ENUM('T','V','P','M','S','N','D','C','A','E','I','B','K','4','5') NOT NULL DEFAULT 'S',
`amount` INT NOT NULL DEFAULT '0',
`map` VARCHAR(11) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
INDEX (`type`)
) ENGINE=MyISAM AUTO_INCREMENT=1;