Skip to content

Commit c43f7d0

Browse files
feat: support creating databases with custom charset and collation during app installation
1 parent 747a0c4 commit c43f7d0

File tree

1 file changed

+12
-4
lines changed
  • frontend/src/views/app-store/detail/params

1 file changed

+12
-4
lines changed

frontend/src/views/app-store/detail/params/index.vue

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,12 +118,20 @@
118118
</div>
119119
<span class="input-help" v-if="p.description">{{ getDescription(p) }}</span>
120120
</el-form-item>
121-
<el-form-item v-if="form[p.envKey] == 'mysql'" :label="$t('database.format')" prop="format">
121+
<el-form-item
122+
v-if="form[p.envKey] == 'mysql' || form[p.envKey] == 'mariadb'"
123+
:label="$t('database.format')"
124+
prop="format"
125+
>
122126
<el-select filterable v-model="form.format" @change="loadCollations()">
123127
<el-option v-for="item of formatOptions" :key="item.format" :label="item.format" :value="item.format" />
124128
</el-select>
125129
</el-form-item>
126-
<el-form-item v-if="form[p.envKey] == 'mysql'" :label="$t('database.collation')" prop="collation">
130+
<el-form-item
131+
v-if="form[p.envKey] == 'mysql' || form[p.envKey] == 'mariadb'"
132+
:label="$t('database.collation')"
133+
prop="collation"
134+
>
127135
<el-select filterable v-model="form.collation">
128136
<el-option v-for="item of collationOptions" :key="item" :label="item" :value="item" />
129137
</el-select>
@@ -256,7 +264,7 @@ const handleParams = () => {
256264
const getServices = async (childKey: string, key: string | undefined, pObj: ParamObj | undefined) => {
257265
pObj.services = [];
258266
appKey.value = key || '';
259-
if (appKey.value == 'mysql') {
267+
if (appKey.value == 'mysql' || appKey.value == 'mariadb') {
260268
form.format = 'utf8mb4';
261269
}
262270
await getAppService(key).then((res) => {
@@ -286,7 +294,7 @@ const changeService = (value: string, services: App.AppService[]) => {
286294
});
287295
}
288296
});
289-
if (appKey.value == 'mysql') {
297+
if (appKey.value == 'mysql' || appKey.value == 'mariadb') {
290298
loadOptions(value);
291299
}
292300
updateParam();

0 commit comments

Comments
 (0)