1.9.19.sql 2.82 KB
SET FOREIGN_KEY_CHECKS = 0;

ALTER TABLE `hi-sing`.`actions`
    DROP INDEX `created`;

ALTER TABLE `hi-sing`.`actions`
    ADD INDEX `create` (`created_at` DESC) USING BTREE;

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

CREATE TABLE `hi-sing`.`system_materials`
(
    `id`         bigint UNSIGNED                                               NOT NULL AUTO_INCREMENT,
    `type`       smallint UNSIGNED                                             NOT NULL DEFAULT 0 COMMENT '位置[1:用户主页背景 2:厂牌主页背景 3:音视频封面]',
    `weight`     tinyint UNSIGNED                                              NOT NULL DEFAULT 0 COMMENT '权重值',
    `url`        varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '地址',
    `expand`     json                                                          NOT NULL COMMENT '扩展属性',
    `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`.`system_permissions`
    DROP INDEX `name`;

ALTER TABLE `hi-sing`.`system_permissions`
    ADD COLUMN `is_show_line` tinyint UNSIGNED NOT NULL DEFAULT 0 AFTER `weight`;

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

ALTER TABLE `hi-sing`.`system_permissions`
    MODIFY COLUMN `name` varchar(160) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL AFTER `parent_id`;

ALTER TABLE `hi-sing`.`system_permissions`
    ADD UNIQUE INDEX `name` (`guard` ASC, `name` ASC, `deleted_at` ASC) USING BTREE;

ALTER TABLE `hi-sing`.`users`
    ADD COLUMN `is_super` tinyint UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否超级管理员' AFTER `created_at`;

ALTER TABLE `hi-sing`.`users`
    DROP PRIMARY KEY,
    ADD PRIMARY KEY (`id`) USING BTREE;

UPDATE `hi-sing`.`users`
SET `hi-sing`.`avatar` = 'https://hi-sing-cdn.hikoon.com/file/20231116/hgcjg84z66m17001020843530577lhs0hfwm.png'
WHERE `hi-sing`.`avatar` = 'https://hi-sing-cdn.hikoon.com/image/20230925/heqk7stlm31695620862622v3gdnlhzars.png';

UPDATE `hi-sing`.`users`
SET `cover` = 'https://hi-sing-cdn-dev.hikoon.com/file/20230426/9rwhiimko8a1682488070422huu8th1sctj.jpg'
WHERE `cover` = 'https://hi-sing-cdn.hikoon.com/file/20231116/vbhr3e6yk4l1700102812011wg18xstw9m.jpg';



SET FOREIGN_KEY_CHECKS = 1;