= 9000 national', `type` ENUM('private','national','public','diplomacy') NOT NULL, `is_sender` BIT(1) NOT NULL, `src` INT(11) NOT NULL, `dest` INT(11) NOT NULL, `time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `valid_until` DATETIME NOT NULL DEFAULT '9999-12-31 23:59:59', `message` TEXT NOT NULL COMMENT 'json', PRIMARY KEY (`id`), INDEX `by_mailbox` (`mailbox`, `type`, `time`) ) COLLATE='utf8_general_ci' ENGINE=InnoDB "; /////////////////////////////////////////////////////////////////////////// // 명전 테이블 /////////////////////////////////////////////////////////////////////////// $hall_schema = " create table hall ( no int(6) not null auto_increment, type int(2) default 0, rank int(2) default 0, name char(64) default '', nation char(12) default '', data int(5) default 0, color char(12) default '', picture char(32) default '', PRIMARY KEY (no) ) ENGINE=INNODB ROW_FORMAT=DYNAMIC DEFAULT CHARSET=UTF8 "; /////////////////////////////////////////////////////////////////////////// // 왕조 테이블 /////////////////////////////////////////////////////////////////////////// $emperior_schema = " create table emperior ( no int(6) not null auto_increment, phase char(255) default '', nation_count char(64) default '', nation_name text default '', nation_hist text default '', gen_count char(64) default '', personal_hist text default '', special_hist text default '', name char(64) default '', type char(64) default '', color char(6) default '', year int(4) default 0, month int(2) default 0, power int(8) default 0, gennum int(3) default 0, citynum int(3) default 0, pop char(255) default 0, poprate char(255) default '', gold int(9) default 0, rice int(9) default 0, l12name char(64) default '', l12pic char(32) default '', l11name char(64) default '', l11pic char(32) default '', l10name char(64) default '', l10pic char(32) default '', l9name char(64) default '', l9pic char(32) default '', l8name char(64) default '', l8pic char(32) default '', l7name char(64) default '', l7pic char(32) default '', l6name char(64) default '', l6pic char(32) default '', l5name char(64) default '', l5pic char(32) default '', tiger char(64) default '', eagle char(64) default '', gen text default '', history text default '', PRIMARY KEY (no) ) ENGINE=INNODB ROW_FORMAT=COMPRESSED DEFAULT CHARSET=UTF8 "; /////////////////////////////////////////////////////////////////////////// // 외교 테이블 /////////////////////////////////////////////////////////////////////////// $diplomacy_schema = " create table diplomacy ( no int(6) not null auto_increment, me int(6) default 0, you int(6) default 0, state int(6) default 0, term int(6) default 0, dead int(8) default 0, fixed char(128) default '', reserved char(128) default '', showing datetime, PRIMARY KEY (no) ) ENGINE=INNODB ROW_FORMAT=DYNAMIC DEFAULT CHARSET=UTF8 "; /////////////////////////////////////////////////////////////////////////// // 토너먼트 테이블 /////////////////////////////////////////////////////////////////////////// $tournament_schema = " create table tournament ( seq int(6) not null auto_increment, no int(6) default 0, npc int(6) default 0, name char(64) default '', w int(2) default 0, b int(2) default 0, h int(2) default 0, ldr int(3) default 0, pwr int(3) default 0, itl int(3) default 0, lvl int(3) default 0, grp int(2) default 0, grp_no int(2) default 0, win int(2) default 0, draw int(2) default 0, lose int(2) default 0, gl int(2) default 0, prmt int(1) default 0, PRIMARY KEY (seq) ) ENGINE=INNODB ROW_FORMAT=DYNAMIC DEFAULT CHARSET=UTF8 "; /////////////////////////////////////////////////////////////////////////// // 거래 테이블 /////////////////////////////////////////////////////////////////////////// $auction_schema = " create table auction ( no int(6) not null auto_increment, type int(6) default 0, no1 int(6) default 0, name1 char(64) default '-', stuff int(6) default 0, amount int(6) default 0, cost int(6) default 0, value int(6) default 0, topv int(6) default 0, no2 int(6) default 0, name2 char(64) default '-', expire datetime, PRIMARY KEY (no) ) ENGINE=INNODB ROW_FORMAT=DYNAMIC DEFAULT CHARSET=UTF8 "; /////////////////////////////////////////////////////////////////////////// // 통계 테이블 /////////////////////////////////////////////////////////////////////////// $statistic_schema = " create table statistic ( no int(6) not null auto_increment, year int(4) default 0, month int(2) default 0, nation_count int(2) default 0, nation_name text default '', nation_hist text default '', gen_count varchar(32) default '', personal_hist text default '', special_hist text default '', power_hist text default '', crewtype text default '', etc text default '', PRIMARY KEY (no) ) ENGINE=INNODB ROW_FORMAT=COMPRESSED DEFAULT CHARSET=UTF8 "; /////////////////////////////////////////////////////////////////////////// // 연감 테이블 /////////////////////////////////////////////////////////////////////////// $history_schema = " create table history ( no int(6) not null auto_increment, year int(4) default 0, month int(2) default 0, map longtext default '', log text default '', genlog text default '', nation text default '', power text default '', gen text default '', city text default '', PRIMARY KEY (no) ) ENGINE=INNODB ROW_FORMAT=COMPRESSED DEFAULT CHARSET=UTF8 ";