feat: db配置调整

main
itao 1 year ago
parent c411b5facf
commit 1b6b490502

@ -5,7 +5,7 @@ spring:
name: luoo-tag #指定服务名
datasource:
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://8.134.98.47:3307/indie_music?characterEncoding=UTF8&useSSL=false
url: jdbc:mysql://8.134.98.47:3307/indie_tag?characterEncoding=UTF8&useSSL=false
username: root
password: 47084735abc
jpa:
@ -19,4 +19,8 @@ eureka:
service-url:
defaultZone: http://127.0.0.1:6868/eureka/
instance:
prefer-ip-address: true
prefer-ip-address: true
springdoc:
packages-to-scan: com.luoo.tag.controller
swagger-ui:
path: /api/doc

@ -0,0 +1,17 @@
-- 创建DB
create database if not exists `indie_tag` default charset utf8mb4 collate utf8mb4_general_ci;
use indie_tag;
-- 创建表
drop table if exists indie_tag.tb_tag;
create table indie_tag.tb_tag (
id bigint unsigned not null primary key auto_increment comment '主键',
parent bigint unsigned not null default 0 comment '父类主键(0表示一级标签)',
name_ch varchar(100) not null default '' comment '标签中文名称',
name_en varchar(100) not null default '' comment '标签英文名称',
status tinyint not null default 1 comment '状态(0=禁用,1=启用)',
creator_id int default 0 comment '创建人用户ID',
create_time datetime default current_timestamp comment '创建时间',
update_time datetime default current_timestamp on update current_timestamp comment '更新时间',
key idx_update_time(update_time),
key idx_parent(parent)
) character set utf8mb4 comment '标签表';
Loading…
Cancel
Save