Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dinky
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangpeng
dinky
Commits
8dc2431e
Unverified
Commit
8dc2431e
authored
Nov 09, 2023
by
ZackYoung
Committed by
GitHub
Nov 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix_h2_init (#2511)
parent
4cad347b
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
131 additions
and
83 deletions
+131
-83
WebExceptionHandler.java
...dmin/src/main/java/org/dinky/aop/WebExceptionHandler.java
+2
-4
AppConfig.java
dinky-admin/src/main/java/org/dinky/configure/AppConfig.java
+0
-31
DatabasePopulatorUtils.java
...ramework/jdbc/datasource/init/DatabasePopulatorUtils.java
+80
-0
application-h2.yml
dinky-admin/src/main/resources/application-h2.yml
+2
-1
db-h2-ddl.sql
dinky-admin/src/main/resources/db/db-h2-ddl.sql
+40
-40
UDFManageMapper.xml
dinky-admin/src/main/resources/mapper/UDFManageMapper.xml
+2
-2
DirConstant.java
...on/src/main/java/org/dinky/data/constant/DirConstant.java
+2
-2
VariableManager.java
...tor/src/main/java/org/dinky/executor/VariableManager.java
+1
-1
pom.xml
pom.xml
+2
-2
No files found.
dinky-admin/src/main/java/org/dinky/aop/WebExceptionHandler.java
View file @
8dc2431e
...
@@ -39,10 +39,9 @@ import org.springframework.validation.BindingResult;
...
@@ -39,10 +39,9 @@ import org.springframework.validation.BindingResult;
import
org.springframework.validation.FieldError
;
import
org.springframework.validation.FieldError
;
import
org.springframework.validation.ObjectError
;
import
org.springframework.validation.ObjectError
;
import
org.springframework.web.bind.MethodArgumentNotValidException
;
import
org.springframework.web.bind.MethodArgumentNotValidException
;
import
org.springframework.web.bind.annotation.ControllerAdvice
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseStatus
;
import
org.springframework.web.bind.annotation.ResponseStatus
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
...
@@ -55,8 +54,7 @@ import cn.hutool.core.util.StrUtil;
...
@@ -55,8 +54,7 @@ import cn.hutool.core.util.StrUtil;
*
*
* @since 2022/2/2 22:22
* @since 2022/2/2 22:22
*/
*/
@ControllerAdvice
@RestControllerAdvice
@ResponseBody
public
class
WebExceptionHandler
{
public
class
WebExceptionHandler
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
WebExceptionHandler
.
class
);
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
WebExceptionHandler
.
class
);
...
...
dinky-admin/src/main/java/org/dinky/configure/AppConfig.java
View file @
8dc2431e
...
@@ -72,37 +72,6 @@ public class AppConfig implements WebMvcConfigurer {
...
@@ -72,37 +72,6 @@ public class AppConfig implements WebMvcConfigurer {
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
public
void
addInterceptors
(
InterceptorRegistry
registry
)
{
registry
.
addInterceptor
(
localeChangeInterceptor
());
registry
.
addInterceptor
(
localeChangeInterceptor
());
// 注册Sa-Token的路由拦截器
// 注册Sa-Token的路由拦截器
// registry.addInterceptor(new SaInterceptor(handle -> {
// // 根据路由划分模块,不同模块不同鉴权
// SaRouter.match("/api/alertGroup/**", r ->
// StpUtil.checkPermission("alertGroup"));
// SaRouter.match("/api/alertHistory/**", r ->
// StpUtil.checkPermission("alertHistory"));
// SaRouter.match("/api/alertInstance/**", r ->
// StpUtil.checkPermission("alertInstance"));
// SaRouter.match("/api/catalogue/**", r ->
// StpUtil.checkPermission("catalogue"));
// SaRouter.match("/api/clusterConfiguration/**", r ->
// StpUtil.checkPermission("clusterConfiguration"));
// SaRouter.match("/api/cluster/**", r ->
// StpUtil.checkPermission("clusterInstance"));
// SaRouter.match("/api/database/**", r ->
// StpUtil.checkPermission("database"));
// SaRouter.match("/api/document/**", r ->
// StpUtil.checkPermission("document"));
// SaRouter.match("/api/fragment/**", r ->
// StpUtil.checkPermission("fragment"));
// SaRouter.match("/api/git/**", r -> StpUtil.checkPermission("git"));
// SaRouter.match("/api/history/**", r ->
// StpUtil.checkPermission("history"));
//
// }))
// .addPathPatterns("/api/**")
// .excludePathPatterns("/api/login")
// .excludePathPatterns("/druid/**")
// .excludePathPatterns("/openapi/**");
registry
.
addInterceptor
(
new
SaInterceptor
(
handler
->
StpUtil
.
checkLogin
()))
registry
.
addInterceptor
(
new
SaInterceptor
(
handler
->
StpUtil
.
checkLogin
()))
.
addPathPatterns
(
"/api/**"
)
.
addPathPatterns
(
"/api/**"
)
.
excludePathPatterns
(
.
excludePathPatterns
(
...
...
dinky-admin/src/main/java/org/springframework/jdbc/datasource/init/DatabasePopulatorUtils.java
0 → 100644
View file @
8dc2431e
/*
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package
org
.
springframework
.
jdbc
.
datasource
.
init
;
import
java.sql.Connection
;
import
javax.sql.DataSource
;
import
org.springframework.dao.DataAccessException
;
import
org.springframework.jdbc.datasource.DataSourceUtils
;
import
org.springframework.util.Assert
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.db.Db
;
/**
* Utility methods for executing a {@link DatabasePopulator}.
*
* @author Juergen Hoeller
* @author Oliver Gierke
* @author Sam Brannen
* @since 3.1
*/
public
abstract
class
DatabasePopulatorUtils
{
private
static
boolean
isInit
=
true
;
/**
* Execute the given {@link DatabasePopulator} against the given {@link DataSource}.
* <p>As of Spring Framework 5.3.11, the {@link Connection} for the supplied
* {@code DataSource} will be {@linkplain Connection#commit() committed} if
* it is not configured for {@link Connection#getAutoCommit() auto-commit} and
* is not {@linkplain DataSourceUtils#isConnectionTransactional transactional}.
*
* @param populator the {@code DatabasePopulator} to execute
* @param dataSource the {@code DataSource} to execute against
* @throws DataAccessException if an error occurs, specifically a {@link ScriptException}
* @see DataSourceUtils#isConnectionTransactional(Connection, DataSource)
*/
public
static
void
execute
(
DatabasePopulator
populator
,
DataSource
dataSource
)
throws
DataAccessException
{
Assert
.
notNull
(
populator
,
"DatabasePopulator must not be null"
);
Assert
.
notNull
(
dataSource
,
"DataSource must not be null"
);
try
{
// Override this method and do not run it if the table exists(重写此方法,如果有表存在,则不运行)
if
(
isInit
&&
CollUtil
.
isNotEmpty
(
Db
.
use
(
dataSource
).
query
(
"show tables"
)))
{
return
;
}
isInit
=
false
;
Connection
connection
=
DataSourceUtils
.
getConnection
(
dataSource
);
try
{
populator
.
populate
(
connection
);
if
(!
connection
.
getAutoCommit
()
&&
!
DataSourceUtils
.
isConnectionTransactional
(
connection
,
dataSource
))
{
connection
.
commit
();
}
}
finally
{
DataSourceUtils
.
releaseConnection
(
connection
,
dataSource
);
}
}
catch
(
ScriptException
ex
)
{
throw
ex
;
}
catch
(
Throwable
ex
)
{
throw
new
UncategorizedScriptException
(
"Failed to execute database script"
,
ex
);
}
}
}
dinky-admin/src/main/resources/application-h2.yml
View file @
8dc2431e
...
@@ -31,5 +31,5 @@ spring:
...
@@ -31,5 +31,5 @@ spring:
sql
:
sql
:
init
:
init
:
schema-locations
:
classpath:db/db-h2-ddl.sql
schema-locations
:
classpath:db/db-h2-ddl.sql
mode
:
always
data-locations
:
classpath:db/db-h2-dml.sql
data-locations
:
classpath:db/db-h2-dml.sql
mode
:
always
\ No newline at end of file
dinky-admin/src/main/resources/db/db-h2-ddl.sql
View file @
8dc2431e
SET
NAMES
utf8mb4
;
SET
NAMES
utf8mb4
;
SET
FOREIGN_KEY_CHECKS
=
0
;
SET
FOREIGN_KEY_CHECKS
=
0
;
DROP
TABLE
IF
EXISTS
`dinky_alert_group`
;
CREATE
TABLE
`dinky_alert_group`
(
CREATE
TABLE
`dinky_alert_group`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`name`
varchar
(
50
)
NOT
null
COMMENT
'alert group name'
,
`name`
varchar
(
50
)
NOT
null
COMMENT
'alert group name'
,
...
@@ -12,7 +12,7 @@ CREATE TABLE `dinky_alert_group` (
...
@@ -12,7 +12,7 @@ CREATE TABLE `dinky_alert_group` (
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_alert_history`
;
CREATE
TABLE
`dinky_alert_history`
(
CREATE
TABLE
`dinky_alert_history`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`tenant_id`
int
(
11
)
NOT
null
DEFAULT
1
COMMENT
'tenant id'
,
`tenant_id`
int
(
11
)
NOT
null
DEFAULT
1
COMMENT
'tenant id'
,
...
@@ -25,7 +25,7 @@ CREATE TABLE `dinky_alert_history` (
...
@@ -25,7 +25,7 @@ CREATE TABLE `dinky_alert_history` (
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_alert_instance`
;
CREATE
TABLE
`dinky_alert_instance`
(
CREATE
TABLE
`dinky_alert_instance`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`name`
varchar
(
50
)
NOT
null
COMMENT
'alert instance name'
,
`name`
varchar
(
50
)
NOT
null
COMMENT
'alert instance name'
,
...
@@ -36,7 +36,7 @@ CREATE TABLE `dinky_alert_instance` (
...
@@ -36,7 +36,7 @@ CREATE TABLE `dinky_alert_instance` (
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_catalogue`
;
CREATE
TABLE
`dinky_catalogue`
(
CREATE
TABLE
`dinky_catalogue`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`tenant_id`
int
(
11
)
NOT
null
DEFAULT
1
COMMENT
'tenant id'
,
`tenant_id`
int
(
11
)
NOT
null
DEFAULT
1
COMMENT
'tenant id'
,
...
@@ -49,7 +49,7 @@ CREATE TABLE `dinky_catalogue` (
...
@@ -49,7 +49,7 @@ CREATE TABLE `dinky_catalogue` (
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_cluster`
;
CREATE
TABLE
`dinky_cluster`
(
CREATE
TABLE
`dinky_cluster`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`tenant_id`
int
(
11
)
NOT
null
DEFAULT
1
COMMENT
'tenant id'
,
`tenant_id`
int
(
11
)
NOT
null
DEFAULT
1
COMMENT
'tenant id'
,
...
@@ -68,7 +68,7 @@ CREATE TABLE `dinky_cluster` (
...
@@ -68,7 +68,7 @@ CREATE TABLE `dinky_cluster` (
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_cluster_configuration`
;
CREATE
TABLE
`dinky_cluster_configuration`
(
CREATE
TABLE
`dinky_cluster_configuration`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`tenant_id`
int
(
11
)
NOT
null
DEFAULT
1
COMMENT
'tenant id'
,
`tenant_id`
int
(
11
)
NOT
null
DEFAULT
1
COMMENT
'tenant id'
,
...
@@ -81,7 +81,7 @@ CREATE TABLE `dinky_cluster_configuration` (
...
@@ -81,7 +81,7 @@ CREATE TABLE `dinky_cluster_configuration` (
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_database`
;
CREATE
TABLE
`dinky_database`
(
CREATE
TABLE
`dinky_database`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`tenant_id`
int
(
11
)
NOT
null
DEFAULT
1
COMMENT
'tenant id'
,
`tenant_id`
int
(
11
)
NOT
null
DEFAULT
1
COMMENT
'tenant id'
,
...
@@ -104,7 +104,7 @@ CREATE TABLE `dinky_database` (
...
@@ -104,7 +104,7 @@ CREATE TABLE `dinky_database` (
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_flink_document`
;
CREATE
TABLE
`dinky_flink_document`
(
CREATE
TABLE
`dinky_flink_document`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`category`
varchar
(
255
)
null
DEFAULT
null
COMMENT
'document category'
,
`category`
varchar
(
255
)
null
DEFAULT
null
COMMENT
'document category'
,
...
@@ -120,7 +120,7 @@ CREATE TABLE `dinky_flink_document` (
...
@@ -120,7 +120,7 @@ CREATE TABLE `dinky_flink_document` (
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update_time'
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update_time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_fragment`
;
CREATE
TABLE
`dinky_fragment`
(
CREATE
TABLE
`dinky_fragment`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`name`
varchar
(
50
)
NOT
null
COMMENT
'fragment name'
,
`name`
varchar
(
50
)
NOT
null
COMMENT
'fragment name'
,
...
@@ -131,7 +131,7 @@ CREATE TABLE `dinky_fragment` (
...
@@ -131,7 +131,7 @@ CREATE TABLE `dinky_fragment` (
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_history`
;
CREATE
TABLE
`dinky_history`
(
CREATE
TABLE
`dinky_history`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`tenant_id`
int
(
11
)
NOT
null
DEFAULT
1
COMMENT
'tenant id'
,
`tenant_id`
int
(
11
)
NOT
null
DEFAULT
1
COMMENT
'tenant id'
,
...
@@ -154,7 +154,7 @@ CREATE TABLE `dinky_history` (
...
@@ -154,7 +154,7 @@ CREATE TABLE `dinky_history` (
INDEX
cluster_index2
(
`cluster_id`
)
INDEX
cluster_index2
(
`cluster_id`
)
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_job_history`
;
CREATE
TABLE
`dinky_job_history`
(
CREATE
TABLE
`dinky_job_history`
(
`id`
int
(
11
)
NOT
null
COMMENT
'id'
,
`id`
int
(
11
)
NOT
null
COMMENT
'id'
,
`tenant_id`
int
(
11
)
NOT
null
DEFAULT
1
COMMENT
'tenant id'
,
`tenant_id`
int
(
11
)
NOT
null
DEFAULT
1
COMMENT
'tenant id'
,
...
@@ -167,7 +167,7 @@ CREATE TABLE `dinky_job_history` (
...
@@ -167,7 +167,7 @@ CREATE TABLE `dinky_job_history` (
`cluster_configuration_json`
json
null
COMMENT
'cluster config'
,
`cluster_configuration_json`
json
null
COMMENT
'cluster config'
,
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_job_instance`
;
CREATE
TABLE
`dinky_job_instance`
(
CREATE
TABLE
`dinky_job_instance`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`name`
varchar
(
255
)
null
DEFAULT
null
COMMENT
'job instance name'
,
`name`
varchar
(
255
)
null
DEFAULT
null
COMMENT
'job instance name'
,
...
@@ -187,7 +187,7 @@ CREATE TABLE `dinky_job_instance` (
...
@@ -187,7 +187,7 @@ CREATE TABLE `dinky_job_instance` (
INDEX
job_instance_task_id_idx13
(
`task_id`
)
INDEX
job_instance_task_id_idx13
(
`task_id`
)
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_role`
;
CREATE
TABLE
`dinky_role`
(
CREATE
TABLE
`dinky_role`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`tenant_id`
int
(
11
)
NOT
null
COMMENT
'tenant id'
,
`tenant_id`
int
(
11
)
NOT
null
COMMENT
'tenant id'
,
...
@@ -200,7 +200,7 @@ CREATE TABLE `dinky_role` (
...
@@ -200,7 +200,7 @@ CREATE TABLE `dinky_role` (
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_savepoints`
;
CREATE
TABLE
`dinky_savepoints`
(
CREATE
TABLE
`dinky_savepoints`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`task_id`
int
(
11
)
NOT
null
COMMENT
'task ID'
,
`task_id`
int
(
11
)
NOT
null
COMMENT
'task ID'
,
...
@@ -211,7 +211,7 @@ CREATE TABLE `dinky_savepoints` (
...
@@ -211,7 +211,7 @@ CREATE TABLE `dinky_savepoints` (
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_sys_config`
;
CREATE
TABLE
`dinky_sys_config`
(
CREATE
TABLE
`dinky_sys_config`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`name`
varchar
(
255
)
NOT
null
COMMENT
'configuration name'
,
`name`
varchar
(
255
)
NOT
null
COMMENT
'configuration name'
,
...
@@ -219,7 +219,7 @@ CREATE TABLE `dinky_sys_config` (
...
@@ -219,7 +219,7 @@ CREATE TABLE `dinky_sys_config` (
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_task`
;
CREATE
TABLE
`dinky_task`
(
CREATE
TABLE
`dinky_task`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`name`
varchar
(
255
)
NOT
null
COMMENT
'Job name'
,
`name`
varchar
(
255
)
NOT
null
COMMENT
'Job name'
,
...
@@ -249,7 +249,7 @@ CREATE TABLE `dinky_task` (
...
@@ -249,7 +249,7 @@ CREATE TABLE `dinky_task` (
`statement`
text
null
DEFAULT
null
COMMENT
'statement'
`statement`
text
null
DEFAULT
null
COMMENT
'statement'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_task_version`
;
CREATE
TABLE
`dinky_task_version`
(
CREATE
TABLE
`dinky_task_version`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`task_id`
int
(
11
)
NOT
null
COMMENT
'task ID '
,
`task_id`
int
(
11
)
NOT
null
COMMENT
'task ID '
,
...
@@ -262,7 +262,7 @@ CREATE TABLE `dinky_task_version` (
...
@@ -262,7 +262,7 @@ CREATE TABLE `dinky_task_version` (
`task_configure`
text
NOT
null
COMMENT
'task configuration'
,
`task_configure`
text
NOT
null
COMMENT
'task configuration'
,
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_tenant`
;
CREATE
TABLE
`dinky_tenant`
(
CREATE
TABLE
`dinky_tenant`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`tenant_code`
varchar
(
64
)
NOT
null
COMMENT
'tenant code'
,
`tenant_code`
varchar
(
64
)
NOT
null
COMMENT
'tenant code'
,
...
@@ -272,7 +272,7 @@ CREATE TABLE `dinky_tenant` (
...
@@ -272,7 +272,7 @@ CREATE TABLE `dinky_tenant` (
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_udf`
;
CREATE
TABLE
`dinky_udf`
(
CREATE
TABLE
`dinky_udf`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
,
`name`
varchar
(
200
)
null
DEFAULT
null
COMMENT
'udf name'
,
`name`
varchar
(
200
)
null
DEFAULT
null
COMMENT
'udf name'
,
...
@@ -292,7 +292,7 @@ CREATE TABLE `dinky_udf` (
...
@@ -292,7 +292,7 @@ CREATE TABLE `dinky_udf` (
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`create_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'create time'
,
`update_time`
datetime
DEFAULT
null
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'update time'
`update_time`
datetime
DEFAULT
null
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'update time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_udf_template`
;
CREATE
TABLE
`dinky_udf_template`
(
CREATE
TABLE
`dinky_udf_template`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
,
`name`
varchar
(
100
)
null
DEFAULT
null
COMMENT
'template name'
,
`name`
varchar
(
100
)
null
DEFAULT
null
COMMENT
'template name'
,
...
@@ -305,7 +305,7 @@ CREATE TABLE `dinky_udf_template` (
...
@@ -305,7 +305,7 @@ CREATE TABLE `dinky_udf_template` (
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_user`
;
CREATE
TABLE
`dinky_user`
(
CREATE
TABLE
`dinky_user`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`username`
varchar
(
50
)
NOT
null
COMMENT
'username'
,
`username`
varchar
(
50
)
NOT
null
COMMENT
'username'
,
...
@@ -322,7 +322,7 @@ CREATE TABLE `dinky_user` (
...
@@ -322,7 +322,7 @@ CREATE TABLE `dinky_user` (
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_user_role`
;
CREATE
TABLE
`dinky_user_role`
(
CREATE
TABLE
`dinky_user_role`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`user_id`
int
(
11
)
NOT
null
COMMENT
'user id'
,
`user_id`
int
(
11
)
NOT
null
COMMENT
'user id'
,
...
@@ -331,7 +331,7 @@ CREATE TABLE `dinky_user_role` (
...
@@ -331,7 +331,7 @@ CREATE TABLE `dinky_user_role` (
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`dinky_user_tenant`
;
CREATE
TABLE
`dinky_user_tenant`
(
CREATE
TABLE
`dinky_user_tenant`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'ID'
,
`user_id`
int
(
11
)
NOT
null
COMMENT
'user id'
,
`user_id`
int
(
11
)
NOT
null
COMMENT
'user id'
,
...
@@ -341,7 +341,7 @@ CREATE TABLE `dinky_user_tenant` (
...
@@ -341,7 +341,7 @@ CREATE TABLE `dinky_user_tenant` (
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`metadata_column`
;
CREATE
TABLE
`metadata_column`
(
CREATE
TABLE
`metadata_column`
(
`column_name`
varchar
(
255
)
NOT
null
COMMENT
'column name'
,
`column_name`
varchar
(
255
)
NOT
null
COMMENT
'column name'
,
`column_type`
varchar
(
255
)
NOT
null
COMMENT
'column type, such as : Physical , Metadata , Computed , WATERMARK'
,
`column_type`
varchar
(
255
)
NOT
null
COMMENT
'column type, such as : Physical , Metadata , Computed , WATERMARK'
,
...
@@ -353,7 +353,7 @@ CREATE TABLE `metadata_column` (
...
@@ -353,7 +353,7 @@ CREATE TABLE `metadata_column` (
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
,
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
,
`create_time`
datetime
(
0
)
NOT
null
DEFAULT
CURRENT_TIMESTAMP
(
0
)
COMMENT
'create time'
`create_time`
datetime
(
0
)
NOT
null
DEFAULT
CURRENT_TIMESTAMP
(
0
)
COMMENT
'create time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`metadata_database`
;
CREATE
TABLE
`metadata_database`
(
CREATE
TABLE
`metadata_database`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`database_name`
varchar
(
255
)
NOT
null
COMMENT
'database name'
,
`database_name`
varchar
(
255
)
NOT
null
COMMENT
'database name'
,
...
@@ -361,7 +361,7 @@ CREATE TABLE `metadata_database` (
...
@@ -361,7 +361,7 @@ CREATE TABLE `metadata_database` (
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
,
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
,
`create_time`
datetime
(
0
)
null
DEFAULT
CURRENT_TIMESTAMP
(
0
)
COMMENT
'create time'
`create_time`
datetime
(
0
)
null
DEFAULT
CURRENT_TIMESTAMP
(
0
)
COMMENT
'create time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`metadata_database_property`
;
CREATE
TABLE
`metadata_database_property`
(
CREATE
TABLE
`metadata_database_property`
(
`key`
varchar
(
255
)
NOT
null
COMMENT
'key'
,
`key`
varchar
(
255
)
NOT
null
COMMENT
'key'
,
`value`
varchar
(
255
)
null
DEFAULT
null
COMMENT
'value'
,
`value`
varchar
(
255
)
null
DEFAULT
null
COMMENT
'value'
,
...
@@ -369,7 +369,7 @@ CREATE TABLE `metadata_database_property` (
...
@@ -369,7 +369,7 @@ CREATE TABLE `metadata_database_property` (
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
,
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
,
`create_time`
datetime
(
0
)
NOT
null
DEFAULT
CURRENT_TIMESTAMP
(
0
)
COMMENT
'create time'
`create_time`
datetime
(
0
)
NOT
null
DEFAULT
CURRENT_TIMESTAMP
(
0
)
COMMENT
'create time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`metadata_function`
;
CREATE
TABLE
`metadata_function`
(
CREATE
TABLE
`metadata_function`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'主键'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'主键'
,
`function_name`
varchar
(
255
)
NOT
null
COMMENT
'function name'
,
`function_name`
varchar
(
255
)
NOT
null
COMMENT
'function name'
,
...
@@ -379,7 +379,7 @@ CREATE TABLE `metadata_function` (
...
@@ -379,7 +379,7 @@ CREATE TABLE `metadata_function` (
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
,
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
,
`create_time`
datetime
(
0
)
null
DEFAULT
CURRENT_TIMESTAMP
(
0
)
COMMENT
'create time'
`create_time`
datetime
(
0
)
null
DEFAULT
CURRENT_TIMESTAMP
(
0
)
COMMENT
'create time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`metadata_table`
;
CREATE
TABLE
`metadata_table`
(
CREATE
TABLE
`metadata_table`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'主键'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'主键'
,
`table_name`
varchar
(
255
)
NOT
null
COMMENT
'table name'
,
`table_name`
varchar
(
255
)
NOT
null
COMMENT
'table name'
,
...
@@ -389,7 +389,7 @@ CREATE TABLE `metadata_table` (
...
@@ -389,7 +389,7 @@ CREATE TABLE `metadata_table` (
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
,
`update_time`
datetime
(
0
)
null
DEFAULT
null
COMMENT
'update time'
,
`create_time`
datetime
(
0
)
null
DEFAULT
CURRENT_TIMESTAMP
(
0
)
COMMENT
'create time'
`create_time`
datetime
(
0
)
null
DEFAULT
CURRENT_TIMESTAMP
(
0
)
COMMENT
'create time'
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
)
ENGINE
=
InnoDB
ROW_FORMAT
=
Dynamic
;
DROP
TABLE
IF
EXISTS
`metadata_table_property`
;
CREATE
TABLE
`metadata_table_property`
(
CREATE
TABLE
`metadata_table_property`
(
`key`
varchar
(
255
)
NOT
null
COMMENT
'key'
,
`key`
varchar
(
255
)
NOT
null
COMMENT
'key'
,
`value`
mediumtext
null
COMMENT
'value'
,
`value`
mediumtext
null
COMMENT
'value'
,
...
@@ -403,7 +403,7 @@ CREATE TABLE `metadata_table_property` (
...
@@ -403,7 +403,7 @@ CREATE TABLE `metadata_table_property` (
-- ----------------------------
-- ----------------------------
-- Table structure for dinky_row_permissions
-- Table structure for dinky_row_permissions
-- ----------------------------
-- ----------------------------
DROP
TABLE
IF
EXISTS
`dinky_row_permissions`
;
CREATE
TABLE
dinky_row_permissions
(
CREATE
TABLE
dinky_row_permissions
(
id
int
PRIMARY
KEY
AUTO_INCREMENT
COMMENT
'ID'
,
id
int
PRIMARY
KEY
AUTO_INCREMENT
COMMENT
'ID'
,
role_id
int
NOT
null
COMMENT
'角色ID'
,
role_id
int
NOT
null
COMMENT
'角色ID'
,
...
@@ -413,7 +413,7 @@ CREATE TABLE dinky_row_permissions (
...
@@ -413,7 +413,7 @@ CREATE TABLE dinky_row_permissions (
update_time
datetime
null
COMMENT
'更新时间'
update_time
datetime
null
COMMENT
'更新时间'
);
);
SET
FOREIGN_KEY_CHECKS
=
1
;
SET
FOREIGN_KEY_CHECKS
=
1
;
DROP
TABLE
IF
EXISTS
`dinky_git_project`
;
CREATE
TABLE
`dinky_git_project`
(
CREATE
TABLE
`dinky_git_project`
(
`id`
bigint
(
20
)
NOT
null
AUTO_INCREMENT
,
`id`
bigint
(
20
)
NOT
null
AUTO_INCREMENT
,
`tenant_id`
bigint
(
20
)
NOT
null
,
`tenant_id`
bigint
(
20
)
NOT
null
,
...
@@ -438,7 +438,7 @@ CREATE TABLE `dinky_git_project` (
...
@@ -438,7 +438,7 @@ CREATE TABLE `dinky_git_project` (
`update_time`
datetime
NOT
null
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'update time'
`update_time`
datetime
NOT
null
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'update time'
)
ENGINE
=
InnoDB
;
)
ENGINE
=
InnoDB
;
DROP
TABLE
IF
EXISTS
dinky_metrics
;
CREATE
TABLE
`dinky_metrics`
(
CREATE
TABLE
`dinky_metrics`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
,
`task_id`
int
(
255
)
DEFAULT
null
,
`task_id`
int
(
255
)
DEFAULT
null
,
...
@@ -453,7 +453,7 @@ CREATE TABLE `dinky_metrics` (
...
@@ -453,7 +453,7 @@ CREATE TABLE `dinky_metrics` (
`update_time`
datetime
DEFAULT
null
`update_time`
datetime
DEFAULT
null
)
ENGINE
=
InnoDB
;
)
ENGINE
=
InnoDB
;
DROP
TABLE
IF
EXISTS
dinky_resources
;
CREATE
TABLE
`dinky_resources`
(
CREATE
TABLE
`dinky_resources`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'key'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'key'
,
`file_name`
varchar
(
64
)
DEFAULT
null
COMMENT
'file name'
,
`file_name`
varchar
(
64
)
DEFAULT
null
COMMENT
'file name'
,
...
@@ -472,7 +472,7 @@ CREATE TABLE `dinky_resources` (
...
@@ -472,7 +472,7 @@ CREATE TABLE `dinky_resources` (
-- ----------------------------
-- ----------------------------
-- Table structure for dinky_sys_login_log
-- Table structure for dinky_sys_login_log
-- ----------------------------
-- ----------------------------
DROP
TABLE
IF
EXISTS
dinky_sys_login_log
;
CREATE
TABLE
`dinky_sys_login_log`
(
CREATE
TABLE
`dinky_sys_login_log`
(
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'key'
,
`id`
int
(
11
)
NOT
null
AUTO_INCREMENT
COMMENT
'key'
,
`user_id`
int
(
11
)
NOT
null
COMMENT
'user id'
,
`user_id`
int
(
11
)
NOT
null
COMMENT
'user id'
,
...
@@ -492,7 +492,7 @@ CREATE TABLE `dinky_sys_login_log` (
...
@@ -492,7 +492,7 @@ CREATE TABLE `dinky_sys_login_log` (
-- ----------------------------
-- ----------------------------
-- Table structure for dinky_sys_operate_log
-- Table structure for dinky_sys_operate_log
-- ----------------------------
-- ----------------------------
DROP
TABLE
IF
EXISTS
`dinky_sys_operate_log`
;
CREATE
TABLE
`dinky_sys_operate_log`
(
CREATE
TABLE
`dinky_sys_operate_log`
(
`id`
bigint
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`id`
bigint
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`module_name`
varchar
(
50
)
DEFAULT
''
COMMENT
'module name'
,
`module_name`
varchar
(
50
)
DEFAULT
''
COMMENT
'module name'
,
...
@@ -517,7 +517,7 @@ CREATE TABLE `dinky_sys_operate_log` (
...
@@ -517,7 +517,7 @@ CREATE TABLE `dinky_sys_operate_log` (
-- ----------------------------
-- ----------------------------
-- Table structure for dinky_sys_menu
-- Table structure for dinky_sys_menu
-- ----------------------------
-- ----------------------------
drop
table
if
exists
`dinky_sys_menu`
;
create
table
`dinky_sys_menu`
(
create
table
`dinky_sys_menu`
(
`id`
bigint
not
null
auto_increment
comment
' id'
,
`id`
bigint
not
null
auto_increment
comment
' id'
,
`parent_id`
bigint
not
null
comment
'parent menu id'
,
`parent_id`
bigint
not
null
comment
'parent menu id'
,
...
@@ -538,7 +538,7 @@ create table `dinky_sys_menu` (
...
@@ -538,7 +538,7 @@ create table `dinky_sys_menu` (
-- ----------------------------
-- ----------------------------
-- Table structure dinky_sys_role_menu
-- Table structure dinky_sys_role_menu
-- ----------------------------
-- ----------------------------
drop
table
if
exists
`dinky_sys_role_menu`
;
CREATE
TABLE
`dinky_sys_role_menu`
(
CREATE
TABLE
`dinky_sys_role_menu`
(
`id`
bigint
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`id`
bigint
NOT
null
AUTO_INCREMENT
COMMENT
'id'
,
`role_id`
bigint
NOT
null
COMMENT
'role id'
,
`role_id`
bigint
NOT
null
COMMENT
'role id'
,
...
@@ -554,7 +554,7 @@ CREATE TABLE `dinky_sys_role_menu` (
...
@@ -554,7 +554,7 @@ CREATE TABLE `dinky_sys_role_menu` (
-- ----------------------------
-- ----------------------------
-- Table structure dinky_sys_token
-- Table structure dinky_sys_token
-- ----------------------------
-- ----------------------------
drop
table
if
exists
`dinky_sys_token`
;
CREATE
TABLE
`dinky_sys_token`
(
CREATE
TABLE
`dinky_sys_token`
(
`id`
bigint
NOT
NULL
AUTO_INCREMENT
COMMENT
'id'
,
`id`
bigint
NOT
NULL
AUTO_INCREMENT
COMMENT
'id'
,
`token_value`
varchar
(
255
)
NOT
NULL
COMMENT
'token value'
,
`token_value`
varchar
(
255
)
NOT
NULL
COMMENT
'token value'
,
...
@@ -576,7 +576,7 @@ CREATE TABLE `dinky_sys_token` (
...
@@ -576,7 +576,7 @@ CREATE TABLE `dinky_sys_token` (
-- ----------------------------
-- ----------------------------
-- Table structure dinky_sys_alert
-- Table structure dinky_sys_alert
-- ----------------------------
-- ----------------------------
drop
table
if
exists
`dinky_alert_template`
;
create
table
if
not
exists
dinky_alert_template
create
table
if
not
exists
dinky_alert_template
(
(
id
int
auto_increment
id
int
auto_increment
...
@@ -588,7 +588,7 @@ create table if not exists dinky_alert_template
...
@@ -588,7 +588,7 @@ create table if not exists dinky_alert_template
update_time
datetime
null
COMMENT
'update time'
update_time
datetime
null
COMMENT
'update time'
);
);
drop
table
if
exists
`dinky_alert_rules`
;
create
table
if
not
exists
dinky_alert_rules
create
table
if
not
exists
dinky_alert_rules
(
(
id
int
auto_increment
id
int
auto_increment
...
...
dinky-admin/src/main/resources/mapper/UDFManageMapper.xml
View file @
8dc2431e
...
@@ -21,10 +21,10 @@
...
@@ -21,10 +21,10 @@
<mapper
namespace=
"org.dinky.mapper.UDFManageMapper"
>
<mapper
namespace=
"org.dinky.mapper.UDFManageMapper"
>
<select
id=
"selectAll"
resultType=
"org.dinky.data.vo.UDFManageVO"
>
<select
id=
"selectAll"
resultType=
"org.dinky.data.vo.UDFManageVO"
>
select u.*,
"develop"
source,t.dialect,null file_name from
select u.*,
'develop'
source,t.dialect,null file_name from
dinky_udf_manage u LEFT JOIN dinky_task t on t.id=u.task_id WHERE resources_id is null
dinky_udf_manage u LEFT JOIN dinky_task t on t.id=u.task_id WHERE resources_id is null
union ALL
union ALL
select u.*,
"resources"
source,null dialect,t.full_name from
select u.*,
'resources'
source,null dialect,t.full_name from
dinky_udf_manage u LEFT JOIN dinky_resources t on t.id=u.resources_id WHERE u.task_id is null
dinky_udf_manage u LEFT JOIN dinky_resources t on t.id=u.resources_id WHERE u.task_id is null
</select>
</select>
</mapper>
</mapper>
dinky-common/src/main/java/org/dinky/data/constant/DirConstant.java
View file @
8dc2431e
...
@@ -21,7 +21,7 @@ package org.dinky.data.constant;
...
@@ -21,7 +21,7 @@ package org.dinky.data.constant;
import
java.io.File
;
import
java.io.File
;
import
cn.hutool.
core.io.File
Util
;
import
cn.hutool.
system.System
Util
;
/**
/**
* DirConstant
* DirConstant
...
@@ -31,7 +31,7 @@ import cn.hutool.core.io.FileUtil;
...
@@ -31,7 +31,7 @@ import cn.hutool.core.io.FileUtil;
public
class
DirConstant
{
public
class
DirConstant
{
public
static
final
String
FILE_SEPARATOR
=
File
.
separator
;
public
static
final
String
FILE_SEPARATOR
=
File
.
separator
;
public
static
final
String
ROOT_PATH
=
FileUtil
.
getUserHomeDir
().
getAbsolutePath
(
);
public
static
final
String
ROOT_PATH
=
System
.
getProperty
(
SystemUtil
.
USER_DIR
);
public
static
final
String
LOG_DIR_PATH
=
ROOT_PATH
+
FILE_SEPARATOR
+
"logs"
;
public
static
final
String
LOG_DIR_PATH
=
ROOT_PATH
+
FILE_SEPARATOR
+
"logs"
;
public
static
final
String
ROOT_LOG_PATH
=
LOG_DIR_PATH
+
FILE_SEPARATOR
+
"dinky.log"
;
public
static
final
String
ROOT_LOG_PATH
=
LOG_DIR_PATH
+
FILE_SEPARATOR
+
"dinky.log"
;
}
}
dinky-executor/src/main/java/org/dinky/executor/VariableManager.java
View file @
8dc2431e
...
@@ -146,7 +146,7 @@ public final class VariableManager {
...
@@ -146,7 +146,7 @@ public final class VariableManager {
return
variables
.
get
(
variableName
);
return
variables
.
get
(
variableName
);
}
}
// use jexl to parse variable value
// use jexl to parse variable value
return
ENGINE
.
eval
(
variableName
,
ENGINE_CONTEXT
);
return
ENGINE
.
eval
(
variableName
,
ENGINE_CONTEXT
,
null
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
CatalogException
(
format
(
"The variable of sql %s does not exist."
,
variableName
));
throw
new
CatalogException
(
format
(
"The variable of sql %s does not exist."
,
variableName
));
}
}
...
...
pom.xml
View file @
8dc2431e
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
<hamcrest.version>
1.3
</hamcrest.version>
<hamcrest.version>
1.3
</hamcrest.version>
<hibernate-validator.version>
6.2.0.Final
</hibernate-validator.version>
<hibernate-validator.version>
6.2.0.Final
</hibernate-validator.version>
<httpclient.version>
4.5.13
</httpclient.version>
<httpclient.version>
4.5.13
</httpclient.version>
<hutool.version>
5.8.
11
</hutool.version>
<hutool.version>
5.8.
22
</hutool.version>
<jackson.version>
2.14.1
</jackson.version>
<jackson.version>
2.14.1
</jackson.version>
<jakarta.ws.rs-api.version>
2.1.6
</jakarta.ws.rs-api.version>
<jakarta.ws.rs-api.version>
2.1.6
</jakarta.ws.rs-api.version>
<jasypt.version>
1.9.3
</jasypt.version>
<jasypt.version>
1.9.3
</jasypt.version>
...
@@ -108,7 +108,7 @@
...
@@ -108,7 +108,7 @@
<protobuf-java.version>
2.5.0
</protobuf-java.version>
<protobuf-java.version>
2.5.0
</protobuf-java.version>
<reflections.version>
0.10.2
</reflections.version>
<reflections.version>
0.10.2
</reflections.version>
<revision>
1.0.0-SNAPSHOT
</revision>
<revision>
1.0.0-SNAPSHOT
</revision>
<sa-token.version>
1.3
6
.0
</sa-token.version>
<sa-token.version>
1.3
7
.0
</sa-token.version>
<scala.binary.version>
2.12
</scala.binary.version>
<scala.binary.version>
2.12
</scala.binary.version>
<scala.version>
2.12.10
</scala.version>
<scala.version>
2.12.10
</scala.version>
<!-- `provided` for product environment ,`compile` for dev environment -->
<!-- `provided` for product environment ,`compile` for dev environment -->
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment