Skip to content

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

feat: redesign project danger zone with purge semantics (#18950)

Danny Xue797d8dc89c6
diff --git a/backend/api/mcp/gen/openapi.yaml b/backend/api/mcp/gen/openapi.yaml
index 2190d3f340..ea503f27fc 100644
--- a/backend/api/mcp/gen/openapi.yaml
+++ b/backend/api/mcp/gen/openapi.yaml
@@ -7051,14 +7051,16 @@ components:
description: |-
The names of the projects to delete.
Format: projects/{project}
- force:
+ purge:
type: boolean
- title: force
+ title: purge
description: |-
- If set to true, any databases from this project will be moved to default project.
- Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
- Open issues will remain open but associated with the deleted project.
- If set to false, the operation will fail if the project has databases or open issues.
+ If set to true, permanently purge the soft-deleted projects and all related resources.
+ This operation is irreversible. Following AIP-165, this should only be used for
+ administrative cleanup of old soft-deleted projects.
+ All projects must already be soft-deleted for this to work.
+ When purge=true, all databases will be moved to the default project before deletion.
+ When purge=false (soft delete/archive), the projects and their databases/issues remain unchanged.
title: BatchDeleteProjectsRequest
additionalProperties: false
bytebase.v1.BatchDeparseRequest:
@@ -8923,14 +8925,6 @@ components:
description: |-
The name of the project to delete.
Format: projects/{project}
- force:
- type: boolean
- title: force
- description: |-
- If set to true, any databases from this project will be moved to default project.
- Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
- Open issues will remain open but associated with the deleted project.
- If set to false, the operation will fail if the project has databases or open issues.
purge:
type: boolean
title: purge
@@ -8939,6 +8933,8 @@ components:
This operation is irreversible. Following AIP-165, this should only be used for
administrative cleanup of old soft-deleted projects.
The project must already be soft-deleted for this to work.
+ When purge=true, all databases will be moved to the default project before deletion.
+ When purge=false (soft delete/archive), the project and its databases/issues remain unchanged.
title: DeleteProjectRequest
additionalProperties: false
bytebase.v1.DeleteReleaseRequest:
diff --git a/backend/api/v1/project_service.go b/backend/api/v1/project_service.go
index d1ad4e1d18..8a9aad7282 100644
--- a/backend/api/v1/project_service.go
+++ b/backend/api/v1/project_service.go
@@ -374,17 +374,23 @@ func (s *ProjectService) DeleteProject(ctx context.Context, req *connect.Request
return nil, err
}
- // Handle purge (hard delete) of soft-deleted project
+ // Handle purge (hard delete)
if req.Msg.Purge {
- // Following AIP-165, purge only works on already soft-deleted projects
- if !project.Deleted {
- return nil, connect.NewError(connect.CodeFailedPrecondition, errors.Errorf("project %q must be soft-deleted before it can be purged", req.Msg.Name))
- }
if project.ResourceID == common.DefaultProjectID {
return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("default project cannot be purged"))
}
- // Permanently delete the project and all related resources
+ // If project is not already soft-deleted, soft-delete it first
+ if !project.Deleted {
+ if _, err := s.store.UpdateProjects(ctx, &store.UpdateProjectMessage{
+ ResourceID: project.ResourceID,
+ Delete: &deletePatch,
+ }); err != nil {
+ return nil, connect.NewError(connect.CodeInternal, err)
+ }
+ }
+
+ // Permanently delete the project and all related resources (moves databases to default project)
if err := s.store.DeleteProject(ctx, project.ResourceID); err != nil {
return nil, connect.NewError(connect.CodeInternal, errors.Wrap(err, "failed to purge project"))
}
@@ -392,7 +398,7 @@ func (s *ProjectService) DeleteProject(ctx context.Context, req *connect.Request
return connect.NewResponse(&emptypb.Empty{}), nil
}
- // Regular soft delete flow
+ // Regular soft delete (archive) flow
if project.Deleted {
return nil, connect.NewError(connect.CodeNotFound, errors.Errorf("project %q has been deleted", req.Msg.Name))
}
@@ -400,34 +406,7 @@ func (s *ProjectService) DeleteProject(ctx context.Context, req *connect.Request
return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("default project cannot be deleted"))
}
- // Resources prevent project deletion.
- databases, err := s.store.ListDatabases(ctx, &store.FindDatabaseMessage{ProjectID: &project.ResourceID, ShowDeleted: true})
- if err != nil {
- return nil, connect.NewError(connect.CodeInternal, err)
- }
- // We don't move the sheet to default project because BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
- if req.Msg.Force {
- if len(databases) > 0 {
- defaultProject := common.DefaultProjectID
- if _, err := s.store.BatchUpdateDatabases(ctx, databases, &store.BatchUpdateDatabases{ProjectID: &defaultProject}); err != nil {
- return nil, connect.NewError(connect.CodeInternal, err)
- }
- }
- // We don't close the issues because they might be open still.
- } else {
- // Return the open issue error first because that's more important than transferring out databases.
- openIssues, err := s.store.ListIssues(ctx, &store.FindIssueMessage{ProjectIDs: &[]string{project.ResourceID}, StatusList: []storepb.Issue_Status{storepb.Issue_OPEN}})
- if err != nil {
- return nil, connect.NewError(connect.CodeInternal, err)
- }
- if len(openIssues) > 0 {
- return nil, connect.NewError(connect.CodeFailedPrecondition, errors.Errorf("resolve all open issues before deleting the project"))
- }
- if len(databases) > 0 {
- return nil, connect.NewError(connect.CodeFailedPrecondition, errors.Errorf("transfer all databases to the default project before deleting the project"))
- }
- }
-
+ // For archive (soft delete), just mark the project as deleted without touching databases or issues
if _, err := s.store.UpdateProjects(ctx, &store.UpdateProjectMessage{
ResourceID: project.ResourceID,
Delete: &deletePatch,
@@ -465,6 +444,46 @@ func (s *ProjectService) BatchDeleteProjects(ctx context.Context, request *conne
return nil, connect.NewError(connect.CodeInvalidArgument, errors.New("names cannot be empty"))
}
+ // Handle purge (hard delete)
+ if request.Msg.Purge {
+ var projectsToPurge []*store.ProjectMessage
+ for _, name := range request.Msg.Names {
+ project, err := s.getProjectMessage(ctx, name)
+ if err != nil {
+ return nil, err
+ }
+ if project.ResourceID == common.DefaultProjectID {
+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("default project cannot be purged"))
+ }
+ projectsToPurge = append(projectsToPurge, project)
+ }
+
+ // Soft-delete projects that aren't already deleted
+ var projectsToSoftDelete []*store.UpdateProjectMessage
+ for _, project := range projectsToPurge {
+ if !project.Deleted {
+ projectsToSoftDelete = append(projectsToSoftDelete, &store.UpdateProjectMessage{
+ ResourceID: project.ResourceID,
+ Delete: &deletePatch,
+ })
+ }
+ }
+ if len(projectsToSoftDelete) > 0 {
+ if _, err := s.store.UpdateProjects(ctx, projectsToSoftDelete...); err != nil {
+ return nil, connect.NewError(connect.CodeInternal, err)
+ }
+ }
+
+ // Permanently delete all projects (moves databases to default project)
+ for _, project := range projectsToPurge {
+ if err := s.store.DeleteProject(ctx, project.ResourceID); err != nil {
+ return nil, connect.NewError(connect.CodeInternal, errors.Wrapf(err, "failed to purge project %q", project.Title))
+ }
+ }
+ return connect.NewResponse(&emptypb.Empty{}), nil
+ }
+
+ // Regular soft delete (archive) flow
// Phase 1: Load all projects and check permissions
var projects []*store.ProjectMessage
for _, name := range request.Msg.Names {
@@ -481,67 +500,8 @@ func (s *ProjectService) BatchDeleteProjects(ctx context.Context, request *conne
projects = append(projects, project)
}
- // Phase 2: Check dependencies for all projects if force is false
- if !request.Msg.Force {
- var blockedProjects []string
- for _, project := range projects {
- // Check for open issues
- openIssues, err := s.store.ListIssues(ctx, &store.FindIssueMessage{
- ProjectIDs: &[]string{project.ResourceID},
- StatusList: []storepb.Issue_Status{storepb.Issue_OPEN},
- })
- if err != nil {
- return nil, connect.NewError(connect.CodeInternal, err)
- }
- if len(openIssues) > 0 {
- blockedProjects = append(blockedProjects, project.ResourceID)
- continue
- }
-
- // Check for databases
- databases, err := s.store.ListDatabases(ctx, &store.FindDatabaseMessage{
- ProjectID: &project.ResourceID,
- ShowDeleted: true,
- })
- if err != nil {
- return nil, connect.NewError(connect.CodeInternal, err)
- }
- if len(databases) > 0 {
- blockedProjects = append(blockedProjects, project.ResourceID)
- }
- }
-
- if len(blockedProjects) > 0 {
- return nil, connect.NewError(connect.CodeFailedPrecondition,
- errors.Errorf("the following projects have open issues or databases and cannot be deleted: %v. Use force=true to move databases to default project",
- blockedProjects))
- }
- } else {
- // Phase 3: Execute deletions
- // If force is true, we need to move databases to default project
- var dbs []*store.DatabaseMessage
- for _, project := range projects {
- databases, err := s.store.ListDatabases(ctx, &store.FindDatabaseMessage{
- ProjectID: &project.ResourceID,
- ShowDeleted: true,
- })
- if err != nil {
- return nil, connect.NewError(connect.CodeInternal, err)
- }
- dbs = append(dbs, databases...)
- }
- if len(dbs) > 0 {
- defaultProject := common.DefaultProjectID
- // Note: BatchUpdateDatabases already uses transactions internally
- if _, err := s.store.BatchUpdateDatabases(ctx, dbs, &store.BatchUpdateDatabases{
- ProjectID: &defaultProject,
- }); err != nil {
- return nil, connect.NewError(connect.CodeInternal, err)
- }
- }
- }
-
- // Phase 4: Mark all projects as deleted.
+ // Phase 2: Mark all projects as deleted (soft delete/archive)
+ // No need to check for databases or issues - they remain in the archived project
var updatePatches []*store.UpdateProjectMessage
for _, project := range projects {
updatePatches = append(updatePatches, &store.UpdateProjectMessage{
diff --git a/backend/generated-go/v1/project_service.pb.go b/backend/generated-go/v1/project_service.pb.go
index 943951937f..0439ea59e3 100644
--- a/backend/generated-go/v1/project_service.pb.go
+++ b/backend/generated-go/v1/project_service.pb.go
@@ -678,16 +678,13 @@ type DeleteProjectRequest struct {
// The name of the project to delete.
// Format: projects/{project}
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- // If set to true, any databases from this project will be moved to default project.
- // Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
- // Open issues will remain open but associated with the deleted project.
- // If set to false, the operation will fail if the project has databases or open issues.
- Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"`
// If set to true, permanently purge the soft-deleted project and all related resources.
// This operation is irreversible. Following AIP-165, this should only be used for
// administrative cleanup of old soft-deleted projects.
// The project must already be soft-deleted for this to work.
- Purge bool `protobuf:"varint,3,opt,name=purge,proto3" json:"purge,omitempty"`
+ // When purge=true, all databases will be moved to the default project before deletion.
+ // When purge=false (soft delete/archive), the project and its databases/issues remain unchanged.
+ Purge bool `protobuf:"varint,2,opt,name=purge,proto3" json:"purge,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -729,13 +726,6 @@ func (x *DeleteProjectRequest) GetName() string {
return ""
}
-func (x *DeleteProjectRequest) GetForce() bool {
- if x != nil {
- return x.Force
- }
- return false
-}
-
func (x *DeleteProjectRequest) GetPurge() bool {
if x != nil {
return x.Purge
@@ -794,11 +784,13 @@ type BatchDeleteProjectsRequest struct {
// The names of the projects to delete.
// Format: projects/{project}
Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"`
- // If set to true, any databases from this project will be moved to default project.
- // Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
- // Open issues will remain open but associated with the deleted project.
- // If set to false, the operation will fail if the project has databases or open issues.
- Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"`
+ // If set to true, permanently purge the soft-deleted projects and all related resources.
+ // This operation is irreversible. Following AIP-165, this should only be used for
+ // administrative cleanup of old soft-deleted projects.
+ // All projects must already be soft-deleted for this to work.
+ // When purge=true, all databases will be moved to the default project before deletion.
+ // When purge=false (soft delete/archive), the projects and their databases/issues remain unchanged.
+ Purge bool `protobuf:"varint,2,opt,name=purge,proto3" json:"purge,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
@@ -840,9 +832,9 @@ func (x *BatchDeleteProjectsRequest) GetNames() []string {
return nil
}
-func (x *BatchDeleteProjectsRequest) GetForce() bool {
+func (x *BatchDeleteProjectsRequest) GetPurge() bool {
if x != nil {
- return x.Force
+ return x.Purge
}
return false
}
@@ -1620,19 +1612,18 @@ const file_v1_project_service_proto_rawDesc = "" +
"\aproject\x18\x01 \x01(\v2\x14.bytebase.v1.ProjectB\x03\xe0A\x02R\aproject\x12;\n" +
"\vupdate_mask\x18\x02 \x01(\v2\x1a.google.protobuf.FieldMaskR\n" +
"updateMask\x12#\n" +
- "\rallow_missing\x18\x03 \x01(\bR\fallowMissing\"t\n" +
+ "\rallow_missing\x18\x03 \x01(\bR\fallowMissing\"^\n" +
"\x14DeleteProjectRequest\x120\n" +
"\x04name\x18\x01 \x01(\tB\x1c\xe0A\x02\xfaA\x16\n" +
"\x14bytebase.com/ProjectR\x04name\x12\x14\n" +
- "\x05force\x18\x02 \x01(\bR\x05force\x12\x14\n" +
- "\x05purge\x18\x03 \x01(\bR\x05purge\"J\n" +
+ "\x05purge\x18\x02 \x01(\bR\x05purge\"J\n" +
"\x16UndeleteProjectRequest\x120\n" +
"\x04name\x18\x01 \x01(\tB\x1c\xe0A\x02\xfaA\x16\n" +
"\x14bytebase.com/ProjectR\x04name\"f\n" +
"\x1aBatchDeleteProjectsRequest\x122\n" +
"\x05names\x18\x01 \x03(\tB\x1c\xe0A\x02\xfaA\x16\n" +
"\x14bytebase.com/ProjectR\x05names\x12\x14\n" +
- "\x05force\x18\x02 \x01(\bR\x05force\"I\n" +
+ "\x05purge\x18\x02 \x01(\bR\x05purge\"I\n" +
"\x05Label\x12\x14\n" +
"\x05value\x18\x01 \x01(\tR\x05value\x12\x14\n" +
"\x05color\x18\x02 \x01(\tR\x05color\x12\x14\n" +
diff --git a/backend/generated-go/v1/project_service_equal.pb.go b/backend/generated-go/v1/project_service_equal.pb.go
index 945fbec4ea..c712b3a96e 100644
--- a/backend/generated-go/v1/project_service_equal.pb.go
+++ b/backend/generated-go/v1/project_service_equal.pb.go
@@ -198,9 +198,6 @@ func (x *DeleteProjectRequest) Equal(y *DeleteProjectRequest) bool {
if x.Name != y.Name {
return false
}
- if x.Force != y.Force {
- return false
- }
if x.Purge != y.Purge {
return false
}
@@ -235,7 +232,7 @@ func (x *BatchDeleteProjectsRequest) Equal(y *BatchDeleteProjectsRequest) bool {
return false
}
}
- if x.Force != y.Force {
+ if x.Purge != y.Purge {
return false
}
return true
diff --git a/backend/tests/project_test.go b/backend/tests/project_test.go
index 89e1f2385b..02f6ed307c 100644
--- a/backend/tests/project_test.go
+++ b/backend/tests/project_test.go
@@ -38,15 +38,22 @@ func TestArchiveProject(t *testing.T) {
a.NoError(err)
instance := instanceResp.Msg
- t.Run("ArchiveProjectWithDatbase", func(_ *testing.T) {
+ t.Run("ArchiveProjectWithDatabase", func(_ *testing.T) {
databaseName := "db1"
err = ctl.createDatabase(ctx, ctl.project, instance, nil /* environment */, databaseName, "")
a.NoError(err)
+ // Archive (purge=false) should succeed even with databases
_, err = ctl.projectServiceClient.DeleteProject(ctx, connect.NewRequest(&v1pb.DeleteProjectRequest{
Name: ctl.project.Name,
}))
- a.Error(err)
+ a.NoError(err)
+
+ // Restore the project for the next test
+ _, err = ctl.projectServiceClient.UndeleteProject(ctx, connect.NewRequest(&v1pb.UndeleteProjectRequest{
+ Name: ctl.project.Name,
+ }))
+ a.NoError(err)
})
t.Run("ArchiveProjectWithOpenIssue", func(_ *testing.T) {
@@ -79,9 +86,10 @@ func TestArchiveProject(t *testing.T) {
}))
a.NoError(err)
+ // Archive (purge=false) should succeed even with open issues
_, err = ctl.projectServiceClient.DeleteProject(ctx, connect.NewRequest(&v1pb.DeleteProjectRequest{
Name: ctl.project.Name,
}))
- a.ErrorContains(err, "resolve all open issues before deleting the project")
+ a.NoError(err)
})
}
diff --git a/frontend/src/components/Project/ProjectArchiveRestoreButton.vue b/frontend/src/components/Project/ProjectArchiveRestoreButton.vue
index 85f672dea8..d25c15838d 100644
--- a/frontend/src/components/Project/ProjectArchiveRestoreButton.vue
+++ b/frontend/src/components/Project/ProjectArchiveRestoreButton.vue
@@ -14,15 +14,7 @@
:confirm-description="$t('project.settings.archive.description')"
:require-confirm="true"
@confirm="archiveOrRestoreProject(true)"
- >
- <div class="mt-3">
- <NCheckbox v-model:checked="force">
- <div class="text-sm font-normal text-control-light">
- {{ $t("instance.force-archive-description") }}
- </div>
- </NCheckbox>
- </div>
- </BBButtonConfirm>
+ />
</template>
<template v-else-if="project.state === State.DELETED">
<BBButtonConfirm
@@ -42,8 +34,7 @@
</template>
<script setup lang="ts">
-import { NCheckbox } from "naive-ui";
-import { computed, ref } from "vue";
+import { computed } from "vue";
import { useRouter } from "vue-router";
import { BBButtonConfirm } from "@/bbkit";
import ResourceHardDeleteButton from "@/components/v2/Button/ResourceHardDeleteButton.vue";
@@ -60,7 +51,6 @@ const props = defineProps<{
const projectV1Store = useProjectV1Store();
const router = useRouter();
-const force = ref(false);
const allowArchiveOrRestore = computed(() => {
if (props.project.state === State.ACTIVE) {
@@ -71,7 +61,7 @@ const allowArchiveOrRestore = computed(() => {
const archiveOrRestoreProject = async (archive: boolean) => {
if (archive) {
- await projectV1Store.archiveProject(props.project, force.value);
+ await projectV1Store.archiveProject(props.project);
} else {
await projectV1Store.restoreProject(props.project);
}
diff --git a/frontend/src/components/ProjectSettingPanel.vue b/frontend/src/components/ProjectSettingPanel.vue
index 6d0c7584f5..edd4e72dd1 100644
--- a/frontend/src/components/ProjectSettingPanel.vue
+++ b/frontend/src/components/ProjectSettingPanel.vue
@@ -59,8 +59,86 @@
</div>
</div>
- <div class="py-6">
- <ProjectArchiveRestoreButton :project="project" />
+ <div class="py-6 lg:flex">
+ <div class="text-left lg:w-1/4">
+ <div class="flex items-center gap-x-2">
+ <h1 class="text-2xl font-bold">
+ {{ $t("common.danger-zone") }}
+ </h1>
+ </div>
+ </div>
+ <div class="flex-1 mt-4 lg:px-4 lg:mt-0">
+ <div class="border border-error-alpha bg-error-alpha rounded-lg divide-y divide-error-alpha">
+ <!-- Archive/Restore Section -->
+ <div class="p-6 flex items-start justify-between gap-x-6">
+ <template v-if="project.state === State.ACTIVE">
+ <div class="flex-1">
+ <h4 class="font-medium text-main">
+ {{ $t('common.archive-resource', { type: $t('common.project') }) }}
+ </h4>
+ <p class="text-sm text-control-light mt-1">
+ {{ $t('common.archive-description', { name: project.title || project.name }) }}
+ </p>
+ </div>
+ <BBButtonConfirm
+ type="ARCHIVE"
+ :button-text="$t('common.archive')"
+ :confirm-title="$t('common.confirm-archive')"
+ :confirm-description="
+ $t('project.settings.confirm-archive-project', { name: project.title || project.name })
+ "
+ :require-confirm="true"
+ :disabled="dangerZoneState.isExecuting"
+ @confirm="handleArchive"
+ />
+ </template>
+ <template v-else-if="project.state === State.DELETED">
+ <div class="flex-1">
+ <h4 class="font-medium text-main">
+ {{ $t('project.settings.restore.title') }}
+ </h4>
+ <p class="text-sm text-control-light mt-1">
+ {{ $t('project.settings.restore.btn-text') }}
+ </p>
+ </div>
+ <BBButtonConfirm
+ type="RESTORE"
+ :button-text="$t('common.restore')"
+ :confirm-title="$t('project.settings.restore.title')"
+ :confirm-description="
+ $t('project.settings.restore.title') + ` '${project.title || project.name}'?`
+ "
+ :require-confirm="true"
+ :disabled="dangerZoneState.isExecuting"
+ @confirm="handleRestore"
+ />
+ </template>
+ </div>
+
+ <!-- Delete Section -->
+ <div class="p-6 flex items-start justify-between gap-x-6">
+ <div class="flex-1">
+ <h4 class="font-medium text-error">
+ {{ $t('common.delete-resource', { type: $t('common.project') }) }}
+ </h4>
+ <p class="text-sm text-control-light mt-1">
+ {{ $t('common.delete-resource-description', { name: project.title || project.name }) }}
+ </p>
+ </div>
+ <BBButtonConfirm
+ type="DELETE"
+ :button-text="$t('common.delete')"
+ :confirm-title="$t('common.confirm-delete')"
+ :confirm-description="
+ $t('project.settings.confirm-delete-project', { name: project.title || project.name })
+ "
+ :require-confirm="true"
+ :disabled="dangerZoneState.isExecuting"
+ @confirm="handleDelete"
+ />
+ </div>
+ </div>
+ </div>
</div>
<!-- Save/Cancel buttons -->
@@ -82,26 +160,35 @@
<script lang="ts" setup>
import { NButton } from "naive-ui";
-import { computed, ref } from "vue";
+import { computed, reactive, ref } from "vue";
import { useI18n } from "vue-i18n";
+import { useRouter } from "vue-router";
+import { BBButtonConfirm } from "@/bbkit";
import ComponentPermissionGuard from "@/components/Permission/ComponentPermissionGuard.vue";
import PermissionGuardWrapper from "@/components/Permission/PermissionGuardWrapper.vue";
import { useRouteChangeGuard } from "@/composables/useRouteChangeGuard";
-import { pushNotification } from "@/store";
+import { PROJECT_V1_ROUTE_DASHBOARD } from "@/router/dashboard/workspaceRoutes";
+import {
+ pushNotification,
+ useGracefulRequest,
+ useProjectV1Store,
+} from "@/store";
+import { State } from "@/types/proto-es/v1/common_pb";
import type { Project } from "@/types/proto-es/v1/project_service_pb";
-import ProjectArchiveRestoreButton from "./Project/ProjectArchiveRestoreButton.vue";
import {
ProjectGeneralSettingPanel,
ProjectIssueRelatedSettingPanel,
ProjectSecuritySettingPanel,
} from "./Project/Settings/";
-defineProps<{
+const props = defineProps<{
project: Project;
allowEdit: boolean;
}>();
const { t } = useI18n();
+const router = useRouter();
+const projectStore = useProjectV1Store();
const projectSecuritySettingPanelRef =
ref<InstanceType<typeof ProjectSecuritySettingPanel>>();
@@ -152,4 +239,59 @@ const onRevert = () => {
settingRef.value?.revert();
}
};
+
+const dangerZoneState = reactive({
+ isExecuting: false,
+});
+
+const handleArchive = () => {
+ dangerZoneState.isExecuting = true;
+ useGracefulRequest(async () => {
+ try {
+ await projectStore.archiveProject(props.project);
+ pushNotification({
+ module: "bytebase",
+ style: "SUCCESS",
+ title: `${props.project.title || props.project.name} ${t("common.archived")}`,
+ });
+ router.push({ name: PROJECT_V1_ROUTE_DASHBOARD });
+ } finally {
+ dangerZoneState.isExecuting = false;
+ }
+ });
+};
+
+const handleRestore = () => {
+ dangerZoneState.isExecuting = true;
+ useGracefulRequest(async () => {
+ try {
+ await projectStore.restoreProject(props.project);
+ pushNotification({
+ module: "bytebase",
+ style: "SUCCESS",
+ title: `${props.project.title || props.project.name} ${t("common.restored")}`,
+ });
+ router.push({ name: PROJECT_V1_ROUTE_DASHBOARD });
+ } finally {
+ dangerZoneState.isExecuting = false;
+ }
+ });
+};
+
+const handleDelete = () => {
+ dangerZoneState.isExecuting = true;
+ useGracefulRequest(async () => {
+ try {
+ await projectStore.deleteProject(props.project.name);
+ pushNotification({
+ module: "bytebase",
+ style: "SUCCESS",
+ title: `${props.project.title || props.project.name} ${t("common.deleted")}`,
+ });
+ router.push({ name: PROJECT_V1_ROUTE_DASHBOARD });
+ } finally {
+ dangerZoneState.isExecuting = false;
+ }
+ });
+};
</script>
diff --git a/frontend/src/components/v2/Model/Project/ProjectOperations.vue b/frontend/src/components/v2/Model/Project/ProjectOperations.vue
index ce84544b93..7aff13e9fe 100644
--- a/frontend/src/components/v2/Model/Project/ProjectOperations.vue
+++ b/frontend/src/components/v2/Model/Project/ProjectOperations.vue
@@ -35,15 +35,8 @@
@ok="handleBatchArchive"
@cancel="state.showArchiveConfirm = false"
>
- <!-- Force Archive Option -->
+ <!-- Project List -->
<div class="flex flex-col gap-y-3">
- <NCheckbox v-model:checked="state.force">
- <div class="text-sm font-normal text-control-light">
- {{ $t("project.batch.force-archive-description") }}
- </div>
- </NCheckbox>
-
- <!-- Project List -->
<div class="max-h-40 overflow-y-auto border rounded-sm p-2 bg-gray-50">
<div class="text-xs font-medium text-gray-600 mb-2">
{{ $t("project.batch.projects-to-archive") }}:
@@ -89,7 +82,7 @@
<script setup lang="tsx">
import { ArchiveIcon, CheckIcon } from "lucide-vue-next";
-import { NAlert, NButton, NCheckbox } from "naive-ui";
+import { NAlert, NButton } from "naive-ui";
import type { VNode } from "vue";
import { computed, h, reactive } from "vue";
import { useI18n } from "vue-i18n";
@@ -109,7 +102,6 @@ interface Action {
interface LocalState {
loading: boolean;
showArchiveConfirm: boolean;
- force: boolean;
}
const props = defineProps<{
@@ -125,7 +117,6 @@ const projectStore = useProjectV1Store();
const state = reactive<LocalState>({
loading: false,
showArchiveConfirm: false,
- force: false,
});
// For now, we'll assume no projects have resources - this would need to be enhanced
@@ -159,8 +150,7 @@ const handleBatchArchive = async () => {
// Use the batch delete API
await projectStore.batchDeleteProjects(
- props.projectList.map((p) => p.name),
- state.force
+ props.projectList.map((p) => p.name)
);
pushNotification({
@@ -172,7 +162,6 @@ const handleBatchArchive = async () => {
});
state.showArchiveConfirm = false;
- state.force = false;
emit("update");
} catch (error: unknown) {
const err = error as { message?: string };
diff --git a/frontend/src/locales/en-US.json b/frontend/src/locales/en-US.json
index 38499ceeaa..9bc92888c4 100644
--- a/frontend/src/locales/en-US.json
+++ b/frontend/src/locales/en-US.json
@@ -41,6 +41,7 @@
"environment-name": "Environment Name",
"archive": "Archive",
"archived": "Archived",
+ "restored": "Restored",
"no-license": "No license",
"logout": "Logout",
"close": "Close",
@@ -221,6 +222,13 @@
"connection": "Connection",
"resource": "Resource",
"resources": "Resources",
+ "danger-zone": "Danger Zone",
+ "archive-resource": "Archive {type}",
+ "delete-resource": "Delete {type}",
+ "confirm-archive": "Archive Resource?",
+ "confirm-delete": "Delete Resource?",
+ "archive-description": "Mark \"{name}\" as archived and read-only.",
+ "delete-resource-description": "Once you delete \"{name}\", there is no going back. Please be certain.",
"closed": "Closed",
"refresh": "Refresh",
"reject": "Reject",
@@ -1863,6 +1871,8 @@
"title": "Restore project",
"btn-text": "Restore this @.lower:{'common.project'}"
},
+ "confirm-archive-project": "Archiving \"{name}\" will make it read-only and hide it from active project lists. All issues, databases, and settings will be preserved. You can restore it later from the archived projects list.",
+ "confirm-delete-project": "Deleting \"{name}\" will permanently remove the project and all associated data including issues, configurations, and history. All databases in this project will be moved to the default project. This action cannot be undone.",
"issue-related": {
"self": "Issue Related",
"labels": {
@@ -1960,7 +1970,6 @@
"success": "Successfully archived {count} project | Successfully archived {count} projects",
"error": "Failed to archive projects"
},
- "force-archive-description": "Force archive even if projects have databases (databases will be moved to default project)",
"projects-to-archive": "Projects to archive",
"resource-warning": {
"title": "Projects with Resources",
diff --git a/frontend/src/locales/es-ES.json b/frontend/src/locales/es-ES.json
index 6d4a94c064..a3f994dd43 100644
--- a/frontend/src/locales/es-ES.json
+++ b/frontend/src/locales/es-ES.json
@@ -41,6 +41,7 @@
"environment-name": "Nombre del entorno",
"archive": "Archivo",
"archived": "Archivada",
+ "restored": "Restored",
"no-license": "Sin licencia",
"logout": "Cerrar sesión",
"close": "Cerrar",
@@ -254,7 +255,14 @@
"line": "Línea",
"column": "Columna",
"apply-to-database": "Aplicar a la base de datos",
- "unlimited": "Ilimitado"
+ "unlimited": "Ilimitado",
+ "danger-zone": "Danger Zone",
+ "archive-resource": "Archive {type}",
+ "delete-resource": "Delete {type}",
+ "confirm-archive": "Archive Resource?",
+ "confirm-delete": "Delete Resource?",
+ "archive-description": "Mark \"{name}\" as archived and read-only.",
+ "delete-resource-description": "Once you delete \"{name}\", there is no going back. Please be certain."
},
"error-page": {
"go-back-home": "Volver al inicio"
@@ -1928,7 +1936,9 @@
"project-labels": {
"self": "Etiquetas de proyecto",
"description": "Organizar proyectos con etiquetas clave-valor (máximo 64)"
- }
+ },
+ "confirm-archive-project": "Archiving \"{name}\" will make it read-only and hide it from active project lists. All issues, databases, and settings will be preserved. You can restore it later from the archived projects list.",
+ "confirm-delete-project": "Deleting \"{name}\" will permanently remove the project and all associated data including issues, configurations, and history. All databases in this project will be moved to the default project. This action cannot be undone."
},
"members": {
"description": "Los miembros del proyecto determinan el permiso para operar la base de datos y los problemas dentro del proyecto. El propietario del proyecto, el administrador del espacio de trabajo y el DBA del espacio de trabajo tienen permisos completos para el proyecto.",
@@ -1960,7 +1970,6 @@
"success": "Proyecto {count} archivado correctamente | Proyectos {count} archivados correctamente",
"error": "No se pudieron archivar los proyectos"
},
- "force-archive-description": "Forzar el archivo incluso si los proyectos tienen bases de datos (las bases de datos se moverán al proyecto predeterminado)",
"projects-to-archive": "Proyectos para archivar",
"resource-warning": {
"title": "Proyectos con recursos",
diff --git a/frontend/src/locales/ja-JP.json b/frontend/src/locales/ja-JP.json
index d4f4ee59a8..350db4ae58 100644
--- a/frontend/src/locales/ja-JP.json
+++ b/frontend/src/locales/ja-JP.json
@@ -41,6 +41,7 @@
"environment-name": "環境名",
"archive": "アーカイブ",
"archived": "アーカイブ済み",
+ "restored": "Restored",
"no-license": "ライセンスがありません",
"logout": "サインアウト",
"close": "閉じる",
@@ -254,7 +255,14 @@
"line": "行",
"column": "列",
"apply-to-database": "データベースに適用",
- "unlimited": "無制限"
+ "unlimited": "無制限",
+ "danger-zone": "Danger Zone",
+ "archive-resource": "Archive {type}",
+ "delete-resource": "Delete {type}",
+ "confirm-archive": "Archive Resource?",
+ "confirm-delete": "Delete Resource?",
+ "archive-description": "Mark \"{name}\" as archived and read-only.",
+ "delete-resource-description": "Once you delete \"{name}\", there is no going back. Please be certain."
},
"error-page": {
"go-back-home": "ホームページに戻る"
@@ -1928,7 +1936,9 @@
"project-labels": {
"self": "プロジェクトラベル",
"description": "キーバリューラベルでプロジェクトを整理(最大64個)"
- }
+ },
+ "confirm-archive-project": "Archiving \"{name}\" will make it read-only and hide it from active project lists. All issues, databases, and settings will be preserved. You can restore it later from the archived projects list.",
+ "confirm-delete-project": "Deleting \"{name}\" will permanently remove the project and all associated data including issues, configurations, and history. All databases in this project will be moved to the default project. This action cannot be undone."
},
"members": {
"description": "プロジェクト メンバーの役割により、プロジェクト内のデータベースとイシューを操作するための権限が決まります。プロジェクト所有者、ワークスペース管理者、および DBA はすべて、プロジェクトに対する完全な権限を持っています。",
@@ -1960,7 +1970,6 @@
"success": "{count} 件のプロジェクトを正常にアーカイブしました | {count} 件のプロジェクトを正常にアーカイブしました",
"error": "プロジェクトをアーカイブできませんでした"
},
- "force-archive-description": "プロジェクトにデータベースがある場合でも強制的にアーカイブします (データベースはデフォルトのプロジェクトに移動されます)",
"projects-to-archive": "アーカイブするプロジェクト",
"resource-warning": {
"title": "リソースのあるプロジェクト",
diff --git a/frontend/src/locales/vi-VN.json b/frontend/src/locales/vi-VN.json
index 1fe728006c..07a443544a 100644
--- a/frontend/src/locales/vi-VN.json
+++ b/frontend/src/locales/vi-VN.json
@@ -41,6 +41,7 @@
"environment-name": "Tên môi trường",
"archive": "Lưu trữ",
"archived": "Đã lưu trữ",
+ "restored": "Restored",
"no-license": "Không có giấy phép",
"logout": "Đăng xuất",
"close": "Đóng",
@@ -254,7 +255,14 @@
"line": "Dòng",
"column": "Cột",
"apply-to-database": "Áp dụng cho cơ sở dữ liệu",
- "unlimited": "Không giới hạn"
+ "unlimited": "Không giới hạn",
+ "danger-zone": "Danger Zone",
+ "archive-resource": "Archive {type}",
+ "delete-resource": "Delete {type}",
+ "confirm-archive": "Archive Resource?",
+ "confirm-delete": "Delete Resource?",
+ "archive-description": "Mark \"{name}\" as archived and read-only.",
+ "delete-resource-description": "Once you delete \"{name}\", there is no going back. Please be certain."
},
"error-page": {
"go-back-home": "Về trang chủ"
@@ -1928,7 +1936,9 @@
"project-labels": {
"self": "Nhãn dự án",
"description": "Tổ chức dự án với nhãn khóa-giá trị (tối đa 64)"
- }
+ },
+ "confirm-archive-project": "Archiving \"{name}\" will make it read-only and hide it from active project lists. All issues, databases, and settings will be preserved. You can restore it later from the archived projects list.",
+ "confirm-delete-project": "Deleting \"{name}\" will permanently remove the project and all associated data including issues, configurations, and history. All databases in this project will be moved to the default project. This action cannot be undone."
},
"members": {
"description": "Thành viên dự án xác định quyền để vận hành cơ sở dữ liệu và các vấn đề bên trong dự án. Chủ sở hữu dự án, Quản trị viên không gian làm việc và DBA không gian làm việc đều có toàn quyền dự án.",
@@ -1960,7 +1970,6 @@
"success": "Đã lưu trữ thành công {count} dự án | Đã lưu trữ thành công {count} dự án",
"error": "Không lưu trữ được dự án"
},
- "force-archive-description": "Buộc lưu trữ ngay cả khi dự án có cơ sở dữ liệu (cơ sở dữ liệu sẽ được chuyển đến dự án mặc định)",
"projects-to-archive": "Dự án để lưu trữ",
"resource-warning": {
"title": "Dự án có nguồn lực",
diff --git a/frontend/src/locales/zh-CN.json b/frontend/src/locales/zh-CN.json
index 80e6f19b27..8f2b9aa2ac 100644
--- a/frontend/src/locales/zh-CN.json
+++ b/frontend/src/locales/zh-CN.json
@@ -41,6 +41,7 @@
"environment-name": "环境名",
"archive": "归档",
"archived": "已归档",
+ "restored": "Restored",
"no-license": "无证书",
"logout": "登出",
"close": "关闭",
@@ -254,7 +255,14 @@
"line": "行",
"column": "列",
"apply-to-database": "应用到数据库",
- "unlimited": "无限制"
+ "unlimited": "无限制",
+ "danger-zone": "Danger Zone",
+ "archive-resource": "Archive {type}",
+ "delete-resource": "Delete {type}",
+ "confirm-archive": "Archive Resource?",
+ "confirm-delete": "Delete Resource?",
+ "archive-description": "Mark \"{name}\" as archived and read-only.",
+ "delete-resource-description": "Once you delete \"{name}\", there is no going back. Please be certain."
},
"error-page": {
"go-back-home": "回到主页"
@@ -1928,7 +1936,9 @@
"project-labels": {
"self": "项目标签",
"description": "用键值标签组织项目(最多64个)"
- }
+ },
+ "confirm-archive-project": "Archiving \"{name}\" will make it read-only and hide it from active project lists. All issues, databases, and settings will be preserved. You can restore it later from the archived projects list.",
+ "confirm-delete-project": "Deleting \"{name}\" will permanently remove the project and all associated data including issues, configurations, and history. All databases in this project will be moved to the default project. This action cannot be undone."
},
"members": {
"description": "项目成员角色决定了操作项目中的数据库和工单的权限。项目的所有者,工作空间管理员和 DBA 都具有项目所有的权限。",
@@ -1960,7 +1970,6 @@
"success": "成功归档 {count} 个项目 | 成功归档 {count} 个项目",
"error": "无法存档项目"
},
- "force-archive-description": "即使项目有数据库也强制存档(数据库将被移动到默认项目)",
"projects-to-archive": "要存档的项目",
"resource-warning": {
"title": "项目与资源",
diff --git a/frontend/src/store/modules/v1/project.ts b/frontend/src/store/modules/v1/project.ts
index c88af7b765..17eec09dd3 100644
--- a/frontend/src/store/modules/v1/project.ts
+++ b/frontend/src/store/modules/v1/project.ts
@@ -261,10 +261,10 @@ export const useProjectV1Store = defineStore("project_v1", () => {
upsertProjectsCache([project]);
return response;
};
- const archiveProject = async (project: Project, force = false) => {
+ const archiveProject = async (project: Project) => {
const request = create(DeleteProjectRequestSchema, {
name: project.name,
- force,
+ purge: false,
});
await projectServiceClientConnect.deleteProject(request);
project.state = State.DELETED;
@@ -278,10 +278,10 @@ export const useProjectV1Store = defineStore("project_v1", () => {
await projectServiceClientConnect.deleteProject(request);
projectMapByName.delete(project);
};
- const batchDeleteProjects = async (projectNames: string[], force = false) => {
+ const batchDeleteProjects = async (projectNames: string[]) => {
const request = create(BatchDeleteProjectsRequestSchema, {
names: projectNames,
- force,
+ purge: false,
});
await projectServiceClientConnect.batchDeleteProjects(request);
// Update local cache - mark all projects as deleted
diff --git a/frontend/src/types/proto-es/v1/project_service_pb.d.ts b/frontend/src/types/proto-es/v1/project_service_pb.d.ts
index 63d706cd10..5d34e376a8 100644
--- a/frontend/src/types/proto-es/v1/project_service_pb.d.ts
+++ b/frontend/src/types/proto-es/v1/project_service_pb.d.ts
@@ -339,23 +339,15 @@ export declare type DeleteProjectRequest = Message<"bytebase.v1.DeleteProjectReq
*/
name: string;
- /**
- * If set to true, any databases from this project will be moved to default project.
- * Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
- * Open issues will remain open but associated with the deleted project.
- * If set to false, the operation will fail if the project has databases or open issues.
- *
- * @generated from field: bool force = 2;
- */
- force: boolean;
-
/**
* If set to true, permanently purge the soft-deleted project and all related resources.
* This operation is irreversible. Following AIP-165, this should only be used for
* administrative cleanup of old soft-deleted projects.
* The project must already be soft-deleted for this to work.
+ * When purge=true, all databases will be moved to the default project before deletion.
+ * When purge=false (soft delete/archive), the project and its databases/issues remain unchanged.
*
- * @generated from field: bool purge = 3;
+ * @generated from field: bool purge = 2;
*/
purge: boolean;
};
@@ -398,14 +390,16 @@ export declare type BatchDeleteProjectsRequest = Message<"bytebase.v1.BatchDelet
names: string[];
/**
- * If set to true, any databases from this project will be moved to default project.
- * Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
- * Open issues will remain open but associated with the deleted project.
- * If set to false, the operation will fail if the project has databases or open issues.
+ * If set to true, permanently purge the soft-deleted projects and all related resources.
+ * This operation is irreversible. Following AIP-165, this should only be used for
+ * administrative cleanup of old soft-deleted projects.
+ * All projects must already be soft-deleted for this to work.
+ * When purge=true, all databases will be moved to the default project before deletion.
+ * When purge=false (soft delete/archive), the projects and their databases/issues remain unchanged.
*
- * @generated from field: bool force = 2;
+ * @generated from field: bool purge = 2;
*/
- force: boolean;
+ purge: boolean;
};
/**
diff --git a/frontend/src/types/proto-es/v1/project_service_pb.js b/frontend/src/types/proto-es/v1/project_service_pb.js
index af1c4c034b..0a9eba6061 100644
--- a/frontend/src/types/proto-es/v1/project_service_pb.js
+++ b/frontend/src/types/proto-es/v1/project_service_pb.js
@@ -17,7 +17,7 @@ import { file_v1_iam_policy } from "./iam_policy_pb";
* Describ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Qid9pBE3dlYmhvb2ssdXBkYXRlX21hc2uK6jASYmIucHJvamVjdHMudXBkYXRlkOowAYLT5JMCQToHd2ViaG9vazI2L3YxL3t3ZWJob29rLm5hbWU9cHJvamVjdHMvKi93ZWJob29rcy8qfTp1cGRhdGVXZWJob29rEqUBCg1SZW1vdmVXZWJob29rEiEuYnl0ZWJhc2UudjEuUmVtb3ZlV2ViaG9va1JlcXVlc3QaFC5ieXRlYmFzZS52MS5Qcm9qZWN0IluK6jASYmIucHJvamVjdHMudXBkYXRlkOowAYLT5JMCOzoBKiI2L3YxL3t3ZWJob29rLm5hbWU9cHJvamVjdHMvKi93ZWJob29rcy8qfTpyZW1vdmVXZWJob29rEpsBCgtUZXN0V2ViaG9vaxIfLmJ5dGViYXNlLnYxLlRlc3RXZWJob29rUmVxdWVzdBogLmJ5dGViYXNlLnYxLlRlc3RXZWJob29rUmVzcG9uc2UiSYrqMBJiYi5wcm9qZWN0cy51cGRhdGWQ6jABgtPkkwIpOgEqIiQvdjEve3Byb2plY3Q9cHJvamVjdHMvKn06dGVzdFdlYmhvb2tCqQEKD2NvbS5ieXRlYmFzZS52MUITUHJvamVjdFNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_v1_annotation, file_v1_common, file_v1_iam_policy]);
+ fileDesc("Chh2MS9wcm9qZWN0X3NlcnZpY2UucHJvdG8SC2J5dGViYXNlLnYxIj8KEUdldFByb2plY3RSZXF1ZXN0EioKBG5hbWUYASABKAlCHOBBAvpBFgoUYnl0ZWJhc2UuY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c2UudjEuUmVtb3ZlV2ViaG9va1JlcXVlc3QaFC5ieXRlYmFzZS52MS5Qcm9qZWN0IluK6jASYmIucHJvamVjdHMudXBkYXRlkOowAYLT5JMCOzoBKiI2L3YxL3t3ZWJob29rLm5hbWU9cHJvamVjdHMvKi93ZWJob29rcy8qfTpyZW1vdmVXZWJob29rEpsBCgtUZXN0V2ViaG9vaxIfLmJ5dGViYXNlLnYxLlRlc3RXZWJob29rUmVxdWVzdBogLmJ5dGViYXNlLnYxLlRlc3RXZWJob29rUmVzcG9uc2UiSYrqMBJiYi5wcm9qZWN0cy51cGRhdGWQ6jABgtPkkwIpOgEqIiQvdjEve3Byb2plY3Q9cHJvamVjdHMvKn06dGVzdFdlYmhvb2tCqQEKD2NvbS5ieXRlYmFzZS52MUITUHJvamVjdFNlcnZpY2VQcm90b1ABWjRnaXRodWIuY29tL2J5dGViYXNlL2J5dGViYXNlL2JhY2tlbmQvZ2VuZXJhdGVkLWdvL3YxogIDQlhYqgILQnl0ZWJhc2UuVjHKAgtCeXRlYmFzZVxWMeICF0J5dGViYXNlXFYxXEdQQk1ldGFkYXRh6gIMQnl0ZWJhc2U6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_v1_annotation, file_v1_common, file_v1_iam_policy]);
/**
* Describes the message bytebase.v1.GetProjectRequest.
diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yaml
index 472f2389fc..732f4dea65 100644
--- a/proto/gen/grpc-doc/openapi.yaml
+++ b/proto/gen/grpc-doc/openapi.yaml
@@ -5115,21 +5115,6 @@ paths:
required: true
schema:
type: string
- - name: force
- in: query
- description: |-
- If set to true, any databases from this project will be moved to default project.
- Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
- Open issues will remain open but associated with the deleted project.
- If set to false, the operation will fail if the project has databases or open issues.
- schema:
- type: boolean
- title: force
- description: |-
- If set to true, any databases from this project will be moved to default project.
- Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
- Open issues will remain open but associated with the deleted project.
- If set to false, the operation will fail if the project has databases or open issues.
- name: purge
in: query
description: |-
@@ -5137,6 +5122,8 @@ paths:
This operation is irreversible. Following AIP-165, this should only be used for
administrative cleanup of old soft-deleted projects.
The project must already be soft-deleted for this to work.
+ When purge=true, all databases will be moved to the default project before deletion.
+ When purge=false (soft delete/archive), the project and its databases/issues remain unchanged.
schema:
type: boolean
title: purge
@@ -5145,6 +5132,8 @@ paths:
This operation is irreversible. Following AIP-165, this should only be used for
administrative cleanup of old soft-deleted projects.
The project must already be soft-deleted for this to work.
+ When purge=true, all databases will be moved to the default project before deletion.
+ When purge=false (soft delete/archive), the project and its databases/issues remain unchanged.
responses:
"200":
description: Success
@@ -10719,14 +10708,16 @@ components:
description: |-
The names of the projects to delete.
Format: projects/{project}
- force:
+ purge:
type: boolean
- title: force
+ title: purge
description: |-
- If set to true, any databases from this project will be moved to default project.
- Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
- Open issues will remain open but associated with the deleted project.
- If set to false, the operation will fail if the project has databases or open issues.
+ If set to true, permanently purge the soft-deleted projects and all related resources.
+ This operation is irreversible. Following AIP-165, this should only be used for
+ administrative cleanup of old soft-deleted projects.
+ All projects must already be soft-deleted for this to work.
+ When purge=true, all databases will be moved to the default project before deletion.
+ When purge=false (soft delete/archive), the projects and their databases/issues remain unchanged.
title: BatchDeleteProjectsRequest
required:
- names
@@ -12709,14 +12700,6 @@ components:
description: |-
The name of the project to delete.
Format: projects/{project}
- force:
- type: boolean
- title: force
- description: |-
- If set to true, any databases from this project will be moved to default project.
- Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
- Open issues will remain open but associated with the deleted project.
- If set to false, the operation will fail if the project has databases or open issues.
purge:
type: boolean
title: purge
@@ -12725,6 +12708,8 @@ components:
This operation is irreversible. Following AIP-165, this should only be used for
administrative cleanup of old soft-deleted projects.
The project must already be soft-deleted for this to work.
+ When purge=true, all databases will be moved to the default project before deletion.
+ When purge=false (soft delete/archive), the project and its databases/issues remain unchanged.
title: DeleteProjectRequest
required:
- name
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 39085da1cc..76b7ba9170 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -7095,7 +7095,7 @@ Activity types for webhook notifications.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| names | [string](#string) | repeated | The names of the projects to delete. Format: projects/{project} |
-| force | [bool](#bool) | | If set to true, any databases from this project will be moved to default project. Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project. Open issues will remain open but associated with the deleted project. If set to false, the operation will fail if the project has databases or open issues. |
+| purge | [bool](#bool) | | If set to true, permanently purge the soft-deleted projects and all related resources. This operation is irreversible. Following AIP-165, this should only be used for administrative cleanup of old soft-deleted projects. All projects must already be soft-deleted for this to work. When purge=true, all databases will be moved to the default project before deletion. When purge=false (soft delete/archive), the projects and their databases/issues remain unchanged. |
@@ -7159,8 +7159,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 project to delete. Format: projects/{project} |
-| force | [bool](#bool) | | If set to true, any databases from this project will be moved to default project. Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project. Open issues will remain open but associated with the deleted project. If set to false, the operation will fail if the project has databases or open issues. |
-| purge | [bool](#bool) | | If set to true, permanently purge the soft-deleted project and all related resources. This operation is irreversible. Following AIP-165, this should only be used for administrative cleanup of old soft-deleted projects. The project must already be soft-deleted for this to work. |
+| purge | [bool](#bool) | | If set to true, permanently purge the soft-deleted project and all related resources. This operation is irreversible. Following AIP-165, this should only be used for administrative cleanup of old soft-deleted projects. The project must already be soft-deleted for this to work. When purge=true, all databases will be moved to the default project before deletion. When purge=false (soft delete/archive), the project and its databases/issues remain unchanged. |
diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.html
index d44c9983e3..e123ecf681 100644
--- a/proto/gen/grpc-doc/v1/index.html
+++ b/proto/gen/grpc-doc/v1/index.html
@@ -20353,13 +20353,15 @@ Format: projects/{project} </p></td>
</tr>
<tr>
- <td>force</td>
+ <td>purge</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>If set to true, any databases from this project will be moved to default project.
-Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
-Open issues will remain open but associated with the deleted project.
-If set to false, the operation will fail if the project has databases or open issues. </p></td>
+ <td><p>If set to true, permanently purge the soft-deleted projects and all related resources.
+This operation is irreversible. Following AIP-165, this should only be used for
+administrative cleanup of old soft-deleted projects.
+All projects must already be soft-deleted for this to work.
+When purge=true, all databases will be moved to the default project before deletion.
+When purge=false (soft delete/archive), the projects and their databases/issues remain unchanged. </p></td>
</tr>
</tbody>
@@ -20471,16 +20473,6 @@ are /[a-z][0-9]-/. </p></td>
Format: projects/{project} </p></td>
</tr>
- <tr>
- <td>force</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If set to true, any databases from this project will be moved to default project.
-Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
-Open issues will remain open but associated with the deleted project.
-If set to false, the operation will fail if the project has databases or open issues. </p></td>
- </tr>
-
<tr>
<td>purge</td>
<td><a href="#bool">bool</a></td>
@@ -20488,7 +20480,9 @@ If set to false, the operation will fail if the project has databases or open is
<td><p>If set to true, permanently purge the soft-deleted project and all related resources.
This operation is irreversible. Following AIP-165, this should only be used for
administrative cleanup of old soft-deleted projects.
-The project must already be soft-deleted for this to work. </p></td>
+The project must already be soft-deleted for this to work.
+When purge=true, all databases will be moved to the default project before deletion.
+When purge=false (soft delete/archive), the project and its databases/issues remain unchanged. </p></td>
</tr>
</tbody>
diff --git a/proto/v1/v1/project_service.proto b/proto/v1/v1/project_service.proto
index 65c372f856..897e3a397d 100644
--- a/proto/v1/v1/project_service.proto
+++ b/proto/v1/v1/project_service.proto
@@ -339,17 +339,13 @@ message DeleteProjectRequest {
(google.api.resource_reference) = {type: "bytebase.com/Project"}
];
- // If set to true, any databases from this project will be moved to default project.
- // Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
- // Open issues will remain open but associated with the deleted project.
- // If set to false, the operation will fail if the project has databases or open issues.
- bool force = 2;
-
// If set to true, permanently purge the soft-deleted project and all related resources.
// This operation is irreversible. Following AIP-165, this should only be used for
// administrative cleanup of old soft-deleted projects.
// The project must already be soft-deleted for this to work.
- bool purge = 3;
+ // When purge=true, all databases will be moved to the default project before deletion.
+ // When purge=false (soft delete/archive), the project and its databases/issues remain unchanged.
+ bool purge = 2;
}
message UndeleteProjectRequest {
@@ -369,11 +365,13 @@ message BatchDeleteProjectsRequest {
(google.api.resource_reference) = {type: "bytebase.com/Project"}
];
- // If set to true, any databases from this project will be moved to default project.
- // Sheets are not moved since BYTEBASE_ARTIFACT sheets belong to the issue and issue project.
- // Open issues will remain open but associated with the deleted project.
- // If set to false, the operation will fail if the project has databases or open issues.
- bool force = 2;
+ // If set to true, permanently purge the soft-deleted projects and all related resources.
+ // This operation is irreversible. Following AIP-165, this should only be used for
+ // administrative cleanup of old soft-deleted projects.
+ // All projects must already be soft-deleted for this to work.
+ // When purge=true, all databases will be moved to the default project before deletion.
+ // When purge=false (soft delete/archive), the projects and their databases/issues remain unchanged.
+ bool purge = 2;
}
// A label for categorizing and organizing issues.