2.0.5.sql
4.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE `hi-sing`.`activity_links` DROP INDEX `key`;
ALTER TABLE `hi-sing`.`activity_links` ADD INDEX `activity`(`activity_id` DESC) USING BTREE;
ALTER TABLE `hi-sing`.`activity_links` ADD INDEX `type`(`type` ASC, `link_type` ASC, `link_id` ASC) USING BTREE;
ALTER TABLE `hi-sing`.`notification_users` ADD INDEX `user_id`(`user_id` ASC) USING BTREE;
ALTER TABLE `hi-sing`.`notification_users` ADD INDEX `notification_id`(`notification_id` ASC) USING BTREE;
ALTER TABLE `hi-sing`.`system_config` MODIFY COLUMN `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '内容' AFTER `identifier`;
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_messages` DROP INDEX `type`;
ALTER TABLE `hi-sing`.`user_messages` ADD INDEX `type`(`type` DESC, `is_read` ASC, `is_bind` ASC, `deleted_at` DESC) USING BTREE;
CREATE TABLE `hi-sing`.`user_tags` (
`id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`icon` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
`frame` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '{}',
`status` tinyint UNSIGNED NOT NULL DEFAULT 1,
`user_id` bigint UNSIGNED NOT NULL DEFAULT 0,
`created_at` datetime NULL DEFAULT NULL,
`updated_at` datetime NULL DEFAULT NULL,
`deleted_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`.`users` ADD COLUMN `demo_type` tinyint UNSIGNED NOT NULL DEFAULT 1 COMMENT '0:关闭,1:跟随字典配置' AFTER `expand`;
ALTER TABLE `hi-sing`.`users` ADD COLUMN `user_tag_id` bigint UNSIGNED NOT NULL DEFAULT 0 AFTER `demo_type`;
INSERT INTO `hi-sing`.`system_permissions` (`id`, `guard`, `parent_id`, `name`, `label`, `type`, `icon`, `weight`, `is_show_line`, `created_at`, `updated_at`, `deleted_at`) VALUES (251, 'Admin', 248, 'system-star-tag-delete', '删除', 'Button', '', 70, 0, '2024-03-14 10:45:38', '2024-03-14 10:45:38', NULL);
INSERT INTO `hi-sing`.`system_permissions` (`id`, `guard`, `parent_id`, `name`, `label`, `type`, `icon`, `weight`, `is_show_line`, `created_at`, `updated_at`, `deleted_at`) VALUES (250, 'Admin', 248, 'system-star-tag-edit', '编辑', 'Button', '', 80, 0, '2024-03-14 10:45:18', '2024-03-14 10:45:18', NULL);
INSERT INTO `hi-sing`.`system_permissions` (`id`, `guard`, `parent_id`, `name`, `label`, `type`, `icon`, `weight`, `is_show_line`, `created_at`, `updated_at`, `deleted_at`) VALUES (249, 'Admin', 248, 'system-star-tag-create', '创建', 'Button', '', 90, 0, '2024-03-14 10:43:55', '2024-03-14 10:43:55', NULL);
INSERT INTO `hi-sing`.`system_permissions` (`id`, `guard`, `parent_id`, `name`, `label`, `type`, `icon`, `weight`, `is_show_line`, `created_at`, `updated_at`, `deleted_at`) VALUES (248, 'Admin', 10, 'system-star-tag', '明星标签', 'Menu', '', 95, 1, '2024-03-13 11:08:58', '2024-03-13 11:08:58', NULL);
SET FOREIGN_KEY_CHECKS=1;