2.0.4.sql 4.63 KB
SET FOREIGN_KEY_CHECKS=0;

ALTER TABLE `hi-sing`.`activity_apply_records` ADD INDEX `activity`(`activity_id` ASC) USING BTREE;

ALTER TABLE `hi-sing`.`activitys` ADD COLUMN `u_top` int UNSIGNED NOT NULL DEFAULT 0 AFTER `p_is_top`;

ALTER TABLE `hi-sing`.`activitys` MODIFY COLUMN `created_form` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建来源:0:厂牌端 1:管理端 2:用户端' AFTER `created_at`;

ALTER TABLE `hi-sing`.`country_areas` ADD COLUMN `weight` smallint UNSIGNED NOT NULL DEFAULT 0 AFTER `name`;

ALTER TABLE `hi-sing`.`notifications` ADD INDEX `type`(`type` ASC, `status` ASC, `is_alert` DESC) USING BTREE;

ALTER TABLE `hi-sing`.`notifications` ADD INDEX `push`(`publish_type` ASC, `publish_at` ASC, `status` ASC) USING BTREE;

ALTER TABLE `hi-sing`.`system_http_logs` MODIFY COLUMN `guard` enum('Admin','Manage','App','Other','Web','User') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Other' AFTER `id`;

ALTER TABLE `hi-sing`.`system_operate_logs` MODIFY COLUMN `guard` enum('Admin','Manage','User') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Admin' AFTER `activity_id`;

ALTER TABLE `hi-sing`.`system_tags` ADD COLUMN `index_filter` tinyint UNSIGNED NOT NULL DEFAULT 1 COMMENT '首页筛选' AFTER `is_show`;

ALTER TABLE `hi-sing`.`system_tags` MODIFY COLUMN `is_show` tinyint UNSIGNED NOT NULL DEFAULT 1 COMMENT '是否显示' AFTER `user_id`;

ALTER TABLE `hi-sing`.`user_auth_infos` ADD INDEX `status`(`status` ASC) USING BTREE;

CREATE TABLE `hi-sing`.`user_composers`  (
                                             `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
                                             `type` enum('composer','arranger','lyricist') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'composer',
                                             `nick_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
                                             `area_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
                                             `phone` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
                                             `created_at` datetime NULL DEFAULT NULL,
                                             `updated_at` datetime NULL DEFAULT NULL,
                                             PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;

ALTER TABLE `hi-sing`.`user_has_tags` DROP INDEX `user`;

ALTER TABLE `hi-sing`.`user_has_tags` DROP INDEX `tag`;

ALTER TABLE `hi-sing`.`user_has_tags` ADD INDEX `user`(`user_id` ASC, `deleted_at` ASC) USING BTREE;

ALTER TABLE `hi-sing`.`user_has_tags` ADD INDEX `tag`(`tag_id` ASC, `deleted_at` ASC) USING BTREE;

ALTER TABLE `hi-sing`.`users` DROP INDEX `phone`;

ALTER TABLE `hi-sing`.`users` DROP INDEX `status`;

ALTER TABLE `hi-sing`.`users` ADD UNIQUE INDEX `phone`(`phone` ASC, `area_code` ASC, `deleted_at` ASC) USING BTREE;

ALTER TABLE `hi-sing`.`users` ADD INDEX `status`(`status` ASC, `audit_status` DESC, `deleted_at` ASC) USING BTREE;

INSERT INTO `hi-sing`.`system_config` (`id`, `creator_id`, `parent_id`, `name`, `identifier`, `content`, `expand`, `remark`, `status`, `weight`, `created_at`, `updated_at`, `deleted_at`) VALUES (182, 12, 179, '个人Demo操作视频', 'personal_demo_operate', 'https://hi-sing-cdn-dev.hikoon.com/file/20240229/te0zt6t0317091870735345wn25jky7ua.mp4', '{\"type\": \"video\"}', NULL, 1, 0, '2024-02-29 14:11:30', '2024-02-29 14:15:16', NULL);
INSERT INTO `hi-sing`.`system_config` (`id`, `creator_id`, `parent_id`, `name`, `identifier`, `content`, `expand`, `remark`, `status`, `weight`, `created_at`, `updated_at`, `deleted_at`) VALUES (181, 12, 179, 'Demo用户', 'n3HCbruqL_DemfX9MHj-K', '1,362,463,382', '{\"type\": \"input\"}', ',分割', 1, 0, '2024-02-19 17:20:55', '2024-02-23 15:27:40', NULL);
INSERT INTO `hi-sing`.`system_config` (`id`, `creator_id`, `parent_id`, `name`, `identifier`, `content`, `expand`, `remark`, `status`, `weight`, `created_at`, `updated_at`, `deleted_at`) VALUES (180, 12, 179, 'Demo标签', 'CtGly-jsLjAu5yJvLrN7L', '1,74', '{\"type\": \"input\"}', ',分割', 1, 0, '2024-02-19 17:20:38', '2024-02-26 16:35:00', NULL);
INSERT INTO `hi-sing`.`system_config` (`id`, `creator_id`, `parent_id`, `name`, `identifier`, `content`, `expand`, `remark`, `status`, `weight`, `created_at`, `updated_at`, `deleted_at`) VALUES (179, 12, 0, 'Demo权限', 'RhrcFyFGlcxb0z7NzDV14', '', '{\"type\": \"none\"}', NULL, 1, 0, '2024-02-19 17:20:15', '2024-02-19 17:20:15', NULL);

SET FOREIGN_KEY_CHECKS=1;