Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix:PostgreSQL initdb #1953

Merged
merged 55 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
1ecfcdc
点击跳转代码插件修复websotrm bug
xue-ding-e Apr 14, 2024
2365944
Merge branch 'flipped-aurora:main' into main
xue-ding-e Apr 17, 2024
1443ca4
Merge branch 'flipped-aurora:main' into main
xue-ding-e Apr 23, 2024
1c87570
Merge branch 'flipped-aurora:main' into main
xue-ding-e Apr 26, 2024
32087b8
Merge branch 'flipped-aurora:main' into main
xue-ding-e May 9, 2024
5b905c9
自动化创建代码增加int64和uint(默认id类型)
xue-ding-e May 9, 2024
798d8b8
Merge pull request #2 from flipped-aurora/main
xue-ding-e May 10, 2024
0eba720
Merge branch 'flipped-aurora:main' into main
xue-ding-e May 15, 2024
d18b91b
Merge branch 'flipped-aurora:main' into main
xue-ding-e May 16, 2024
f93655d
Merge branch 'flipped-aurora:main' into main
xue-ding-e May 16, 2024
9bd3062
Merge branch 'flipped-aurora:main' into main
xue-ding-e May 21, 2024
92b9c4d
Merge branch 'flipped-aurora:main' into main
xue-ding-e May 22, 2024
08f8e85
删除selectImage.vue中chooseImg下多余的console.log(url)
xue-ding-e May 24, 2024
ddc87a6
Revert "自动化创建代码增加int64和uint(默认id类型)"
xue-ding-e May 24, 2024
30bf327
Revert "删除selectImage.vue中chooseImg下多余的console.log(url)"
xue-ding-e May 26, 2024
1e0ba04
删除selectImage.vue中chooseImg下多余的console.log(url)
xue-ding-e May 26, 2024
af0196c
Merge branch 'flipped-aurora:main' into main
xue-ding-e May 26, 2024
92a846c
Merge branch 'flipped-aurora:main' into main
xue-ding-e May 30, 2024
041a8f4
Merge branch 'flipped-aurora:main' into main
xue-ding-e Jun 4, 2024
055f11c
增加package页面修改展示名字/描述内容
xue-ding-e Jun 4, 2024
1dce120
Merge branch 'flipped-aurora:main' into main
xue-ding-e Jun 9, 2024
21ef799
Merge branch 'flipped-aurora:main' into main
xue-ding-e Jun 11, 2024
95b5a2b
api筛选增加路径筛选
xue-ding-e Jun 12, 2024
8367e6d
Merge branch 'flipped-aurora:main' into main
xue-ding-e Jun 12, 2024
9b43cd5
Merge remote-tracking branch 'origin/main'
xue-ding-e Jun 12, 2024
7912b06
Revert "增加package页面修改展示名字/描述内容"
xue-ding-e Jun 12, 2024
7e7334c
Merge branch 'qimiao'
xue-ding-e Jun 16, 2024
4fc0ae4
Merge branch 'flipped-aurora:main' into main
xue-ding-e Jun 17, 2024
a8be66b
Merge branch 'flipped-aurora:main' into main
xue-ding-e Jun 19, 2024
8c4cf39
Merge branch 'flipped-aurora:main' into main
xue-ding-e Jun 21, 2024
497d188
Merge branch 'flipped-aurora:main' into main
xue-ding-e Jun 23, 2024
e458d10
更改初始化角色名字
xue-ding-e Jun 23, 2024
0af8551
更改系统初始化用户角色名字
xue-ding-e Jun 23, 2024
3cc29a1
Revert "更改系统初始化用户角色名字"
xue-ding-e Jun 24, 2024
508b9b9
Revert "更改初始化角色名字"
xue-ding-e Jun 24, 2024
3459f03
dockerfile后端设置时区
xue-ding-e Jun 27, 2024
e0e3c70
Merge branch 'flipped-aurora:main' into main
xue-ding-e Jun 27, 2024
540b99c
gitignore忽略后端uploads文件夹
xue-ding-e Jun 27, 2024
3446fc4
Merge branch 'flipped-aurora:main' into main
xue-ding-e Jul 1, 2024
75a0842
Merge branch 'flipped-aurora:main' into main
xue-ding-e Jul 2, 2024
f851aa9
Merge branch 'flipped-aurora:main' into main
xue-ding-e Jul 3, 2024
616ca92
Merge branch 'flipped-aurora:main' into main
xue-ding-e Jul 8, 2024
2bd7aa1
Merge branch 'qimiao'
xue-ding-e Jul 12, 2024
354c22d
Merge branch 'qimiao'
xue-ding-e Jul 24, 2024
dd2d116
Merge remote-tracking branch 'gva/main'
xue-ding-e Aug 1, 2024
29ad3d7
Merge branch 'qimiao'
xue-ding-e Aug 4, 2024
b25556d
Merge branch 'qimiao'
xue-ding-e Aug 7, 2024
e2eeb6d
Merge branch 'qimiao'
xue-ding-e Aug 28, 2024
eb89190
Merge branch 'qimiao'
xue-ding-e Nov 5, 2024
8d2735f
解决Invalid vnode type when creating vnode的警告问题
neo-6 Dec 2, 2024
6bfbfc4
解决传参时提示错误警告
neo-6 Dec 2, 2024
3272f3c
修复长度验证中数字验证
neo-6 Dec 2, 2024
80c54ad
Merge pull request #1946 from neo-6/neo-6-patch-1
pixelmaxQm Dec 4, 2024
78ddb9b
Merge pull request #11 from flipped-aurora/main
xue-ding-e Dec 7, 2024
ed0bbfd
bugfix:postgresql增加显示指定template
xue-ding-e Dec 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions server/model/system/request/sys_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ type InitDB struct {
Password string `json:"password"` // 数据库密码
DBName string `json:"dbName" binding:"required"` // 数据库名
DBPath string `json:"dbPath"` // sqlite数据库文件路径
Template string `json:"template"` // postgresql指定template
}

// MysqlEmptyDsn msyql 空数据库 建库链接
Expand Down
7 changes: 6 additions & 1 deletion server/service/system/sys_initdb_pgsql.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ func (h PgsqlInitHandler) EnsureDB(ctx context.Context, conf *request.InitDB) (n
} // 如果没有数据库名, 则跳出初始化数据

dsn := conf.PgsqlEmptyDsn()
createSql := fmt.Sprintf("CREATE DATABASE %s;", c.Dbname)
var createSql string
if conf.Template != "" {
createSql = fmt.Sprintf("CREATE DATABASE %s WITH TEMPLATE %s;", c.Dbname, conf.Template)
} else {
createSql = fmt.Sprintf("CREATE DATABASE %s;", c.Dbname)
}
if err = createDatabase(dsn, "pgx", createSql); err != nil {
return nil, err
} // 创建数据库
Expand Down
9 changes: 8 additions & 1 deletion web/src/view/init/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@
placeholder="请输入sqlite数据库文件存放路径"
/>
</el-form-item>
<el-form-item v-if="form.dbType === 'pgsql'" label="template">
<el-input
v-model="form.template"
placeholder="请输入postgresql指定template"
/>
</el-form-item>
<el-form-item>
<div style="text-align: right">
<el-button type="primary" @click="onSubmit">立即初始化</el-button>
Expand Down Expand Up @@ -192,7 +198,8 @@
userName: 'postgres',
password: '',
dbName: 'gva',
dbPath: ''
dbPath: '',
template: 'template0'
})
break
case 'oracle':
Expand Down
4 changes: 2 additions & 2 deletions web/src/view/superAdmin/menu/icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
>
<template #prefix>
<el-icon>
<component :is="value" />
<component v-if="value" :is="value" />
</el-icon>
</template>
<el-option
Expand All @@ -21,7 +21,7 @@
>
<span class="gva-icon" style="padding: 3px 0 0" :class="item.label">
<el-icon>
<component :is="item.label" />
<component v-if="item.label" :is="item.label" />
</el-icon>
</span>
<span style="text-align: left">{{ item.key }}</span>
Expand Down
2 changes: 1 addition & 1 deletion web/src/view/systemTools/autoCode/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@
<el-upload
class="flex items-center"
:before-upload="importJson"
show-file-list="false"
:show-file-list="false"
accept=".json"
>
<el-button type="primary" class="mx-2" :disabled="isAdd"
Expand Down
4 changes: 2 additions & 2 deletions web/src/view/systemTools/system/system.vue
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,8 @@
<el-form-item label="字符长度">
<el-input-number
v-model="config.captcha['key-long']"
min="4"
max="6"
:min="4"
:max="6"
/>
</el-form-item>
<el-form-item label="图片宽度">
Expand Down
Loading