Skip to content
Permalink
Browse files

Follow up to f2a1b6e

Thanks to @mazvi and @Daegaladh
  • Loading branch information
Lemongrass3110 committed Jan 8, 2020
1 parent f4dd8eb commit fb8a7523208dba4f1bbe1c23148537060a470391
Showing with 8 additions and 4 deletions.
  1. +3 −1 sql-files/main.sql
  2. +0 −3 sql-files/upgrades/upgrade_20191222.sql
  3. +5 −0 sql-files/upgrades/upgrade_20200108.sql
@@ -297,6 +297,7 @@ CREATE TABLE IF NOT EXISTS `char_reg_str` (
--

CREATE TABLE IF NOT EXISTS `charlog` (
`id` bigint(20) unsigned NOT NULL auto_increment,
`time` datetime NOT NULL,
`char_msg` varchar(255) NOT NULL default 'char select',
`account_id` int(11) NOT NULL default '0',
@@ -310,7 +311,8 @@ CREATE TABLE IF NOT EXISTS `charlog` (
`luk` int(11) unsigned NOT NULL default '0',
`hair` tinyint(4) NOT NULL default '0',
`hair_color` int(11) NOT NULL default '0',
PRIMARY KEY (`time`, `account_id`, `char_num`)
PRIMARY KEY (`id`),
KEY `account_id` (`account_id`)
) ENGINE=MyISAM;

--
@@ -4,9 +4,6 @@ ALTER TABLE `bonus_script`
ALTER TABLE `buyingstore_items`
ADD PRIMARY KEY (`buyingstore_id`, `index`);

ALTER TABLE `charlog`
ADD PRIMARY KEY (`time`, `account_id`, `char_num`);

ALTER TABLE `friends`
DROP INDEX `char_id`,
ADD PRIMARY KEY (`char_id`, `friend_id`);
@@ -0,0 +1,5 @@
ALTER TABLE `charlog`
DROP PRIMARY KEY, -- comment if primary key has not been created yet
ADD COLUMN `id` bigint(20) unsigned NOT NULL auto_increment first,
ADD PRIMARY KEY (`id`),
ADD KEY `account_id` (`account_id`);

1 comment on commit fb8a752

@mazvi

This comment has been minimized.

Copy link
Contributor

mazvi commented on fb8a752 Jan 8, 2020

Hello sir i found the solution without id will work but we need re-import charlog using INSERT IGNORE no need id again.. iam sorry

#4519

Please sign in to comment.
You can’t perform that action at this time.