Skip to content

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

Enforce issue assignee to be non-null

天舟d4e82c9d5a8e
diff --git a/frontend/src/components/CreateDatabasePrepForm.vue b/frontend/src/components/CreateDatabasePrepForm.vue
index 1d8523b3f8..8d026aabf7 100644
--- a/frontend/src/components/CreateDatabasePrepForm.vue
+++ b/frontend/src/components/CreateDatabasePrepForm.vue
@@ -262,7 +262,7 @@ export default {
name: `Create database ${state.databaseName}`,
type: "bb.issue.database.create",
description: "",
- assigneeId: state.assigneeId,
+ assigneeId: state.assigneeId!,
projectId: state.projectId!,
pipeline: {
stageList: [
diff --git a/frontend/src/types/issue.ts b/frontend/src/types/issue.ts
index f1a11b1b79..81ed711f36 100644
--- a/frontend/src/types/issue.ts
+++ b/frontend/src/types/issue.ts
@@ -39,7 +39,7 @@ export type Issue = {
status: IssueStatus;
type: IssueType;
description: string;
- assignee?: Principal;
+ assignee: Principal;
subscriberIdList: PrincipalId[];
payload: IssuePayload;
};
@@ -53,7 +53,7 @@ export type IssueCreate = {
name: string;
type: IssueType;
description: string;
- assigneeId?: PrincipalId;
+ assigneeId: PrincipalId;
payload: IssuePayload;
};
diff --git a/store/migration/10001__init_schema.sql b/store/migration/10001__init_schema.sql
index f9d1f23c9c..efea7c9e44 100644
--- a/store/migration/10001__init_schema.sql
+++ b/store/migration/10001__init_schema.sql
@@ -735,7 +735,8 @@ CREATE TABLE issue (
`status` TEXT NOT NULL CHECK (`status` IN ('OPEN', 'DONE', 'CANCELED')),
`type` TEXT NOT NULL CHECK (`type` LIKE 'bb.issue.%'),
description TEXT NOT NULL DEFAULT '',
- assignee_id INTEGER REFERENCES principal (id),
+ -- we require an assignee, if user wants to unassign herself, she can re-assign to the system account.
+ assignee_id INTEGER NOT NULL REFERENCES principal (id),
payload TEXT NOT NULL DEFAULT ''
);