Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: update database group message (#16117)

ecmadao752037fdcca5
diff --git a/backend/api/v1/database_group_service.go b/backend/api/v1/database_group_service.go
index b791208744..a05859ff3b 100644
--- a/backend/api/v1/database_group_service.go
+++ b/backend/api/v1/database_group_service.go
@@ -62,7 +62,7 @@ func (s *DatabaseGroupService) CreateDatabaseGroup(ctx context.Context, request
if !isValidResourceID(request.DatabaseGroupId) {
return nil, status.Errorf(codes.InvalidArgument, "invalid database group id %q", request.DatabaseGroupId)
}
- if request.DatabaseGroup.DatabasePlaceholder == "" {
+ if request.DatabaseGroup.Title == "" {
return nil, status.Errorf(codes.InvalidArgument, "database group database placeholder is required")
}
if request.DatabaseGroup.DatabaseExpr == nil || request.DatabaseGroup.DatabaseExpr.Expression == "" {
@@ -75,7 +75,7 @@ func (s *DatabaseGroupService) CreateDatabaseGroup(ctx context.Context, request
storeDatabaseGroup := &store.DatabaseGroupMessage{
ResourceID: request.DatabaseGroupId,
ProjectID: project.ResourceID,
- Placeholder: request.DatabaseGroup.DatabasePlaceholder,
+ Placeholder: request.DatabaseGroup.Title,
Expression: request.DatabaseGroup.DatabaseExpr,
}
if request.ValidateOnly {
@@ -137,10 +137,10 @@ func (s *DatabaseGroupService) UpdateDatabaseGroup(ctx context.Context, request
for _, path := range request.UpdateMask.Paths {
switch path {
case "database_placeholder":
- if request.DatabaseGroup.DatabasePlaceholder == "" {
+ if request.DatabaseGroup.Title == "" {
return nil, status.Errorf(codes.InvalidArgument, "database group database placeholder is required")
}
- updateDatabaseGroup.Placeholder = &request.DatabaseGroup.DatabasePlaceholder
+ updateDatabaseGroup.Placeholder = &request.DatabaseGroup.Title
case "database_expr":
if request.DatabaseGroup.DatabaseExpr == nil || request.DatabaseGroup.DatabaseExpr.Expression == "" {
return nil, status.Errorf(codes.InvalidArgument, "database group expr is required")
@@ -288,9 +288,9 @@ func (s *DatabaseGroupService) convertStoreToAPIDatabaseGroupFull(ctx context.Co
func convertStoreToAPIDatabaseGroupBasic(databaseGroup *store.DatabaseGroupMessage, projectResourceID string) *v1pb.DatabaseGroup {
databaseGroupV1 := &v1pb.DatabaseGroup{
- Name: fmt.Sprintf("%s/%s%s", common.FormatProject(projectResourceID), common.DatabaseGroupNamePrefix, databaseGroup.ResourceID),
- DatabasePlaceholder: databaseGroup.Placeholder,
- DatabaseExpr: databaseGroup.Expression,
+ Name: fmt.Sprintf("%s/%s%s", common.FormatProject(projectResourceID), common.DatabaseGroupNamePrefix, databaseGroup.ResourceID),
+ Title: databaseGroup.Placeholder,
+ DatabaseExpr: databaseGroup.Expression,
}
return databaseGroupV1
}
diff --git a/backend/tests/grouping_change_test.go b/backend/tests/grouping_change_test.go
index 0cea541604..7ca8ef7f1b 100644
--- a/backend/tests/grouping_change_test.go
+++ b/backend/tests/grouping_change_test.go
@@ -163,7 +163,7 @@ func TestCreateDatabaseGroup(t *testing.T) {
Parent: ctl.project.Name,
DatabaseGroupId: tc.databaseGroupPlaceholder,
DatabaseGroup: &v1pb.DatabaseGroup{
- DatabasePlaceholder: tc.databaseGroupPlaceholder,
+ Title: tc.databaseGroupPlaceholder,
DatabaseExpr: &expr.Expr{
Expression: fmt.Sprintf(`(resource.environment_name == "environments/prod" && (%s))`, tc.databaseGroupExpr),
},
diff --git a/backend/tests/tenant_test.go b/backend/tests/tenant_test.go
index c0ac6083d1..480a6308af 100644
--- a/backend/tests/tenant_test.go
+++ b/backend/tests/tenant_test.go
@@ -131,8 +131,8 @@ func TestDatabaseGroup(t *testing.T) {
Parent: project.Name,
DatabaseGroupId: "all",
DatabaseGroup: &v1pb.DatabaseGroup{
- DatabasePlaceholder: "all",
- DatabaseExpr: &expr.Expr{Expression: "true"},
+ Title: "all",
+ DatabaseExpr: &expr.Expr{Expression: "true"},
},
})
a.NoError(err)
diff --git a/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue b/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue
index 2df963f5cd..4db2a33092 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/ApplyToDatabasePanel/ApplyToDatabasePanel.vue
@@ -82,7 +82,6 @@ import DatabaseAndGroupSelector, {
import { Drawer, DrawerContent, ErrorTipsButton } from "@/components/v2";
import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";
import { useDatabaseV1Store, useDBGroupStore } from "@/store";
-import { DatabaseGroup } from "@/types/proto/v1/database_group_service";
import { extractProjectResourceName, generateIssueTitle } from "@/utils";
import { useChangelistDetailContext } from "../context";
@@ -135,11 +134,9 @@ const handleClickNext = async () => {
const databaseList = state.targetSelectState.selectedDatabaseNameList.map(
(name) => databaseStore.getDatabaseByName(name)
);
- const databaseGroup = DatabaseGroup.fromPartial({
- ...dbGroupStore.getDBGroupByName(
- state.targetSelectState.selectedDatabaseGroup || ""
- ),
- });
+ const databaseGroup = dbGroupStore.getDBGroupByName(
+ state.targetSelectState.selectedDatabaseGroup || ""
+ );
const query: Record<string, any> = {
template:
state.changeType === "DDL"
@@ -149,7 +146,7 @@ const handleClickNext = async () => {
"bb.issue.database.schema.update",
state.targetSelectState.changeSource === "DATABASE"
? databaseList.map((db) => db.databaseName)
- : [databaseGroup?.databasePlaceholder]
+ : [databaseGroup?.title ?? ""]
),
changelist: changelist.value.name,
description: `Apply changelist [${changelist.value.description}]`,
diff --git a/frontend/src/components/DatabaseAndGroupSelector/DatabaseAndGroupSelector.vue b/frontend/src/components/DatabaseAndGroupSelector/DatabaseAndGroupSelector.vue
index f761f39849..e822f8721a 100644
--- a/frontend/src/components/DatabaseAndGroupSelector/DatabaseAndGroupSelector.vue
+++ b/frontend/src/components/DatabaseAndGroupSelector/DatabaseAndGroupSelector.vue
@@ -29,8 +29,8 @@
? [databaseSelectState.selectedDatabaseGroup]
: []
"
- @update:selected-database-groups="
- databaseSelectState.selectedDatabaseGroup = head(Array.from($event))
+ @update:selected-database-group-names="
+ databaseSelectState.selectedDatabaseGroup = head($event)
"
/>
</NTabPane>
diff --git a/frontend/src/components/DatabaseGroup/DatabaseGroupDataTable.vue b/frontend/src/components/DatabaseGroup/DatabaseGroupDataTable.vue
index 9d178c8918..3adb40422d 100644
--- a/frontend/src/components/DatabaseGroup/DatabaseGroupDataTable.vue
+++ b/frontend/src/components/DatabaseGroup/DatabaseGroupDataTable.vue
@@ -55,7 +55,7 @@ const emit = defineEmits<{
e: MouseEvent,
databaseGroup: ComposedDatabaseGroup
): void;
- (event: "update:selected-database-groups", val: Set<string>): void;
+ (event: "update:selected-database-group-names", val: string[]): void;
}>();
const { t } = useI18n();
@@ -64,54 +64,54 @@ const state = reactive<LocalState>({
});
const columnList = computed((): DatabaseGroupDataTableColumn[] => {
- const SELECTION: DatabaseGroupDataTableColumn = {
- type: "selection",
- multiple: !props.singleSelection,
- hide: !props.showSelection,
- cellProps: () => {
- return {
- onClick: (e: MouseEvent) => {
- e.stopPropagation();
- },
- };
+ const rawColumnList: DatabaseGroupDataTableColumn[] = [
+ {
+ type: "selection",
+ multiple: !props.singleSelection,
+ hide: !props.showSelection,
+ cellProps: () => {
+ return {
+ onClick: (e: MouseEvent) => {
+ e.stopPropagation();
+ },
+ };
+ },
},
- };
- const NAME: DatabaseGroupDataTableColumn = {
- key: "title",
- title: t("common.name"),
- minWidth: 128,
- render: (data) => {
- return (
- <div class="space-x-2">
- <span>{data.databasePlaceholder}</span>
- </div>
- );
+ {
+ key: "title",
+ title: t("common.name"),
+ minWidth: 128,
+ render: (data) => {
+ return (
+ <div class="space-x-2">
+ <span>{data.title}</span>
+ </div>
+ );
+ },
},
- };
- const PROJECT: DatabaseGroupDataTableColumn = {
- key: "project",
- title: t("common.project"),
- minWidth: 128,
- hide: !props.showProject,
- render: (data) => {
- return <span>{data.projectEntity.title}</span>;
+ {
+ key: "project",
+ title: t("common.project"),
+ minWidth: 128,
+ hide: !props.showProject,
+ render: (data) => {
+ return <span>{data.projectEntity.title}</span>;
+ },
},
- };
- const EXPRESSION: DatabaseGroupDataTableColumn = {
- key: "expression",
- title: t("database.expression"),
- ellipsis: true,
- render: (data) => {
- if (!data.databaseExpr || data.databaseExpr.expression === "") {
- return <span class="textinfolabel italic">{t("common.empty")}</span>;
- }
- return <span class="">{data.databaseExpr.expression}</span>;
+ {
+ key: "expression",
+ title: t("database.expression"),
+ ellipsis: true,
+ render: (data) => {
+ if (!data.databaseExpr || data.databaseExpr.expression === "") {
+ return <span class="textinfolabel italic">{t("common.empty")}</span>;
+ }
+ return <span class="">{data.databaseExpr.expression}</span>;
+ },
},
- };
+ ];
- return [SELECTION, NAME, PROJECT, EXPRESSION].filter(
- (column) => !column.hide
- );
+ return rawColumnList.filter((column) => !column.hide);
});
const data = computed(() => {
@@ -147,10 +147,9 @@ const rowProps = (databaseGroup: ComposedDatabaseGroup) => {
watch(
() => state.selectedDatabaseGroupNameList,
() => {
- emit(
- "update:selected-database-groups",
- state.selectedDatabaseGroupNameList
- );
+ emit("update:selected-database-group-names", [
+ ...state.selectedDatabaseGroupNameList,
+ ]);
}
);
</script>
diff --git a/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue b/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue
index c34ca278c7..571a3a6cbe 100644
--- a/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue
+++ b/frontend/src/components/DatabaseGroup/DatabaseGroupForm.vue
@@ -143,7 +143,7 @@ onMounted(async () => {
databaseGroup.name
);
state.resourceId = databaseGroupName;
- state.placeholder = databaseGroupEntity.databasePlaceholder;
+ state.placeholder = databaseGroupEntity.title;
const composedDatabaseGroup = await dbGroupStore.getOrFetchDBGroupByName(
databaseGroup.name,
{ silent: true }
@@ -222,7 +222,7 @@ const doConfirm = async () => {
projectName: props.project.name,
databaseGroup: {
name: `${props.project.name}/databaseGroups/${resourceId}`,
- databasePlaceholder: formState.placeholder,
+ title: formState.placeholder,
databaseExpr: Expr.fromPartial({
expression: celString,
}),
@@ -236,9 +236,7 @@ const doConfirm = async () => {
}
const updateMask: string[] = [];
- if (
- !isEqual(props.databaseGroup.databasePlaceholder, formState.placeholder)
- ) {
+ if (!isEqual(props.databaseGroup.title, formState.placeholder)) {
updateMask.push("database_placeholder");
}
if (
@@ -254,7 +252,7 @@ const doConfirm = async () => {
await dbGroupStore.updateDatabaseGroup(
{
...props.databaseGroup!,
- databasePlaceholder: formState.placeholder,
+ title: formState.placeholder,
databaseExpr: Expr.fromPartial({
expression: celString,
}),
diff --git a/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue b/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue
index f7e53a625a..6e133dc05e 100644
--- a/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue
+++ b/frontend/src/components/DatabaseGroup/ProjectDatabaseGroupPanel.vue
@@ -13,6 +13,7 @@ import { useRouter } from "vue-router";
import DatabaseGroupDataTable from "@/components/DatabaseGroup/DatabaseGroupDataTable.vue";
import { PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL } from "@/router/dashboard/projectV1";
import { useDBGroupListByProject } from "@/store";
+import { getProjectNameAndDatabaseGroupName } from "@/store/modules/v1/common";
import type { ComposedDatabaseGroup, ComposedProject } from "@/types";
const props = defineProps<{
@@ -31,7 +32,10 @@ const filteredDbGroupList = computed(() => {
return dbGroupList.value;
}
return dbGroupList.value.filter((group) => {
- return group.databaseGroupName.toLowerCase().includes(filter);
+ return (
+ group.name.toLowerCase().includes(filter) ||
+ group.title.toLowerCase().includes(filter)
+ );
});
});
@@ -39,10 +43,14 @@ const handleDatabaseGroupClick = (
event: MouseEvent,
databaseGroup: ComposedDatabaseGroup
) => {
+ const [projectId, databaseGroupName] = getProjectNameAndDatabaseGroupName(
+ databaseGroup.name
+ );
const url = router.resolve({
name: PROJECT_V1_ROUTE_DATABASE_GROUP_DETAIL,
params: {
- databaseGroupName: databaseGroup.databaseGroupName,
+ projectId,
+ databaseGroupName,
},
}).fullPath;
if (event.ctrlKey || event.metaKey) {
diff --git a/frontend/src/components/Plan/components/SpecListSection/SpecCard.vue b/frontend/src/components/Plan/components/SpecListSection/SpecCard.vue
index 75b96fc1ce..cc12b026c7 100644
--- a/frontend/src/components/Plan/components/SpecListSection/SpecCard.vue
+++ b/frontend/src/components/Plan/components/SpecListSection/SpecCard.vue
@@ -53,9 +53,7 @@
</template>
{{ $t("dynamic.resource.database-group") }}
</NTooltip>
- <span class="truncate text-sm">{{
- relatedDatabaseGroup.databaseGroupName
- }}</span>
+ <span class="truncate text-sm">{{ relatedDatabaseGroup.title }}</span>
</div>
<!-- Fallback -->
<div v-else class="flex items-center gap-2 text-sm">Unknown target</div>
diff --git a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue
index 9551a1b6a7..6e284442d8 100644
--- a/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue
+++ b/frontend/src/components/Release/ReleaseDetail/NavBar/ApplyToDatabasePanel.vue
@@ -214,7 +214,7 @@ const handleClickNext = async () => {
"bb.issue.database.schema.update",
state.targetSelectState.changeSource === "DATABASE"
? databaseList.map((db) => db.databaseName)
- : [databaseGroup?.databasePlaceholder]
+ : [databaseGroup?.title]
),
description: `Apply release "${release.value.title}"`,
});
diff --git a/frontend/src/components/v2/Model/DatabaseGroupName.vue b/frontend/src/components/v2/Model/DatabaseGroupName.vue
index 3f325b8ff8..6d483402d7 100644
--- a/frontend/src/components/v2/Model/DatabaseGroupName.vue
+++ b/frontend/src/components/v2/Model/DatabaseGroupName.vue
@@ -5,7 +5,7 @@
class="inline-flex items-center gap-x-1"
:class="link && !plain && 'normal-link'"
>
- <span>{{ databaseGroup.databasePlaceholder }}</span>
+ <span>{{ databaseGroup.title }}</span>
</component>
</template>
diff --git a/frontend/src/components/v2/Select/DatabaseGroupSelect.vue b/frontend/src/components/v2/Select/DatabaseGroupSelect.vue
index 3fb0008bb7..10a3a7bbf5 100644
--- a/frontend/src/components/v2/Select/DatabaseGroupSelect.vue
+++ b/frontend/src/components/v2/Select/DatabaseGroupSelect.vue
@@ -35,7 +35,7 @@ const dbGroupOptions = computed(() => {
return dbGroupList.value.map((dbGroup) => ({
resource: dbGroup,
value: dbGroup.name,
- label: dbGroup.databaseGroupName,
+ label: dbGroup.title,
}));
});
</script>
diff --git a/frontend/src/store/modules/dbGroup.ts b/frontend/src/store/modules/dbGroup.ts
index 52b72645f5..17c0c6c3fa 100644
--- a/frontend/src/store/modules/dbGroup.ts
+++ b/frontend/src/store/modules/dbGroup.ts
@@ -53,7 +53,7 @@ const batchComposeDatabaseGroup = async (
);
for (const databaseGroup of databaseGroupList) {
- const [projectName, databaseGroupName] = getProjectNameAndDatabaseGroupName(
+ const [projectName, _] = getProjectNameAndDatabaseGroupName(
databaseGroup.name
);
const project = projectStore.getProjectByName(
@@ -62,7 +62,6 @@ const batchComposeDatabaseGroup = async (
composedDatabaseGroupMap.set(databaseGroup.name, {
...databaseGroup,
- databaseGroupName,
projectName,
projectEntity: project,
simpleExpr: emptySimpleExpr(),
@@ -186,10 +185,7 @@ export const useDBGroupStore = defineStore("db-group", () => {
validateOnly = false,
}: {
projectName: string;
- databaseGroup: Pick<
- DatabaseGroup,
- "name" | "databasePlaceholder" | "databaseExpr"
- >;
+ databaseGroup: Pick<DatabaseGroup, "name" | "title" | "databaseExpr">;
databaseGroupId: string;
validateOnly?: boolean;
}) => {
@@ -272,7 +268,7 @@ export const useDBGroupStore = defineStore("db-group", () => {
projectName: projectName,
databaseGroup: DatabaseGroup.fromPartial({
name: `${projectName}/${databaseGroupNamePrefix}${validateOnlyResourceId}`,
- databasePlaceholder: validateOnlyResourceId,
+ title: validateOnlyResourceId,
databaseExpr: Expr.fromJSON({
expression,
}),
diff --git a/frontend/src/types/dbGroup.ts b/frontend/src/types/dbGroup.ts
index c6ffbf5050..be05868dd1 100644
--- a/frontend/src/types/dbGroup.ts
+++ b/frontend/src/types/dbGroup.ts
@@ -3,7 +3,6 @@ import type { ComposedProject } from "@/types";
import type { DatabaseGroup } from "./proto/v1/database_group_service";
export interface ComposedDatabaseGroup extends DatabaseGroup {
- databaseGroupName: string;
projectName: string;
projectEntity: ComposedProject;
simpleExpr: ConditionGroupExpr;
diff --git a/frontend/src/types/proto/v1/database_group_service.ts b/frontend/src/types/proto/v1/database_group_service.ts
index 90b64c3b81..de4266df1d 100644
--- a/frontend/src/types/proto/v1/database_group_service.ts
+++ b/frontend/src/types/proto/v1/database_group_service.ts
@@ -167,11 +167,8 @@ export interface DatabaseGroup {
* Format: projects/{project}/databaseGroups/{databaseGroup}
*/
name: string;
- /**
- * The short name used in actual databases specified by users.
- * For example, the placeholder for db1_2010, db1_2021, db1_2023 will be "db1".
- */
- databasePlaceholder: string;
+ /** The short name used in actual databases specified by users. */
+ title: string;
/** The condition that is associated with this database group. */
databaseExpr:
| Expr
@@ -685,7 +682,7 @@ export const DeleteDatabaseGroupRequest: MessageFns<DeleteDatabaseGroupRequest>
};
function createBaseDatabaseGroup(): DatabaseGroup {
- return { name: "", databasePlaceholder: "", databaseExpr: undefined, matchedDatabases: [], unmatchedDatabases: [] };
+ return { name: "", title: "", databaseExpr: undefined, matchedDatabases: [], unmatchedDatabases: [] };
}
export const DatabaseGroup: MessageFns<DatabaseGroup> = {
@@ -693,8 +690,8 @@ export const DatabaseGroup: MessageFns<DatabaseGroup> = {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
- if (message.databasePlaceholder !== "") {
- writer.uint32(18).string(message.databasePlaceholder);
+ if (message.title !== "") {
+ writer.uint32(18).string(message.title);
}
if (message.databaseExpr !== undefined) {
Expr.encode(message.databaseExpr, writer.uint32(26).fork()).join();
@@ -728,7 +725,7 @@ export const DatabaseGroup: MessageFns<DatabaseGroup> = {
break;
}
- message.databasePlaceholder = reader.string();
+ message.title = reader.string();
continue;
}
case 3: {
@@ -767,7 +764,7 @@ export const DatabaseGroup: MessageFns<DatabaseGroup> = {
fromJSON(object: any): DatabaseGroup {
return {
name: isSet(object.name) ? globalThis.String(object.name) : "",
- databasePlaceholder: isSet(object.databasePlaceholder) ? globalThis.String(object.databasePlaceholder) : "",
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
databaseExpr: isSet(object.databaseExpr) ? Expr.fromJSON(object.databaseExpr) : undefined,
matchedDatabases: globalThis.Array.isArray(object?.matchedDatabases)
? object.matchedDatabases.map((e: any) => DatabaseGroup_Database.fromJSON(e))
@@ -783,8 +780,8 @@ export const DatabaseGroup: MessageFns<DatabaseGroup> = {
if (message.name !== "") {
obj.name = message.name;
}
- if (message.databasePlaceholder !== "") {
- obj.databasePlaceholder = message.databasePlaceholder;
+ if (message.title !== "") {
+ obj.title = message.title;
}
if (message.databaseExpr !== undefined) {
obj.databaseExpr = Expr.toJSON(message.databaseExpr);
@@ -804,7 +801,7 @@ export const DatabaseGroup: MessageFns<DatabaseGroup> = {
fromPartial(object: DeepPartial<DatabaseGroup>): DatabaseGroup {
const message = createBaseDatabaseGroup();
message.name = object.name ?? "";
- message.databasePlaceholder = object.databasePlaceholder ?? "";
+ message.title = object.title ?? "";
message.databaseExpr = (object.databaseExpr !== undefined && object.databaseExpr !== null)
? Expr.fromPartial(object.databaseExpr)
: undefined;
diff --git a/frontend/src/utils/databaseGroup/issue.ts b/frontend/src/utils/databaseGroup/issue.ts
index dbe36942a3..dc5d872835 100644
--- a/frontend/src/utils/databaseGroup/issue.ts
+++ b/frontend/src/utils/databaseGroup/issue.ts
@@ -13,7 +13,7 @@ export const generateDatabaseGroupIssueRoute = (
planOnly = false
) => {
const issueNameParts: string[] = [];
- issueNameParts.push(`[${databaseGroup.databasePlaceholder}]`);
+ issueNameParts.push(`[${databaseGroup.title}]`);
issueNameParts.push(
type === "bb.issue.database.schema.update" ? `Edit schema` : `Change data`
);
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index d518f41d89..b85090549f 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -9260,11 +9260,9 @@ components:
description: |-
The name of the database group.
Format: projects/{project}/databaseGroups/{databaseGroup}
- databasePlaceholder:
+ title:
type: string
- description: |-
- The short name used in actual databases specified by users.
- For example, the placeholder for db1_2010, db1_2021, db1_2023 will be "db1".
+ description: The short name used in actual databases specified by users.
databaseExpr:
allOf:
- $ref: '#/components/schemas/Expr'
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 8b7c800ed6..aabb50597b 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -6165,7 +6165,7 @@ This value should be 4-63 characters, and valid characters are /[a-z][0-9]-/. |
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| name | [string](#string) | | The name of the database group. Format: projects/{project}/databaseGroups/{databaseGroup} |
-| database_placeholder | [string](#string) | | The short name used in actual databases specified by users. For example, the placeholder for db1_2010, db1_2021, db1_2023 will be &#34;db1&#34;. |
+| title | [string](#string) | | The short name used in actual databases specified by users. |
| database_expr | [google.type.Expr](#google-type-Expr) | | The condition that is associated with this database group. |
| matched_databases | [DatabaseGroup.Database](#bytebase-v1-DatabaseGroup-Database) | repeated | The list of databases that match the database group condition. |
| unmatched_databases | [DatabaseGroup.Database](#bytebase-v1-DatabaseGroup-Database) | repeated | The list of databases that match the database group condition. |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index b89532cfd4..aff6c61709 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -17463,11 +17463,10 @@ Format: projects/{project}/databaseGroups/{databaseGroup} </p></td>
</tr>
<tr>
- <td>database_placeholder</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The short name used in actual databases specified by users.
-For example, the placeholder for db1_2010, db1_2021, db1_2023 will be &#34;db1&#34;. </p></td>
+ <td><p>The short name used in actual databases specified by users. </p></td>
</tr>
<tr>
diff --git a/proto/generated-go/v1/database_group_service.pb.go b/proto/generated-go/v1/database_group_service.pb.go
index 06cd2413f6..af6e0039b7 100644
--- a/proto/generated-go/v1/database_group_service.pb.go
+++ b/proto/generated-go/v1/database_group_service.pb.go
@@ -447,8 +447,7 @@ type DatabaseGroup struct {
// Format: projects/{project}/databaseGroups/{databaseGroup}
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The short name used in actual databases specified by users.
- // For example, the placeholder for db1_2010, db1_2021, db1_2023 will be "db1".
- DatabasePlaceholder string `protobuf:"bytes,2,opt,name=database_placeholder,json=databasePlaceholder,proto3" json:"database_placeholder,omitempty"`
+ Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
// The condition that is associated with this database group.
DatabaseExpr *expr.Expr `protobuf:"bytes,3,opt,name=database_expr,json=databaseExpr,proto3" json:"database_expr,omitempty"`
// The list of databases that match the database group condition.
@@ -496,9 +495,9 @@ func (x *DatabaseGroup) GetName() string {
return ""
}
-func (x *DatabaseGroup) GetDatabasePlaceholder() string {
+func (x *DatabaseGroup) GetTitle() string {
if x != nil {
- return x.DatabasePlaceholder
+ return x.Title
}
return ""
}
@@ -600,10 +599,10 @@ const file_v1_database_group_service_proto_rawDesc = "" +
"updateMask\"U\n" +
"\x1aDeleteDatabaseGroupRequest\x127\n" +
"\x04name\x18\x01 \x01(\tB#\xe2A\x01\x02\xfaA\x1c\n" +
- "\x1abytebase.com/DatabaseGroupR\x04name\"\xb6\x03\n" +
+ "\x1abytebase.com/DatabaseGroupR\x04name\"\x99\x03\n" +
"\rDatabaseGroup\x12\x12\n" +
- "\x04name\x18\x01 \x01(\tR\x04name\x121\n" +
- "\x14database_placeholder\x18\x02 \x01(\tR\x13databasePlaceholder\x126\n" +
+ "\x04name\x18\x01 \x01(\tR\x04name\x12\x14\n" +
+ "\x05title\x18\x02 \x01(\tR\x05title\x126\n" +
"\rdatabase_expr\x18\x03 \x01(\v2\x11.google.type.ExprR\fdatabaseExpr\x12V\n" +
"\x11matched_databases\x18\x04 \x03(\v2#.bytebase.v1.DatabaseGroup.DatabaseB\x04\xe2A\x01\x03R\x10matchedDatabases\x12Z\n" +
"\x13unmatched_databases\x18\x05 \x03(\v2#.bytebase.v1.DatabaseGroup.DatabaseB\x04\xe2A\x01\x03R\x12unmatchedDatabases\x1a\x1e\n" +
diff --git a/proto/v1/v1/database_group_service.proto b/proto/v1/v1/database_group_service.proto
index 0ee0b5eb5b..3d87e454c2 100644
--- a/proto/v1/v1/database_group_service.proto
+++ b/proto/v1/v1/database_group_service.proto
@@ -169,8 +169,7 @@ message DatabaseGroup {
string name = 1;
// The short name used in actual databases specified by users.
- // For example, the placeholder for db1_2010, db1_2021, db1_2023 will be "db1".
- string database_placeholder = 2;
+ string title = 2;
// The condition that is associated with this database group.
google.type.Expr database_expr = 3;