codingapi / codingapi/tx-lcn

当TX-LCN开启了日志配置之后, 数据库连接角色没有创建表权限, 启动报错

Open
#477 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
4.2k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

## Why you need it?
Is your feature request related to a problem? Please describe in details
希望在LogDbProperties 在这个类中添加一个checkout属性, 并且在MysqlLoggerHelper类中init()方法改变判断条件, 由我们自己决定是否开启创建表语句

## How it could be?
A clear and concise description of what you want to happen. You can explain more about input of the feature, and output of it.

## Other related information
Add any other context or screenshots about the feature request here.
@Override
public void init() {
if (logDbProperties.isCheckOut()) {
String sql = "CREATE TABLE IF NOT EXISTS `t_logger` (\n" +
" `id` bigint(20) NOT NULL AUTO_INCREMENT,\n" +
" `group_id` varchar(64) NOT NULL ,\n" +
" `unit_id` varchar(32) NOT NULL ,\n" +
" `tag` varchar(50) NOT NULL ,\n" +
" `content` varchar(1024) NOT NULL ,\n" +
" `create_time` varchar(30) NOT NULL,\n" +
" `app_name` varchar(128) NOT NULL,\n" +
" PRIMARY KEY (`id`) USING BTREE\n" +
") ";
dbHelper.update(sql);
}

}

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.