use `med`;

ALTER  TABLE  `kl_library_info`  drop  INDEX  NAME_TYPE_INDEX_UNIQUE;

ALTER TABLE `kl_library_info`
ADD COLUMN `name_en` varchar(255) COLLATE utf8_bin  NOT NULL DEFAULT '' COMMENT '加密name' AFTER `name`;

ALTER TABLE `kl_library_info`
ADD COLUMN `name_de` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '解密name_en' AFTER `name`;

ALTER TABLE `kl_library_info`
ADD COLUMN `spell_en` varchar(100) COLLATE utf8_general_ci  NOT NULL DEFAULT '' COMMENT '加密spell' AFTER `spell`;

ALTER TABLE `kl_library_info`
ADD COLUMN `spell_de` varchar(100) COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '解密spell_en' AFTER `spell`;

ALTER TABLE `kl_concept`
ADD COLUMN `lib_name_en` varchar(255) NOT NULL DEFAULT '' COMMENT '加密lib_name' AFTER `lib_name`;

ALTER TABLE `kl_concept`
ADD COLUMN `lib_name_de` varchar(255) NOT NULL DEFAULT '' COMMENT '解密lib_name_en' AFTER `lib_name`;

-- 删除临时添加字段
-- ALTER TABLE `kl_library_info` drop `name_en`;
-- ALTER TABLE `kl_library_info` drop `name_de`;
-- ALTER TABLE `kl_library_info` drop `spell_en`;
-- ALTER TABLE `kl_library_info` drop `spell_de`;
-- ALTER TABLE `kl_concept` drop `lib_name_en`;
-- ALTER TABLE `kl_concept` drop `lib_name_de`;
-- ALTER TABLE `kl_library_info` ADD UNIQUE INDEX  NAME_TYPE_INDEX_UNIQUE(`name`, `type_id`);

