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
81689c18
Unverified
Commit
81689c18
authored
Feb 27, 2024
by
Zzm0809
Committed by
GitHub
Feb 27, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Featue] support resource file copy path (#3188)
Co-authored-by:
Zzm0809
<
Zzm0809@users.noreply.github.com
>
parent
4ffb9336
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
82 additions
and
63 deletions
+82
-63
db-h2-ddl.sql
dinky-admin/src/main/resources/db/db-h2-ddl.sql
+1
-1
pages.ts
dinky-web/src/locales/en-US/pages.ts
+2
-0
pages.ts
dinky-web/src/locales/zh-CN/pages.ts
+1
-0
function.tsx
...pages/RegCenter/Resource/components/FileTree/function.tsx
+20
-6
index.tsx
...rc/pages/RegCenter/Resource/components/FileTree/index.tsx
+1
-1
index.tsx
.../RegCenter/Resource/components/ResourceOverView/index.tsx
+4
-4
dinky-mysql.sql
script/sql/dinky-mysql.sql
+12
-12
dinky-pg.sql
script/sql/dinky-pg.sql
+1
-1
dinky_ddl.sql
script/sql/upgrade/1.0.0_schema/mysql/dinky_ddl.sql
+40
-38
No files found.
dinky-admin/src/main/resources/db/db-h2-ddl.sql
View file @
81689c18
...
@@ -469,7 +469,7 @@ CREATE TABLE `dinky_resources` (
...
@@ -469,7 +469,7 @@ CREATE TABLE `dinky_resources` (
`type`
tinyint
(
4
)
DEFAULT
null
COMMENT
'resource type,0:FILE,1:UDF'
,
`type`
tinyint
(
4
)
DEFAULT
null
COMMENT
'resource type,0:FILE,1:UDF'
,
`size`
bigint
(
20
)
DEFAULT
null
COMMENT
'resource size'
,
`size`
bigint
(
20
)
DEFAULT
null
COMMENT
'resource size'
,
`pid`
int
(
11
)
DEFAULT
null
,
`pid`
int
(
11
)
DEFAULT
null
,
`full_name`
varchar
(
128
)
DEFAULT
null
,
`full_name`
text
DEFAULT
null
,
`is_directory`
tinyint
(
4
)
DEFAULT
null
,
`is_directory`
tinyint
(
4
)
DEFAULT
null
,
`create_time`
datetime
NOT
null
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'create time'
,
`create_time`
datetime
NOT
null
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'create time'
,
`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'
,
...
...
dinky-web/src/locales/en-US/pages.ts
View file @
81689c18
...
@@ -975,6 +975,8 @@ export default {
...
@@ -975,6 +975,8 @@ export default {
'Support for a single or bulk upload. Strictly prohibited from uploading company data or
\
n other banned files.'
,
'Support for a single or bulk upload. Strictly prohibited from uploading company data or
\
n other banned files.'
,
'rc.resource.filelist'
:
'File list'
,
'rc.resource.filelist'
:
'File list'
,
'rc.resource.sync'
:
'Sync remote files'
,
'rc.resource.sync'
:
'Sync remote files'
,
'rc.resource.copy'
:
'Copy as: {fillValue}'
,
'rc.template.codeType'
:
'Code Type'
,
'rc.template.codeType'
:
'Code Type'
,
'rc.template.codeTypePlaceholder'
:
'Please select code type! '
,
'rc.template.codeTypePlaceholder'
:
'Please select code type! '
,
'rc.template.create'
:
'Create UDF Template'
,
'rc.template.create'
:
'Create UDF Template'
,
...
...
dinky-web/src/locales/zh-CN/pages.ts
View file @
81689c18
...
@@ -934,6 +934,7 @@ export default {
...
@@ -934,6 +934,7 @@ export default {
'rc.resource.upload.tip2'
:
'支持单个或批量上传。严禁上传公司数据或其他禁止上传的文件。'
,
'rc.resource.upload.tip2'
:
'支持单个或批量上传。严禁上传公司数据或其他禁止上传的文件。'
,
'rc.resource.filelist'
:
'文件列表'
,
'rc.resource.filelist'
:
'文件列表'
,
'rc.resource.sync'
:
'同步目录结构'
,
'rc.resource.sync'
:
'同步目录结构'
,
'rc.resource.copy'
:
'复制为: {fillValue}'
,
'rc.template.codeType'
:
'代码类型'
,
'rc.template.codeType'
:
'代码类型'
,
'rc.template.codeTypePlaceholder'
:
'请选择代码类型!'
,
'rc.template.codeTypePlaceholder'
:
'请选择代码类型!'
,
...
...
dinky-web/src/pages/RegCenter/Resource/components/FileTree/function.tsx
View file @
81689c18
...
@@ -21,11 +21,22 @@ import { TagAlignCenter } from '@/components/StyledComponents';
...
@@ -21,11 +21,22 @@ import { TagAlignCenter } from '@/components/StyledComponents';
import
{
ResourceInfo
}
from
'@/types/RegCenter/data'
;
import
{
ResourceInfo
}
from
'@/types/RegCenter/data'
;
import
{
parseByteStr
,
renderIcon
}
from
'@/utils/function'
;
import
{
parseByteStr
,
renderIcon
}
from
'@/utils/function'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
l
}
from
'@/utils/intl'
;
import
{
Typography
}
from
'antd'
;
const
buildTitleLabel
=
(
showCopy
=
false
,
item
:
ResourceInfo
)
=>
{
const
fillValue
=
`ADD FILE 'rs:
${
item
.
fullName
}
';`
;
const
buildTitleLabel
=
(
item
:
ResourceInfo
)
=>
{
return
(
return
(
<>
<>
{
!
item
.
isDirectory
&&
showCopy
?
(
<
Typography
.
Text
copyable=
{
{
text
:
fillValue
,
tooltips
:
l
(
'rc.resource.copy'
,
''
,
{
fillValue
})
}
}
>
{
item
.
fileName
}
{
item
.
fileName
}
</
Typography
.
Text
>
)
:
(
item
.
fileName
)
}
{
!
item
.
isDirectory
&&
(
{
!
item
.
isDirectory
&&
(
<
span
style=
{
{
color
:
'gray'
}
}
>
<
span
style=
{
{
color
:
'gray'
}
}
>
{
' '
}
{
' '
}
...
@@ -79,9 +90,10 @@ function filterEmpty(
...
@@ -79,9 +90,10 @@ function filterEmpty(
}
}
export
const
buildResourceTreeData
=
(
export
const
buildResourceTreeData
=
(
data
:
ResourceInfo
[],
data
:
ResourceInfo
[]
=
[]
,
isFilterEmptyChildren
=
false
,
isFilterEmptyChildren
=
false
,
filterSuffixList
:
string
[]
=
[]
filterSuffixList
:
string
[]
=
[],
showCopy
:
boolean
=
false
):
any
=>
):
any
=>
data
data
.
filter
((
item
:
ResourceInfo
)
=>
filterEmpty
(
isFilterEmptyChildren
,
item
,
filterSuffixList
))
.
filter
((
item
:
ResourceInfo
)
=>
filterEmpty
(
isFilterEmptyChildren
,
item
,
filterSuffixList
))
...
@@ -90,13 +102,15 @@ export const buildResourceTreeData = (
...
@@ -90,13 +102,15 @@ export const buildResourceTreeData = (
isLeaf
:
!
item
.
isDirectory
,
isLeaf
:
!
item
.
isDirectory
,
name
:
item
.
fileName
,
name
:
item
.
fileName
,
parentId
:
item
.
pid
,
parentId
:
item
.
pid
,
label
:
item
.
f
ullName
+
'/'
+
item
.
f
ileName
,
label
:
item
.
fileName
,
icon
:
<
TagAlignCenter
>
{
renderIcon
(
item
.
fileName
,
'.'
,
item
.
isDirectory
)
}
</
TagAlignCenter
>,
icon
:
<
TagAlignCenter
>
{
renderIcon
(
item
.
fileName
,
'.'
,
item
.
isDirectory
)
}
</
TagAlignCenter
>,
path
:
item
.
fullName
,
path
:
item
.
fullName
,
title
:
buildTitleLabel
(
item
),
title
:
buildTitleLabel
(
showCopy
,
item
),
fullInfo
:
item
,
fullInfo
:
item
,
key
:
item
.
id
,
key
:
item
.
id
,
id
:
item
.
id
,
id
:
item
.
id
,
children
:
item
.
children
&&
buildResourceTreeData
(
item
.
children
,
isFilterEmptyChildren
)
children
:
item
.
children
&&
buildResourceTreeData
(
item
.
children
,
isFilterEmptyChildren
,
filterSuffixList
,
showCopy
)
};
};
});
});
dinky-web/src/pages/RegCenter/Resource/components/FileTree/index.tsx
View file @
81689c18
...
@@ -50,7 +50,7 @@ const FileTree: React.FC<FileTreeProps> = (props) => {
...
@@ -50,7 +50,7 @@ const FileTree: React.FC<FileTreeProps> = (props) => {
selectedKeys=
{
selectedKeys
}
selectedKeys=
{
selectedKeys
}
onSelect=
{
(
_
,
info
)
=>
onNodeClick
(
info
)
}
onSelect=
{
(
_
,
info
)
=>
onNodeClick
(
info
)
}
onRightClick=
{
(
info
)
=>
onRightClick
(
info
)
}
onRightClick=
{
(
info
)
=>
onRightClick
(
info
)
}
treeData=
{
buildResourceTreeData
(
treeData
)
}
treeData=
{
buildResourceTreeData
(
treeData
,
false
,
[],
true
)
}
/>
/>
)
:
(
)
:
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
...
...
dinky-web/src/pages/RegCenter/Resource/components/ResourceOverView/index.tsx
View file @
81689c18
...
@@ -248,15 +248,15 @@ const ResourceOverView: React.FC = () => {
...
@@ -248,15 +248,15 @@ const ResourceOverView: React.FC = () => {
<
ProCard
ghost
size=
{
'small'
}
bodyStyle=
{
{
height
:
parent
.
innerHeight
-
80
}
}
>
<
ProCard
ghost
size=
{
'small'
}
bodyStyle=
{
{
height
:
parent
.
innerHeight
-
80
}
}
>
<
SplitPane
<
SplitPane
split=
{
'vertical'
}
split=
{
'vertical'
}
defaultSizes=
{
[
15
0
,
500
]
}
defaultSizes=
{
[
20
0
,
500
]
}
minSize=
{
15
0
}
minSize=
{
20
0
}
className=
{
'split-pane'
}
className=
{
'split-pane'
}
>
>
<
Pane
<
Pane
className=
{
'split-pane'
}
className=
{
'split-pane'
}
forwardRef=
{
refObject
}
forwardRef=
{
refObject
}
minSize=
{
1
00
}
minSize=
{
2
00
}
size=
{
1
00
}
size=
{
2
00
}
split=
{
'horizontal'
}
split=
{
'horizontal'
}
>
>
<
ProCard
<
ProCard
...
...
script/sql/dinky-mysql.sql
View file @
81689c18
...
@@ -1651,7 +1651,7 @@ CREATE TABLE `dinky_git_project` (
...
@@ -1651,7 +1651,7 @@ CREATE TABLE `dinky_git_project` (
`operator`
int
(
11
)
DEFAULT
NULL
COMMENT
'operator'
,
`operator`
int
(
11
)
DEFAULT
NULL
COMMENT
'operator'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
KEY
`tenant_id`
(
`tenant_id`
)
USING
BTREE
KEY
`tenant_id`
(
`tenant_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
3
DEFAULT
CHARSET
=
utf8mb4
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
3
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
COMMENT
=
'git project'
ROW_FORMAT
=
DYNAMIC
;
-- ----------------------------
-- ----------------------------
-- Records of dinky_git_project
-- Records of dinky_git_project
...
@@ -1678,7 +1678,7 @@ CREATE TABLE `dinky_metrics` (
...
@@ -1678,7 +1678,7 @@ CREATE TABLE `dinky_metrics` (
`create_time`
datetime
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'create time'
,
`create_time`
datetime
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'create time'
,
`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'
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'metrics layout'
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
CO
LLATE
=
utf8mb4_general_ci
CO
MMENT
=
'metrics layout'
;
-- ----------------------------
-- ----------------------------
-- Table structure for dinky_resources
-- Table structure for dinky_resources
...
@@ -1686,13 +1686,13 @@ CREATE TABLE `dinky_metrics` (
...
@@ -1686,13 +1686,13 @@ CREATE TABLE `dinky_metrics` (
DROP
TABLE
IF
EXISTS
dinky_resources
;
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
)
COLLATE
utf8
_bin
DEFAULT
NULL
COMMENT
'file name'
,
`file_name`
varchar
(
64
)
COLLATE
utf8
mb4_general_ci
DEFAULT
NULL
COMMENT
'file name'
,
`description`
varchar
(
255
)
COLLATE
utf8
_bin
DEFAULT
NULL
,
`description`
varchar
(
255
)
COLLATE
utf8
mb4_general_ci
DEFAULT
NULL
,
`user_id`
int
(
11
)
DEFAULT
NULL
COMMENT
'user id'
,
`user_id`
int
(
11
)
DEFAULT
NULL
COMMENT
'user id'
,
`type`
tinyint
(
4
)
DEFAULT
NULL
COMMENT
'resource type,0:FILE,1:UDF'
,
`type`
tinyint
(
4
)
DEFAULT
NULL
COMMENT
'resource type,0:FILE,1:UDF'
,
`size`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'resource size'
,
`size`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'resource size'
,
`pid`
int
(
11
)
DEFAULT
NULL
,
`pid`
int
(
11
)
DEFAULT
NULL
,
`full_name`
varchar
(
128
)
COLLATE
utf8_bin
DEFAULT
NULL
,
`full_name`
text
COLLATE
utf8mb4_general_ci
DEFAULT
NULL
,
`is_directory`
tinyint
(
4
)
DEFAULT
NULL
,
`is_directory`
tinyint
(
4
)
DEFAULT
NULL
,
`create_time`
datetime
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'create time'
,
`create_time`
datetime
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'create time'
,
`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'
,
...
@@ -1700,7 +1700,7 @@ CREATE TABLE `dinky_resources` (
...
@@ -1700,7 +1700,7 @@ CREATE TABLE `dinky_resources` (
`updater`
int
(
11
)
DEFAULT
NULL
COMMENT
'updater'
,
`updater`
int
(
11
)
DEFAULT
NULL
COMMENT
'updater'
,
PRIMARY
KEY
(
`id`
),
PRIMARY
KEY
(
`id`
),
UNIQUE
KEY
`dinky_resources_un`
(
`full_name`
,
`type`
)
UNIQUE
KEY
`dinky_resources_un`
(
`full_name`
,
`type`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_bin
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8
mb4
COLLATE
=
utf8mb4_general_ci
;
-- ----------------------------
-- ----------------------------
-- Records of dinky_resources
-- Records of dinky_resources
-- ----------------------------
-- ----------------------------
...
@@ -1770,7 +1770,7 @@ create table `dinky_sys_menu` (
...
@@ -1770,7 +1770,7 @@ create table `dinky_sys_menu` (
`update_time`
datetime
not
null
default
current_timestamp
on
update
current_timestamp
comment
'modify time'
,
`update_time`
datetime
not
null
default
current_timestamp
on
update
current_timestamp
comment
'modify time'
,
`note`
varchar
(
255
)
COLLATE
utf8mb4_general_ci
DEFAULT
NULL
,
`note`
varchar
(
255
)
COLLATE
utf8mb4_general_ci
DEFAULT
NULL
,
primary
key
(
`id`
)
using
btree
primary
key
(
`id`
)
using
btree
)
engine
=
innodb
auto_increment
=
1
default
charset
=
utf8mb4
collate
=
utf8mb4_general_ci
;
)
engine
=
innodb
auto_increment
=
1
default
charset
=
utf8mb4
collate
=
utf8mb4_general_ci
comment
=
'system menu'
row_format
=
dynamic
;
-- ----------------------------
-- ----------------------------
-- Records of dinky_sys_menu
-- Records of dinky_sys_menu
...
@@ -1942,7 +1942,7 @@ CREATE TABLE `dinky_sys_role_menu` (
...
@@ -1942,7 +1942,7 @@ CREATE TABLE `dinky_sys_role_menu` (
`update_time`
datetime
not
null
default
current_timestamp
on
update
current_timestamp
comment
'modify time'
,
`update_time`
datetime
not
null
default
current_timestamp
on
update
current_timestamp
comment
'modify time'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
UNIQUE
KEY
`un_role_menu_inx`
(
`role_id`
,
`menu_id`
)
USING
BTREE
UNIQUE
KEY
`un_role_menu_inx`
(
`role_id`
,
`menu_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'role menu'
;
-- ----------------------------
-- ----------------------------
-- Table structure dinky_sys_alert
-- Table structure dinky_sys_alert
...
@@ -1958,7 +1958,7 @@ CREATE TABLE `dinky_alert_template` (
...
@@ -1958,7 +1958,7 @@ CREATE TABLE `dinky_alert_template` (
`creator`
int
(
11
)
DEFAULT
NULL
COMMENT
'create user id'
,
`creator`
int
(
11
)
DEFAULT
NULL
COMMENT
'create user id'
,
`updater`
int
(
11
)
DEFAULT
NULL
COMMENT
'update user id'
,
`updater`
int
(
11
)
DEFAULT
NULL
COMMENT
'update user id'
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'alert template'
;
...
@@ -1978,7 +1978,7 @@ CREATE TABLE `dinky_alert_rules` (
...
@@ -1978,7 +1978,7 @@ CREATE TABLE `dinky_alert_rules` (
`updater`
int
(
11
)
DEFAULT
NULL
COMMENT
'update user id'
,
`updater`
int
(
11
)
DEFAULT
NULL
COMMENT
'update user id'
,
PRIMARY
KEY
(
`id`
),
PRIMARY
KEY
(
`id`
),
UNIQUE
KEY
`name`
(
`name`
)
UNIQUE
KEY
`name`
(
`name`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'alert rule'
;
...
@@ -2020,7 +2020,7 @@ CREATE TABLE `dinky_udf_manage` (
...
@@ -2020,7 +2020,7 @@ CREATE TABLE `dinky_udf_manage` (
`updater`
int
(
11
)
DEFAULT
NULL
COMMENT
'update user id'
,
`updater`
int
(
11
)
DEFAULT
NULL
COMMENT
'update user id'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
KEY
`name,resources_id`
(
`name`
,
`resources_id`
)
USING
BTREE
KEY
`name,resources_id`
(
`name`
,
`resources_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
3
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'udf'
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
3
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'udf'
;
-- ----------------------------
-- ----------------------------
-- Table structure dinky_sys_token
-- Table structure dinky_sys_token
...
@@ -2043,6 +2043,6 @@ CREATE TABLE `dinky_sys_token` (
...
@@ -2043,6 +2043,6 @@ CREATE TABLE `dinky_sys_token` (
PRIMARY
KEY
(
`id`
),
PRIMARY
KEY
(
`id`
),
UNIQUE
KEY
`token_value`
(
`token_value`
)
USING
BTREE
,
UNIQUE
KEY
`token_value`
(
`token_value`
)
USING
BTREE
,
KEY
`source`
(
`source`
)
USING
HASH
KEY
`source`
(
`source`
)
USING
HASH
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
22
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'token management'
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
DYNAMIC
collate
=
utf8mb4_general_ci
COMMENT
=
'token management'
;
SET
FOREIGN_KEY_CHECKS
=
1
;
SET
FOREIGN_KEY_CHECKS
=
1
;
script/sql/dinky-pg.sql
View file @
81689c18
...
@@ -3418,7 +3418,7 @@ CREATE TABLE "public"."dinky_resources"
...
@@ -3418,7 +3418,7 @@ CREATE TABLE "public"."dinky_resources"
"type"
int2
,
"type"
int2
,
"size"
int8
,
"size"
int8
,
"pid"
int4
,
"pid"
int4
,
"full_name"
varchar
(
128
)
COLLATE
"pg_catalog"
.
"default"
,
"full_name"
text
COLLATE
"pg_catalog"
.
"default"
,
"is_directory"
int2
,
"is_directory"
int2
,
"create_time"
timestamp
(
6
)
NOT
null
,
"create_time"
timestamp
(
6
)
NOT
null
,
"update_time"
timestamp
(
6
)
NOT
null
,
"update_time"
timestamp
(
6
)
NOT
null
,
...
...
script/sql/upgrade/1.0.0_schema/mysql/dinky_ddl.sql
View file @
81689c18
...
@@ -106,7 +106,7 @@ CREATE TABLE `dinky_git_project` (
...
@@ -106,7 +106,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'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
,
KEY
`tenant_id`
(
`tenant_id`
)
USING
BTREE
KEY
`tenant_id`
(
`tenant_id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
3
DEFAULT
CHARSET
=
utf8mb4
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'git project'
;
ALTER
TABLE
dinky_role_select_permissions
RENAME
TO
dinky_row_permissions
;
ALTER
TABLE
dinky_role_select_permissions
RENAME
TO
dinky_row_permissions
;
...
@@ -131,7 +131,7 @@ CREATE TABLE `dinky_metrics` (
...
@@ -131,7 +131,7 @@ CREATE TABLE `dinky_metrics` (
`create_time`
datetime
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'create time'
,
`create_time`
datetime
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'create time'
,
`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'
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'metrics layout'
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
DYNAMIC
collate
=
utf8mb4_general_ci
COMMENT
=
'metrics layout'
;
-- ----------------------------
-- ----------------------------
...
@@ -139,19 +139,19 @@ CREATE TABLE `dinky_metrics` (
...
@@ -139,19 +139,19 @@ CREATE TABLE `dinky_metrics` (
-- ----------------------------
-- ----------------------------
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
)
COLLATE
utf8
_bin
DEFAULT
NULL
COMMENT
'file name'
,
`file_name`
varchar
(
64
)
COLLATE
utf8
mb4_general_ci
DEFAULT
NULL
COMMENT
'file name'
,
`description`
varchar
(
255
)
COLLATE
utf8
_bin
DEFAULT
NULL
,
`description`
varchar
(
255
)
COLLATE
utf8
mb4_general_ci
DEFAULT
NULL
,
`user_id`
int
(
11
)
DEFAULT
NULL
COMMENT
'user id'
,
`user_id`
int
(
11
)
DEFAULT
NULL
COMMENT
'user id'
,
`type`
tinyint
(
4
)
DEFAULT
NULL
COMMENT
'resource type,0:FILE,1:UDF'
,
`type`
tinyint
(
4
)
DEFAULT
NULL
COMMENT
'resource type,0:FILE,1:UDF'
,
`size`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'resource size'
,
`size`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'resource size'
,
`pid`
int
(
11
)
DEFAULT
NULL
,
`pid`
int
(
11
)
DEFAULT
NULL
,
`full_name`
varchar
(
128
)
COLLATE
utf8_bin
DEFAULT
NULL
,
`full_name`
text
COLLATE
utf8mb4_general_ci
DEFAULT
NULL
,
`is_directory`
tinyint
(
4
)
DEFAULT
NULL
,
`is_directory`
tinyint
(
4
)
DEFAULT
NULL
,
`create_time`
datetime
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'create time'
,
`create_time`
datetime
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'create time'
,
`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'
,
PRIMARY
KEY
(
`id`
),
PRIMARY
KEY
(
`id`
),
UNIQUE
KEY
`dinky_resources_un`
(
`full_name`
,
`type`
)
UNIQUE
KEY
`dinky_resources_un`
(
`full_name`
,
`type`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_bin
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8
mb4
COLLATE
=
utf8mb4_general_ci
COMMENT
=
'resource table'
;
ALTER
TABLE
dinky_database
modify
password
varchar
(
512
)
null
comment
'password'
;
ALTER
TABLE
dinky_database
modify
password
varchar
(
512
)
null
comment
'password'
;
...
@@ -245,37 +245,39 @@ CREATE TABLE `dinky_sys_role_menu` (
...
@@ -245,37 +245,39 @@ CREATE TABLE `dinky_sys_role_menu` (
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
;
CREATE
TABLE
if
not
exists
`dinky_alert_template`
(
create
table
if
not
exists
dinky_alert_template
`id`
int
NOT
NULL
AUTO_INCREMENT
COMMENT
'id'
,
(
`name`
varchar
(
20
)
CHARACTER
SET
ucs2
COLLATE
ucs2_general_ci
DEFAULT
NULL
COMMENT
'template name'
,
id
int
auto_increment
`template_content`
text
COLLATE
utf8mb4_general_ci
COMMENT
'template content'
,
primary
key
COMMENT
'id'
,
`enabled`
tinyint
DEFAULT
'1'
COMMENT
'is enable'
,
name
varchar
(
20
)
unicode
COMMENT
'template name'
,
`create_time`
datetime
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'create time'
,
template_content
text
null
COMMENT
'template content'
,
`update_time`
datetime
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'update time'
,
enabled
tinyint
default
1
null
COMMENT
'is enable'
,
`creator`
int
(
11
)
DEFAULT
NULL
COMMENT
'create user id'
,
create_time
datetime
null
COMMENT
'create time'
,
`updater`
int
(
11
)
DEFAULT
NULL
COMMENT
'update user id'
,
update_time
datetime
null
COMMENT
'update time'
PRIMARY
KEY
(
`id`
)
);
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'alert template'
;
create
table
if
not
exists
dinky_alert_rules
CREATE
TABLE
if
not
exists
`dinky_alert_rules`
(
(
`id`
int
NOT
NULL
AUTO_INCREMENT
COMMENT
'id'
,
id
int
auto_increment
`name`
varchar
(
40
)
COLLATE
utf8mb4_general_ci
NOT
NULL
COMMENT
'rule name'
,
primary
key
comment
'id'
,
`rule`
text
COLLATE
utf8mb4_general_ci
COMMENT
'specify rule'
,
name
varchar
(
40
)
unique
not
null
comment
'rule name'
,
`template_id`
int
DEFAULT
NULL
COMMENT
'template id'
,
rule
text
null
comment
'specify rule'
,
`rule_type`
varchar
(
10
)
COLLATE
utf8mb4_general_ci
DEFAULT
NULL
COMMENT
'alert rule type'
,
template_id
int
null
comment
'template id'
,
`trigger_conditions`
varchar
(
20
)
COLLATE
utf8mb4_general_ci
DEFAULT
NULL
COMMENT
'trigger conditions'
,
rule_type
varchar
(
10
)
null
comment
'alert rule type'
,
`description`
text
COLLATE
utf8mb4_general_ci
COMMENT
'description'
,
trigger_conditions
varchar
(
20
)
null
comment
'trigger conditions'
,
`enabled`
tinyint
DEFAULT
1
COMMENT
'is enable'
,
description
text
null
comment
'description'
,
`create_time`
datetime
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'create time'
,
enabled
tinyint
default
1
null
comment
'is enable'
,
`update_time`
datetime
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'update time'
,
create_time
datetime
null
comment
'create time'
,
`creator`
int
(
11
)
DEFAULT
NULL
COMMENT
'create user id'
,
update_time
datetime
null
comment
'update time'
`updater`
int
(
11
)
DEFAULT
NULL
COMMENT
'update user id'
,
);
PRIMARY
KEY
(
`id`
),
UNIQUE
KEY
`name`
(
`name`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'alert rule'
;
-- ----------------------------
-- ----------------------------
-- Table structure dinky_sys_token
-- Table structure dinky_sys_token
-- ----------------------------
-- ----------------------------
CREATE
TABLE
`dinky_sys_token`
(
CREATE
TABLE
if
not
exists
`dinky_sys_token`
(
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'id'
,
`id`
bigint
(
20
)
NOT
NULL
AUTO_INCREMENT
COMMENT
'id'
,
`token_value`
varchar
(
255
)
NOT
NULL
COMMENT
'token value'
,
`token_value`
varchar
(
255
)
NOT
NULL
COMMENT
'token value'
,
`user_id`
bigint
(
20
)
NOT
NULL
COMMENT
'user id'
,
`user_id`
bigint
(
20
)
NOT
NULL
COMMENT
'user id'
,
...
@@ -284,15 +286,15 @@ CREATE TABLE `dinky_sys_token` (
...
@@ -284,15 +286,15 @@ CREATE TABLE `dinky_sys_token` (
`expire_type`
tinyint
(
4
)
NOT
NULL
COMMENT
'1: never expire, 2: expire after a period of time, 3: expire at a certain time'
,
`expire_type`
tinyint
(
4
)
NOT
NULL
COMMENT
'1: never expire, 2: expire after a period of time, 3: expire at a certain time'
,
`expire_start_time`
datetime
DEFAULT
NULL
COMMENT
'expire start time ,when expire_type = 3 , it is the start time of the period'
,
`expire_start_time`
datetime
DEFAULT
NULL
COMMENT
'expire start time ,when expire_type = 3 , it is the start time of the period'
,
`expire_end_time`
datetime
DEFAULT
NULL
COMMENT
'expire end time ,when expire_type = 2,3 , it is the end time of the period'
,
`expire_end_time`
datetime
DEFAULT
NULL
COMMENT
'expire end time ,when expire_type = 2,3 , it is the end time of the period'
,
`create_time`
datetime
NOT
NULL
COMMENT
'create time'
,
`create_time`
datetime
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'create time'
,
`update_time`
datetime
NOT
NULL
COMMENT
'modify time'
,
`update_time`
datetime
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
COMMENT
'update time'
,
`creator`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'创建人'
,
`updator`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'修改人'
,
`source`
tinyint
(
2
)
DEFAULT
NULL
COMMENT
'1:login 2:custom'
,
`source`
tinyint
(
2
)
DEFAULT
NULL
COMMENT
'1:login 2:custom'
,
`creator`
int
(
20
)
DEFAULT
NULL
COMMENT
'创建人'
,
`updater`
int
(
20
)
DEFAULT
NULL
COMMENT
'修改人'
,
PRIMARY
KEY
(
`id`
),
PRIMARY
KEY
(
`id`
),
UNIQUE
KEY
`token_value`
(
`token_value`
)
USING
BTREE
,
UNIQUE
KEY
`token_value`
(
`token_value`
)
USING
BTREE
,
KEY
`source`
(
`source`
)
USING
HASH
KEY
`source`
(
`source`
)
USING
HASH
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
22
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'token management'
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
DYNAMIC
collate
=
utf8mb4_general_ci
COMMENT
=
'token management'
;
CREATE
TABLE
`dinky_udf_manage`
(
CREATE
TABLE
`dinky_udf_manage`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
...
...
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