Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
woodwhales committed Aug 25, 2024
1 parent bab9a8a commit 5926ac5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ docker run -d \
--name woodwhales-music \
-p 8084:8084 \
-e "MYSQL_HOST=host.docker.internal" \
-e "MYSQL_DATABASE=open-music" \
-e "MYSQL_DATABASE=open_music" \
-e "MYSQL_PORT=3306" \
-e "MYSQL_USER=root" \
-e "MYSQL_PASSWORD=root1234" \
Expand All @@ -326,10 +326,10 @@ woodwhales/woodwhales-music:latest

环境命令参数说明:

| 环境参数 | 说明 | 默认值 |
| -------------------- | ------------------------------------------------------------ | -------------------- |
| 环境参数 | 说明 | 默认值 |
| -------------------- | ------------------------------------------------------------ |----------------------|
| MYSQL_HOST | mysql 数据库服务的链接地址,默认值针对 windows、mac 系统生效,linux 系统需要用户强制指定宿主机 IP | host.docker.internal |
| MYSQL_DATABASE | 数据库名称 | open-music |
| MYSQL_DATABASE | 数据库名称 | open_music |
| MYSQL_PORT | mysql 数据库服务的端口号 | 3306 |
| MYSQL_USER | mysql 数据库服务的账号名称 | root |
| MYSQL_PASSWORD | mysql 数据库服务的账号密码 | root1234 |
Expand Down
23 changes: 23 additions & 0 deletions src/main/resources/init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,26 @@ CREATE TABLE IF NOT EXISTS `sys_user` (
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `username` (`username`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户表';

-- 导出 表 open_music.music_tag 结构
CREATE TABLE IF NOT EXISTS `music_tag` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '音乐表主键',
`music_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT 'music_info 表id',
`tag_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT 'tag_info 表id',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除,0-已启用,1-已停用,2-已删除',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
KEY `music_info_id` (`music_id`) USING BTREE,
KEY `tag_info_id` (`tag_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='音乐标签表';

-- 导出 表 open_music.tag_info 结构
CREATE TABLE IF NOT EXISTS `tag_info` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
`status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除,0-已启用,1-已停用,2-已删除',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`name` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '标签名称',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='标签表';

0 comments on commit 5926ac5

Please sign in to comment.