rathena/sql-files/logs.sql
ultramage 106b44c1e7 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://svn.code.sf.net/p/rathena/svn/trunk@13000 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-26 20:45:57 +00:00

128 lines
4.5 KiB
SQL

#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
#Database: log
#Table: picklog
CREATE TABLE `picklog` (
`id` int(11) NOT NULL auto_increment,
`time` datetime NOT NULL default '0000-00-00 00:00:00',
`char_id` int(11) NOT NULL default '0',
`type` enum('M','P','L','T','V','S','N','C','A','R','G','E') NOT NULL default 'P',
`nameid` int(11) NOT NULL default '0',
`amount` int(11) NOT NULL default '1',
`refine` tinyint(3) unsigned NOT NULL default '0',
`card0` int(11) NOT NULL default '0',
`card1` int(11) NOT NULL default '0',
`card2` int(11) NOT NULL default '0',
`card3` int(11) NOT NULL default '0',
`map` varchar(11) NOT NULL default '',
PRIMARY KEY (`id`),
INDEX (`type`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
#ZenyLog types (M)onsters,(T)rade,(V)ending Sell/Buy,(S)hop Sell/Buy,(N)PC Change amount,(A)dministrators
#Database: log
#Table: zenylog
CREATE TABLE `zenylog` (
`id` int(11) NOT NULL auto_increment,
`time` datetime NOT NULL default '0000-00-00 00:00:00',
`char_id` int(11) NOT NULL default '0',
`src_id` int(11) NOT NULL default '0',
`type` enum('M','T','V','S','N','A') NOT NULL default 'S',
`amount` int(11) NOT NULL default '0',
`map` varchar(11) NOT NULL default '',
PRIMARY KEY (`id`),
INDEX (`type`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
#Database: log
#Table: branchlog
CREATE TABLE `branchlog` (
`branch_id` mediumint(9) unsigned NOT NULL auto_increment,
`branch_date` datetime NOT NULL default '0000-00-00 00:00:00',
`account_id` int(11) NOT NULL default '0',
`char_id` int(11) 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 ;
#Database: log
#Table: mvplog
CREATE TABLE `mvplog` (
`mvp_id` mediumint(9) unsigned NOT NULL auto_increment,
`mvp_date` datetime NOT NULL default '0000-00-00 00:00:00',
`kill_char_id` int(11) NOT NULL default '0',
`monster_id` smallint(6) NOT NULL default '0',
`prize` int(11) NOT NULL default '0',
`mvpexp` mediumint(9) NOT NULL default '0',
`map` varchar(11) NOT NULL default '',
PRIMARY KEY (`mvp_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
#Database: log
#Table: atcommandlog
CREATE TABLE `atcommandlog` (
`atcommand_id` mediumint(9) unsigned NOT NULL auto_increment,
`atcommand_date` datetime NOT NULL default '0000-00-00 00:00:00',
`account_id` int(11) unsigned NOT NULL default '0',
`char_id` int(11) 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 ;
#Database: log
#Table: npclog
CREATE TABLE `npclog` (
`npc_id` mediumint(9) unsigned NOT NULL auto_increment,
`npc_date` datetime NOT NULL default '0000-00-00 00:00:00',
`account_id` int(11) unsigned NOT NULL default '0',
`char_id` int(11) 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 ;
#ChatLog types Gl(O)bal,(W)hisper,(P)arty,(G)uild,(M)ain chat
#Database: log
#Table: chatlog
CREATE TABLE `chatlog` (
`id` bigint(20) NOT NULL auto_increment,
`time` datetime NOT NULL default '0000-00-00 00:00:00',
`type` enum('O','W','P','G','M') NOT NULL default 'O',
`type_id` int(11) NOT NULL default '0',
`src_charid` int(11) NOT NULL default '0',
`src_accountid` int(11) NOT NULL default '0',
`src_map` varchar(11) NOT NULL default '',
`src_map_x` smallint(4) NOT NULL default '0',
`src_map_y` smallint(4) 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 ;
#Database: log
#Table: loginlog
CREATE TABLE `loginlog` (
`time` datetime NOT NULL default '0000-00-00 00:00:00',
`ip` varchar(15) NOT NULL default '',
`user` varchar(23) NOT NULL default '',
`rcode` tinyint(4) NOT NULL default '0',
`log` varchar(255) NOT NULL default '',
INDEX (`ip`)
) ENGINE=MyISAM ;