summaryrefslogtreecommitdiff
path: root/sql-files
diff options
context:
space:
mode:
Diffstat (limited to 'sql-files')
-rw-r--r--sql-files/logs.sql1
-rw-r--r--sql-files/main.sql6
-rw-r--r--sql-files/upgrades/upgrade_svn17080.sql16
3 files changed, 23 insertions, 0 deletions
diff --git a/sql-files/logs.sql b/sql-files/logs.sql
index a94106747..90e8924ca 100644
--- a/sql-files/logs.sql
+++ b/sql-files/logs.sql
@@ -18,6 +18,7 @@ CREATE TABLE `picklog` (
`card1` int(11) NOT NULL default '0',
`card2` int(11) NOT NULL default '0',
`card3` int(11) NOT NULL default '0',
+ `nsiuid` bigint(20) unsigned NOT NULL default '0',
`map` varchar(11) NOT NULL default '',
PRIMARY KEY (`id`),
INDEX (`type`)
diff --git a/sql-files/main.sql b/sql-files/main.sql
index caec3df63..206515176 100644
--- a/sql-files/main.sql
+++ b/sql-files/main.sql
@@ -21,6 +21,7 @@ CREATE TABLE IF NOT EXISTS `auction` (
`card1` smallint(11) NOT NULL default '0',
`card2` smallint(11) NOT NULL default '0',
`card3` smallint(11) NOT NULL default '0',
+ `nsiuid` bigint(20) unsigned NOT NULL default '0',
PRIMARY KEY (`auction_id`)
) ENGINE=MyISAM;
@@ -42,6 +43,7 @@ CREATE TABLE IF NOT EXISTS `cart_inventory` (
`card2` smallint(11) NOT NULL default '0',
`card3` smallint(11) NOT NULL default '0',
`expire_time` int(11) unsigned NOT NULL default '0',
+ `nsiuid` bigint(20) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `char_id` (`char_id`)
) ENGINE=MyISAM;
@@ -341,6 +343,7 @@ CREATE TABLE IF NOT EXISTS `guild_storage` (
`card2` smallint(11) NOT NULL default '0',
`card3` smallint(11) NOT NULL default '0',
`expire_time` int(11) unsigned NOT NULL default '0',
+ `nsiuid` bigint(20) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `guild_id` (`guild_id`)
) ENGINE=MyISAM;
@@ -404,6 +407,7 @@ CREATE TABLE IF NOT EXISTS `inventory` (
`card3` smallint(11) NOT NULL default '0',
`expire_time` int(11) unsigned NOT NULL default '0',
`favorite` tinyint(3) unsigned NOT NULL default '0',
+ `nsiuid` bigint(20) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `char_id` (`char_id`)
) ENGINE=MyISAM;
@@ -500,6 +504,7 @@ CREATE TABLE IF NOT EXISTS `mail` (
`card1` smallint(11) NOT NULL default '0',
`card2` smallint(11) NOT NULL default '0',
`card3` smallint(11) NOT NULL default '0',
+ `nsiuid` bigint(20) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
@@ -661,6 +666,7 @@ CREATE TABLE IF NOT EXISTS `storage` (
`card2` smallint(11) NOT NULL default '0',
`card3` smallint(11) NOT NULL default '0',
`expire_time` int(11) unsigned NOT NULL default '0',
+ `nsiuid` bigint(20) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `account_id` (`account_id`)
) ENGINE=MyISAM;
diff --git a/sql-files/upgrades/upgrade_svn17080.sql b/sql-files/upgrades/upgrade_svn17080.sql
new file mode 100644
index 000000000..a94b8b668
--- /dev/null
+++ b/sql-files/upgrades/upgrade_svn17080.sql
@@ -0,0 +1,16 @@
+CREATE TABLE IF NOT EXISTS `interreg` (
+ `varname` varchar(11) NOT NULL,
+ `value` varchar(20) NOT NULL,
+ PRIMARY KEY (`varname`)
+) ENGINE=InnoDB;
+INSERT INTO `interreg` (`varname`, `value`) VALUES
+('nsiuid', '0');
+
+ALTER TABLE `auction` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0';
+ALTER TABLE `cart_inventory` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0';
+ALTER TABLE `guild_storage` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0';
+ALTER TABLE `inventory` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0';
+ALTER TABLE `mail` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0';
+ALTER TABLE `storage` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0';
+
+ALTER TABLE `picklog` ADD `nsiuid` BIGINT NOT NULL DEFAULT '0' AFTER `card3`;