Skip to content

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

chore: remove unused `database-edit.proto` (#8358)

boojack2e8c2f233f7c
diff --git a/frontend/src/types/proto/v1/database_service.ts b/frontend/src/types/proto/v1/database_service.ts
index 0a8ae8f912..658da27d08 100644
--- a/frontend/src/types/proto/v1/database_service.ts
+++ b/frontend/src/types/proto/v1/database_service.ts
@@ -207,7 +207,7 @@ export interface DiffSchemaRequest {
/**
* The name of the database or change history.
* Format:
- * databse: instances/{instance}/databases/{database}
+ * database: instances/{instance}/databases/{database}
* change history: instances/{instance}/databases/{database}/changeHistories/{changeHistory}
*/
name: string;
diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.md
index 1add0d0af4..9734218f55 100644
--- a/proto/gen/grpc-doc/v1/README.md
+++ b/proto/gen/grpc-doc/v1/README.md
@@ -112,20 +112,6 @@
- [CelService](#bytebase-v1-CelService)
-- [v1/database_edit.proto](#v1_database_edit-proto)
- - [AddColumnContext](#bytebase-v1-AddColumnContext)
- - [AddForeignKeyContext](#bytebase-v1-AddForeignKeyContext)
- - [AlterColumnContext](#bytebase-v1-AlterColumnContext)
- - [AlterTableContext](#bytebase-v1-AlterTableContext)
- - [CreateSchemaContext](#bytebase-v1-CreateSchemaContext)
- - [CreateTableContext](#bytebase-v1-CreateTableContext)
- - [DatabaseEdit](#bytebase-v1-DatabaseEdit)
- - [DropColumnContext](#bytebase-v1-DropColumnContext)
- - [DropSchemaContext](#bytebase-v1-DropSchemaContext)
- - [DropTableContext](#bytebase-v1-DropTableContext)
- - [RenameSchemaContext](#bytebase-v1-RenameSchemaContext)
- - [RenameTableContext](#bytebase-v1-RenameTableContext)
-
- [v1/vcs.proto](#v1_vcs-proto)
- [Commit](#bytebase-v1-Commit)
- [FileCommit](#bytebase-v1-FileCommit)
@@ -2109,247 +2095,6 @@ When paginating, all other parameters provided to `ListBookmarks` must match the
-<a name="v1_database_edit-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-
-## v1/database_edit.proto
-
-
-
-<a name="bytebase-v1-AddColumnContext"></a>
-
-### AddColumnContext
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the column to add. |
-| type | [string](#string) | | The type of the column. |
-| character_set | [string](#string) | | The character set of the column. |
-| collation | [string](#string) | | The collation of the column. |
-| comment | [string](#string) | | The comment of the column. |
-| nullable | [bool](#bool) | | Whether the column is nullable. |
-| default_value | [string](#string) | | The default value of the column. |
-| has_default_value | [bool](#bool) | | Whether the column has a default value. |
-
-
-
-
-
-
-<a name="bytebase-v1-AddForeignKeyContext"></a>
-
-### AddForeignKeyContext
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| column | [string](#string) | | The column of the foreign key. |
-| referenced_schema | [string](#string) | | The referenced schema of the foreign key. |
-| referenced_table | [string](#string) | | The referenced table of the foreign key. |
-| referenced_column | [string](#string) | | The referenced column of the foreign key. |
-
-
-
-
-
-
-<a name="bytebase-v1-AlterColumnContext"></a>
-
-### AlterColumnContext
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| old_name | [string](#string) | | The old name of the column. |
-| new_name | [string](#string) | | The new name of the column. |
-| type | [string](#string) | | The type of the column. |
-| character_set | [string](#string) | | The character set of the column. |
-| collation | [string](#string) | | The collation of the column. |
-| comment | [string](#string) | | The comment of the column. |
-| nullable | [bool](#bool) | | Whether the column is nullable. |
-| default_value | [string](#string) | | The default value of the column. |
-| is_default_value_changed | [bool](#bool) | | Whether the default value of the column has changed. |
-
-
-
-
-
-
-<a name="bytebase-v1-AlterTableContext"></a>
-
-### AlterTableContext
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the table to alter. |
-| schema | [string](#string) | | The schema of the table. |
-| add_column_contexts | [AddColumnContext](#bytebase-v1-AddColumnContext) | repeated | List of column addition contexts. |
-| alter_column_contexts | [AlterColumnContext](#bytebase-v1-AlterColumnContext) | repeated | List of column alteration contexts. |
-| drop_column_contexts | [DropColumnContext](#bytebase-v1-DropColumnContext) | repeated | List of column dropping contexts. |
-| drop_primary_keys | [string](#string) | repeated | List of primary key columns to be dropped. |
-| primary_keys | [string](#string) | repeated | List of primary key columns. |
-| drop_foreign_keys | [string](#string) | repeated | List of foreign key columns to be dropped. |
-| add_foreign_key_contexts | [AddForeignKeyContext](#bytebase-v1-AddForeignKeyContext) | repeated | List of foreign key addition contexts. |
-
-
-
-
-
-
-<a name="bytebase-v1-CreateSchemaContext"></a>
-
-### CreateSchemaContext
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the schema to create. |
-
-
-
-
-
-
-<a name="bytebase-v1-CreateTableContext"></a>
-
-### CreateTableContext
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the table to create. |
-| schema | [string](#string) | | The schema of the table. |
-| type | [string](#string) | | The type of the table. |
-| engine | [string](#string) | | The engine of the table. |
-| character_set | [string](#string) | | The character set of the table. |
-| collation | [string](#string) | | The collation of the table. |
-| comment | [string](#string) | | The comment of the table. |
-| add_column_contexts | [AddColumnContext](#bytebase-v1-AddColumnContext) | repeated | List of column addition contexts. |
-| primary_keys | [string](#string) | repeated | List of primary key columns. |
-| add_foreign_key_contexts | [AddForeignKeyContext](#bytebase-v1-AddForeignKeyContext) | repeated | List of foreign key addition contexts. |
-
-
-
-
-
-
-<a name="bytebase-v1-DatabaseEdit"></a>
-
-### DatabaseEdit
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| create_schema_contexts | [CreateSchemaContext](#bytebase-v1-CreateSchemaContext) | repeated | List of schema creation contexts. |
-| rename_schema_contexts | [RenameSchemaContext](#bytebase-v1-RenameSchemaContext) | repeated | List of schema renaming contexts. |
-| drop_schema_contexts | [DropSchemaContext](#bytebase-v1-DropSchemaContext) | repeated | List of schema dropping contexts. |
-| create_table_contexts | [CreateTableContext](#bytebase-v1-CreateTableContext) | repeated | List of table creation contexts. |
-| alter_table_contexts | [AlterTableContext](#bytebase-v1-AlterTableContext) | repeated | List of table alteration contexts. |
-| rename_table_contexts | [RenameTableContext](#bytebase-v1-RenameTableContext) | repeated | List of table renaming contexts. |
-| drop_table_contexts | [DropTableContext](#bytebase-v1-DropTableContext) | repeated | List of table dropping contexts. |
-
-
-
-
-
-
-<a name="bytebase-v1-DropColumnContext"></a>
-
-### DropColumnContext
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the column to drop. |
-
-
-
-
-
-
-<a name="bytebase-v1-DropSchemaContext"></a>
-
-### DropSchemaContext
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the schema to drop. |
-
-
-
-
-
-
-<a name="bytebase-v1-DropTableContext"></a>
-
-### DropTableContext
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the table to drop. |
-| schema | [string](#string) | | The schema of the table. |
-
-
-
-
-
-
-<a name="bytebase-v1-RenameSchemaContext"></a>
-
-### RenameSchemaContext
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| old_name | [string](#string) | | The old name of the schema. |
-| new_name | [string](#string) | | The new name of the schema. |
-
-
-
-
-
-
-<a name="bytebase-v1-RenameTableContext"></a>
-
-### RenameTableContext
-
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| schema | [string](#string) | | The schema of the table. |
-| old_name | [string](#string) | | The old name of the table. |
-| new_name | [string](#string) | | The new name of the table. |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
<a name="v1_vcs-proto"></a>
<p align="right"><a href="#top">Top</a></p>
@@ -2811,7 +2556,7 @@ DependentColumn is the metadata for dependent columns.
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
-| name | [string](#string) | | The name of the database or change history. Format: databse: instances/{instance}/databases/{database} change history: instances/{instance}/databases/{database}/changeHistories/{changeHistory} |
+| name | [string](#string) | | The name of the database or change history. Format: database: instances/{instance}/databases/{database} change history: instances/{instance}/databases/{database}/changeHistories/{changeHistory} |
| schema | [string](#string) | | The target schema. |
| change_history | [string](#string) | | The resource name of the change history Format: instances/{instance}/databases/{database}/changeHistories/{changeHistory} |
diff --git a/proto/generated-go/v1/database_service.pb.go b/proto/generated-go/v1/database_service.pb.go
index 6b7d358f7b..06c9758753 100644
--- a/proto/generated-go/v1/database_service.pb.go
+++ b/proto/generated-go/v1/database_service.pb.go
@@ -1208,7 +1208,7 @@ type DiffSchemaRequest struct {
// The name of the database or change history.
// Format:
- // databse: instances/{instance}/databases/{database}
+ // database: instances/{instance}/databases/{database}
// change history: instances/{instance}/databases/{database}/changeHistories/{changeHistory}
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Types that are assignable to Target:
diff --git a/proto/v1/database_edit.proto b/proto/v1/database_edit.proto
deleted file mode 100644
index 0f0f6241a7..0000000000
--- a/proto/v1/database_edit.proto
+++ /dev/null
@@ -1,200 +0,0 @@
-syntax = "proto3";
-
-package bytebase.v1;
-
-option go_package = "generated-go/v1";
-
-message DatabaseEdit {
- // List of schema creation contexts.
- repeated CreateSchemaContext create_schema_contexts = 1;
-
- // List of schema renaming contexts.
- repeated RenameSchemaContext rename_schema_contexts = 2;
-
- // List of schema dropping contexts.
- repeated DropSchemaContext drop_schema_contexts = 3;
-
- // List of table creation contexts.
- repeated CreateTableContext create_table_contexts = 4;
-
- // List of table alteration contexts.
- repeated AlterTableContext alter_table_contexts = 5;
-
- // List of table renaming contexts.
- repeated RenameTableContext rename_table_contexts = 6;
-
- // List of table dropping contexts.
- repeated DropTableContext drop_table_contexts = 7;
-}
-
-message CreateSchemaContext {
- // The name of the schema to create.
- string name = 1;
-}
-
-message RenameSchemaContext {
- // The old name of the schema.
- string old_name = 1;
-
- // The new name of the schema.
- string new_name = 2;
-}
-
-message DropSchemaContext {
- // The name of the schema to drop.
- string name = 1;
-}
-
-message CreateTableContext {
- // The name of the table to create.
- string name = 1;
-
- // The schema of the table.
- string schema = 2;
-
- // The type of the table.
- string type = 3;
-
- // The engine of the table.
- string engine = 4;
-
- // The character set of the table.
- string character_set = 5;
-
- // The collation of the table.
- string collation = 6;
-
- // The comment of the table.
- string comment = 7;
-
- // List of column addition contexts.
- repeated AddColumnContext add_column_contexts = 8;
-
- // List of primary key columns.
- repeated string primary_keys = 9;
-
- // List of foreign key addition contexts.
- repeated AddForeignKeyContext add_foreign_key_contexts = 10;
-}
-
-message AlterTableContext {
- // The name of the table to alter.
- string name = 1;
-
- // The schema of the table.
- string schema = 2;
-
- // List of column addition contexts.
- repeated AddColumnContext add_column_contexts = 3;
-
- // List of column alteration contexts.
- repeated AlterColumnContext alter_column_contexts = 4;
-
- // List of column dropping contexts.
- repeated DropColumnContext drop_column_contexts = 5;
-
- // List of primary key columns to be dropped.
- repeated string drop_primary_keys = 6;
-
- // List of primary key columns.
- repeated string primary_keys = 7;
-
- // List of foreign key columns to be dropped.
- repeated string drop_foreign_keys = 8;
-
- // List of foreign key addition contexts.
- repeated AddForeignKeyContext add_foreign_key_contexts = 9;
-}
-
-message RenameTableContext {
- // The schema of the table.
- string schema = 1;
-
- // The old name of the table.
- string old_name = 2;
-
- // The new name of the table.
- string new_name = 3;
-}
-
-message DropTableContext {
- // The name of the table to drop.
- string name = 1;
-
- // The schema of the table.
- string schema = 2;
-}
-
-message AddColumnContext {
- // The name of the column to add.
- string name = 1;
-
- // The type of the column.
- string type = 2;
-
- // The character set of the column.
- string character_set = 3;
-
- // The collation of the column.
- string collation = 4;
-
- // The comment of the column.
- string comment = 5;
-
- // Whether the column is nullable.
- bool nullable = 6;
-
- // The default value of the column.
- string default_value = 7;
-
- // Whether the column has a default value.
- bool has_default_value = 8;
-}
-
-message AlterColumnContext {
- // The old name of the column.
- string old_name = 1;
-
- // The new name of the column.
- string new_name = 2;
-
- // The type of the column.
- string type = 3;
-
- // The character set of the column.
- string character_set = 4;
-
- // The collation of the column.
- string collation = 5;
-
- // The comment of the column.
- string comment = 6;
-
- // Whether the column is nullable.
- bool nullable = 7;
-
- // The default value of the column.
- string default_value = 8;
-
- // Whether the default value of the column has changed.
- bool is_default_value_changed = 9;
-}
-
-message DropColumnContext {
- // The name of the column to drop.
- string name = 1;
-}
-
-message AddForeignKeyContext {
- // The column of the foreign key.
- string column = 1;
-
- // The referenced schema of the foreign key.
- string referenced_schema = 2;
-
- // The referenced table of the foreign key.
- string referenced_table = 3;
-
- // The referenced column of the foreign key.
- string referenced_column = 4;
-}
diff --git a/proto/v1/database_service.proto b/proto/v1/database_service.proto
index d141b1b914..55c674fb0a 100644
--- a/proto/v1/database_service.proto
+++ b/proto/v1/database_service.proto
@@ -255,7 +255,7 @@ message GetDatabaseSchemaRequest {
message DiffSchemaRequest {
// The name of the database or change history.
// Format:
- // databse: instances/{instance}/databases/{database}
+ // database: instances/{instance}/databases/{database}
// change history: instances/{instance}/databases/{database}/changeHistories/{changeHistory}
string name = 1 [(google.api.field_behavior) = REQUIRED];