Skip to content
Snippets Groups Projects
Commit a4ca9658 authored by MELERIX's avatar MELERIX
Browse files

SQL: Time/Date related columns in some tables changed to bigint(13) due we are...

SQL: Time/Date related columns in some tables changed to bigint(13) due we are using unix time + miliseconds.
parent 9b8135a4
No related branches found
No related tags found
No related merge requests found
Showing
with 28 additions and 28 deletions
CREATE TABLE IF NOT EXISTS `accounts` (
`login` VARCHAR(45) NOT NULL default '',
`password` VARCHAR(45) ,
`lastactive` DECIMAL(20),
`lastactive` bigint(13) unsigned NOT NULL DEFAULT '0',
`accessLevel` TINYINT NOT NULL DEFAULT 0,
`lastIP` CHAR(15) NULL DEFAULT NULL,
`lastServer` TINYINT DEFAULT 1,
......
......@@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `auction` (
`itemQuantity` BIGINT UNSIGNED NOT NULL default 0,
`startingBid` BIGINT UNSIGNED NOT NULL default 0,
`currentBid` BIGINT UNSIGNED NOT NULL default 0,
`endDate` decimal(20,0) NOT NULL default '0',
`endDate` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`itemType`,`itemId`,`itemObjectId`),
KEY `id` (`id`)
);
\ No newline at end of file
......@@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS `auction_bid` (
`bidderName` varchar(50) NOT NULL,
`clan_name` varchar(50) NOT NULL,
`maxBid` BIGINT UNSIGNED NOT NULL default 0,
`time_bid` decimal(20,0) NOT NULL default '0',
`time_bid` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`auctionId`,`bidderId`),
KEY `id` (`id`)
);
\ No newline at end of file
......@@ -3,9 +3,9 @@ CREATE TABLE IF NOT EXISTS `castle` (
`name` varchar(25) NOT NULL,
`taxPercent` INT NOT NULL default 15,
`treasury` BIGINT NOT NULL default 0,
`siegeDate` DECIMAL(20,0) NOT NULL default 0,
`siegeDate` bigint(13) unsigned NOT NULL DEFAULT '0',
`regTimeOver` enum('true','false') DEFAULT 'true' NOT NULL,
`regTimeEnd` DECIMAL(20,0) NOT NULL default 0,
`regTimeEnd` bigint(13) unsigned NOT NULL DEFAULT '0',
`showNpcCrest` enum('true','false') DEFAULT 'false' NOT NULL,
PRIMARY KEY (`name`),
KEY `id` (`id`)
......
......@@ -4,6 +4,6 @@ CREATE TABLE IF NOT EXISTS `castle_functions` (
`lvl` int(3) NOT NULL default '0',
`lease` int(10) NOT NULL default '0',
`rate` decimal(20,0) NOT NULL default '0',
`endTime` decimal(20,0) NOT NULL default '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`castle_id`,`type`)
);
\ No newline at end of file
CREATE TABLE IF NOT EXISTS `character_instance_time` (
`charId` INT UNSIGNED NOT NULL DEFAULT '0',
`instanceId` int(3) NOT NULL DEFAULT '0',
`time` decimal(20) NOT NULL DEFAULT '0',
`time` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`charId`,`instanceId`)
);
\ No newline at end of file
CREATE TABLE IF NOT EXISTS `character_offline_trade` (
`charId` int(10) unsigned NOT NULL,
`time` bigint(20) unsigned NOT NULL DEFAULT '0',
`time` bigint(13) unsigned NOT NULL DEFAULT '0',
`type` tinyint(4) NOT NULL DEFAULT '0',
`title` varchar(50) DEFAULT NULL,
PRIMARY KEY (`charId`)
......
......@@ -2,6 +2,6 @@ CREATE TABLE IF NOT EXISTS `character_reco_bonus` (
`charId` int(10) unsigned NOT NULL,
`rec_have` tinyint(3) unsigned NOT NULL DEFAULT '0',
`rec_left` tinyint(3) unsigned NOT NULL DEFAULT '0',
`time_left` decimal(20,0) unsigned NOT NULL DEFAULT '0',
`time_left` bigint(13) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `charId` (`charId`)
);
\ No newline at end of file
......@@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS `character_skills_save` (
`effect_count` INT NOT NULL default 0,
`effect_cur_time` INT NOT NULL default 0,
`reuse_delay` INT(8) NOT NULL DEFAULT 0,
`systime` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`systime` bigint(13) unsigned NOT NULL DEFAULT '0',
`restore_type` INT(1) NOT NULL DEFAULT 0,
`class_index` INT(1) NOT NULL DEFAULT 0,
`buff_index` INT(2) NOT NULL default 0,
......
......@@ -29,7 +29,7 @@ CREATE TABLE IF NOT EXISTS `characters` (
`classid` TINYINT UNSIGNED DEFAULT NULL,
`base_class` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`transform_id` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`deletetime` BIGINT DEFAULT NULL,
`deletetime` bigint(13) unsigned NOT NULL DEFAULT '0',
`cancraft` TINYINT UNSIGNED DEFAULT NULL,
`title` VARCHAR(16) DEFAULT NULL,
`title_color` MEDIUMINT UNSIGNED NOT NULL DEFAULT '16777079',
......@@ -38,7 +38,7 @@ CREATE TABLE IF NOT EXISTS `characters` (
`onlinetime` INT DEFAULT NULL,
`char_slot` TINYINT UNSIGNED DEFAULT NULL,
`newbie` MEDIUMINT UNSIGNED DEFAULT 1,
`lastAccess` BIGINT UNSIGNED DEFAULT NULL,
`lastAccess` bigint(13) unsigned NOT NULL DEFAULT '0',
`clan_privs` MEDIUMINT UNSIGNED DEFAULT 0,
`wantspeace` TINYINT UNSIGNED DEFAULT 0,
`isin7sdungeon` TINYINT UNSIGNED NOT NULL default 0,
......@@ -51,12 +51,12 @@ CREATE TABLE IF NOT EXISTS `characters` (
`apprentice` INT UNSIGNED NOT NULL DEFAULT 0,
`sponsor` INT UNSIGNED NOT NULL DEFAULT 0,
`varka_ketra_ally` TINYINT NOT NULL DEFAULT 0,
`clan_join_expiry_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`clan_create_expiry_time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`clan_join_expiry_time` bigint(13) unsigned NOT NULL DEFAULT '0',
`clan_create_expiry_time` bigint(13) unsigned NOT NULL DEFAULT '0',
`death_penalty_level` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`bookmarkslot` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`vitality_points` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`createTime` DECIMAL(20,0) NOT NULL default 0,
`createTime` bigint(13) unsigned NOT NULL DEFAULT '0',
`language` VARCHAR(2) DEFAULT NULL,
PRIMARY KEY (`charId`),
KEY `clanid` (`clanid`)
......
......@@ -11,10 +11,10 @@ CREATE TABLE IF NOT EXISTS `clan_data` (
`crest_large_id` INT,
`ally_crest_id` INT,
`auction_bid_at` INT NOT NULL default 0,
`ally_penalty_expiry_time` DECIMAL( 20,0 ) NOT NULL DEFAULT 0,
`ally_penalty_expiry_time` bigint(13) unsigned NOT NULL DEFAULT '0',
`ally_penalty_type` DECIMAL( 1 ) NOT NULL DEFAULT 0,
`char_penalty_expiry_time` DECIMAL( 20,0 ) NOT NULL DEFAULT 0,
`dissolving_expiry_time` DECIMAL( 20,0 ) NOT NULL DEFAULT 0,
`char_penalty_expiry_time` bigint(13) unsigned NOT NULL DEFAULT '0',
`dissolving_expiry_time` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`clan_id`),
KEY `leader_id` (`leader_id`),
KEY `ally_id` (`ally_id`)
......
......@@ -5,7 +5,7 @@ CREATE TABLE IF NOT EXISTS `clanhall` (
`lease` int(10) NOT NULL default '0',
`desc` text NOT NULL,
`location` varchar(15) NOT NULL default '',
`paidUntil` decimal(20,0) NOT NULL default '0',
`paidUntil` bigint(13) unsigned NOT NULL DEFAULT '0',
`Grade` decimal(1,0) NOT NULL default '0',
`paid` int( 1 ) NOT NULL default '0',
PRIMARY KEY `id` (`id`)
......
......@@ -4,6 +4,6 @@ CREATE TABLE IF NOT EXISTS `clanhall_functions` (
`lvl` int(3) NOT NULL default '0',
`lease` int(10) NOT NULL default '0',
`rate` decimal(20,0) NOT NULL default '0',
`endTime` decimal(20,0) NOT NULL default '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`hall_id`,`type`)
);
\ No newline at end of file
......@@ -4,6 +4,6 @@ CREATE TABLE IF NOT EXISTS `cursed_weapons` (
`playerKarma` INT DEFAULT 0,
`playerPkKills` INT DEFAULT 0,
`nbKills` INT DEFAULT 0,
`endTime` DECIMAL(20,0) DEFAULT 0,
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`itemId`)
);
\ No newline at end of file
CREATE TABLE IF NOT EXISTS `fort` (
`id` int(11) NOT NULL default 0,
`name` varchar(25) NOT NULL,
`siegeDate` decimal(20,0) NOT NULL default 0,
`lastOwnedTime` decimal(20,0) NOT NULL default 0,
`siegeDate` bigint(13) unsigned NOT NULL DEFAULT '0',
`lastOwnedTime` bigint(13) unsigned NOT NULL DEFAULT '0',
`owner` int(11) NOT NULL default 0,
`fortType` int(1) NOT NULL default 0,
`state` int(1) NOT NULL default 0,
......
......@@ -4,6 +4,6 @@ CREATE TABLE IF NOT EXISTS `fort_functions` (
`lvl` int(3) NOT NULL default '0',
`lease` int(10) NOT NULL default '0',
`rate` decimal(20,0) NOT NULL default '0',
`endTime` decimal(20,0) NOT NULL default '0',
`endTime` bigint(13) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`fort_id`,`type`)
);
\ No newline at end of file
......@@ -8,7 +8,7 @@ CREATE TABLE IF NOT EXISTS `games` (
`prize1` INT NOT NULL default 0,
`prize2` INT NOT NULL default 0,
`prize3` INT NOT NULL default 0,
`enddate` decimal(20,0) NOT NULL default 0,
`enddate` bigint(13) unsigned NOT NULL DEFAULT '0',
`finished` INT NOT NULL default 0,
PRIMARY KEY (`id`,`idnr`)
);
\ No newline at end of file
......@@ -2,7 +2,7 @@ CREATE TABLE IF NOT EXISTS `global_tasks` (
`id` int(11) NOT NULL auto_increment,
`task` varchar(50) NOT NULL default '',
`type` varchar(50) NOT NULL default '',
`last_activation` decimal(20,0) NOT NULL default 0,
`last_activation` bigint(13) unsigned NOT NULL DEFAULT '0',
`param1` varchar(100) NOT NULL default '',
`param2` varchar(100) NOT NULL default '',
`param3` varchar(255) NOT NULL default '',
......
......@@ -4,7 +4,7 @@ CREATE TABLE IF NOT EXISTS `grandboss_data` (
`loc_y` INTEGER NOT NULL DEFAULT 0,
`loc_z` INTEGER NOT NULL DEFAULT 0,
`heading` INTEGER NOT NULL DEFAULT 0,
`respawn_time` BIGINT NOT NULL DEFAULT 0,
`respawn_time` bigint(13) unsigned NOT NULL DEFAULT '0',
`currentHP` DECIMAL(12,0) DEFAULT NULL,
`currentMP` DECIMAL(8,0) DEFAULT NULL,
`status` TINYINT NOT NULL DEFAULT 0,
......
CREATE TABLE IF NOT EXISTS `heroes_diary` (
`charId` int(10) unsigned NOT NULL,
`time` decimal(20,0) unsigned NOT NULL,
`time` bigint(13) unsigned NOT NULL DEFAULT '0',
`action` tinyint(2) unsigned NOT NULL default '0',
`param` int(11) unsigned NOT NULL default '0',
KEY `charId` (`charId`)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment