Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: migrate `DatabaseEdit` definition to protobuf (#6996)
boojackbeefd448e8e7
diff --git a/frontend/src/types/proto/v1/database_edit.ts b/frontend/src/types/proto/v1/database_edit.tsnew file mode 100644index 0000000000..c67e70f87d--- /dev/null+++ b/frontend/src/types/proto/v1/database_edit.ts@@ -0,0 +1,1586 @@+/* eslint-disable */+import * as _m0 from "protobufjs/minimal";++export const protobufPackage = "bytebase.v1";++export interface DatabaseEdit {+ /** List of schema creation contexts. */+ createSchemaContexts: CreateSchemaContext[];+ /** List of schema renaming contexts. */+ renameSchemaContexts: RenameSchemaContext[];+ /** List of schema dropping contexts. */+ dropSchemaContexts: DropSchemaContext[];+ /** List of table creation contexts. */+ createTableContexts: CreateTableContext[];+ /** List of table alteration contexts. */+ alterTableContexts: AlterTableContext[];+ /** List of table renaming contexts. */+ renameTableContexts: RenameTableContext[];+ /** List of table dropping contexts. */+ dropTableContexts: DropTableContext[];+}++export interface CreateSchemaContext {+ /** The name of the schema to create. */+ name: string;+}++export interface RenameSchemaContext {+ /** The old name of the schema. */+ oldName: string;+ /** The new name of the schema. */+ newName: string;+}++export interface DropSchemaContext {+ /** The name of the schema to drop. */+ name: string;+}++export interface CreateTableContext {+ /** The name of the table to create. */+ name: string;+ /** The schema of the table. */+ schema: string;+ /** The type of the table. */+ type: string;+ /** The engine of the table. */+ engine: string;+ /** The character set of the table. */+ characterSet: string;+ /** The collation of the table. */+ collation: string;+ /** The comment of the table. */+ comment: string;+ /** List of column addition contexts. */+ addColumnContexts: AddColumnContext[];+ /** List of primary key columns. */+ primaryKeys: string[];+ /** List of foreign key addition contexts. */+ addForeignKeyContexts: AddForeignKeyContext[];+}++export interface AlterTableContext {+ /** The name of the table to alter. */+ name: string;+ /** The schema of the table. */+ schema: string;+ /** List of column addition contexts. */+ addColumnContexts: AddColumnContext[];+ /** List of column alteration contexts. */+ alterColumnContexts: AlterColumnContext[];+ /** List of column dropping contexts. */+ dropColumnContexts: DropColumnContext[];+ /** List of primary key columns to be dropped. */+ dropPrimaryKeys: string[];+ /** List of primary key columns. */+ primaryKeys: string[];+ /** List of foreign key columns to be dropped. */+ dropForeignKeys: string[];+ /** List of foreign key addition contexts. */+ addForeignKeyContexts: AddForeignKeyContext[];+}++export interface RenameTableContext {+ /** The schema of the table. */+ schema: string;+ /** The old name of the table. */+ oldName: string;+ /** The new name of the table. */+ newName: string;+}++export interface DropTableContext {+ /** The name of the table to drop. */+ name: string;+ /** The schema of the table. */+ schema: string;+}++export interface AddColumnContext {+ /** The name of the column to add. */+ name: string;+ /** The type of the column. */+ type: string;+ /** The character set of the column. */+ characterSet: string;+ /** The collation of the column. */+ collation: string;+ /** The comment of the column. */+ comment: string;+ /** Whether the column is nullable. */+ nullable: boolean;+ /** The default value of the column. */+ defaultValue: string;+ /** Whether the column has a default value. */+ hasDefaultValue: boolean;+}++export interface AlterColumnContext {+ /** The old name of the column. */+ oldName: string;+ /** The new name of the column. */+ newName: string;+ /** The type of the column. */+ type: string;+ /** The character set of the column. */+ characterSet: string;+ /** The collation of the column. */+ collation: string;+ /** The comment of the column. */+ comment: string;+ /** Whether the column is nullable. */+ nullable: boolean;+ /** The default value of the column. */+ defaultValue: string;+ /** Whether the default value of the column has changed. */+ isDefaultValueChanged: boolean;+}++export interface DropColumnContext {+ /** The name of the column to drop. */+ name: string;+}++export interface AddForeignKeyContext {+ /** The column of the foreign key. */+ column: string;+ /** The referenced schema of the foreign key. */+ referencedSchema: string;+ /** The referenced table of the foreign key. */+ referencedTable: string;+ /** The referenced column of the foreign key. */+ referencedColumn: string;+}++function createBaseDatabaseEdit(): DatabaseEdit {+ return {+ createSchemaContexts: [],+ renameSchemaContexts: [],+ dropSchemaContexts: [],+ createTableContexts: [],+ alterTableContexts: [],+ renameTableContexts: [],+ dropTableContexts: [],+ };+}++export const DatabaseEdit = {+ encode(message: DatabaseEdit, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ for (const v of message.createSchemaContexts) {+ CreateSchemaContext.encode(v!, writer.uint32(10).fork()).ldelim();+ }+ for (const v of message.renameSchemaContexts) {+ RenameSchemaContext.encode(v!, writer.uint32(18).fork()).ldelim();+ }+ for (const v of message.dropSchemaContexts) {+ DropSchemaContext.encode(v!, writer.uint32(26).fork()).ldelim();+ }+ for (const v of message.createTableContexts) {+ CreateTableContext.encode(v!, writer.uint32(34).fork()).ldelim();+ }+ for (const v of message.alterTableContexts) {+ AlterTableContext.encode(v!, writer.uint32(42).fork()).ldelim();+ }+ for (const v of message.renameTableContexts) {+ RenameTableContext.encode(v!, writer.uint32(50).fork()).ldelim();+ }+ for (const v of message.dropTableContexts) {+ DropTableContext.encode(v!, writer.uint32(58).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): DatabaseEdit {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseDatabaseEdit();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.createSchemaContexts.push(CreateSchemaContext.decode(reader, reader.uint32()));+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.renameSchemaContexts.push(RenameSchemaContext.decode(reader, reader.uint32()));+ continue;+ case 3:+ if (tag !== 26) {+ break;+ }++ message.dropSchemaContexts.push(DropSchemaContext.decode(reader, reader.uint32()));+ continue;+ case 4:+ if (tag !== 34) {+ break;+ }++ message.createTableContexts.push(CreateTableContext.decode(reader, reader.uint32()));+ continue;+ case 5:+ if (tag !== 42) {+ break;+ }++ message.alterTableContexts.push(AlterTableContext.decode(reader, reader.uint32()));+ continue;+ case 6:+ if (tag !== 50) {+ break;+ }++ message.renameTableContexts.push(RenameTableContext.decode(reader, reader.uint32()));+ continue;+ case 7:+ if (tag !== 58) {+ break;+ }++ message.dropTableContexts.push(DropTableContext.decode(reader, reader.uint32()));+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): DatabaseEdit {+ return {+ createSchemaContexts: Array.isArray(object?.createSchemaContexts)+ ? object.createSchemaContexts.map((e: any) => CreateSchemaContext.fromJSON(e))+ : [],+ renameSchemaContexts: Array.isArray(object?.renameSchemaContexts)+ ? object.renameSchemaContexts.map((e: any) => RenameSchemaContext.fromJSON(e))+ : [],+ dropSchemaContexts: Array.isArray(object?.dropSchemaContexts)+ ? object.dropSchemaContexts.map((e: any) => DropSchemaContext.fromJSON(e))+ : [],+ createTableContexts: Array.isArray(object?.createTableContexts)+ ? object.createTableContexts.map((e: any) => CreateTableContext.fromJSON(e))+ : [],+ alterTableContexts: Array.isArray(object?.alterTableContexts)+ ? object.alterTableContexts.map((e: any) => AlterTableContext.fromJSON(e))+ : [],+ renameTableContexts: Array.isArray(object?.renameTableContexts)+ ? object.renameTableContexts.map((e: any) => RenameTableContext.fromJSON(e))+ : [],+ dropTableContexts: Array.isArray(object?.dropTableContexts)+ ? object.dropTableContexts.map((e: any) => DropTableContext.fromJSON(e))+ : [],+ };+ },++ toJSON(message: DatabaseEdit): unknown {+ const obj: any = {};+ if (message.createSchemaContexts) {+ obj.createSchemaContexts = message.createSchemaContexts.map((e) => e ? CreateSchemaContext.toJSON(e) : undefined);+ } else {+ obj.createSchemaContexts = [];+ }+ if (message.renameSchemaContexts) {+ obj.renameSchemaContexts = message.renameSchemaContexts.map((e) => e ? RenameSchemaContext.toJSON(e) : undefined);+ } else {+ obj.renameSchemaContexts = [];+ }+ if (message.dropSchemaContexts) {+ obj.dropSchemaContexts = message.dropSchemaContexts.map((e) => e ? DropSchemaContext.toJSON(e) : undefined);+ } else {+ obj.dropSchemaContexts = [];+ }+ if (message.createTableContexts) {+ obj.createTableContexts = message.createTableContexts.map((e) => e ? CreateTableContext.toJSON(e) : undefined);+ } else {+ obj.createTableContexts = [];+ }+ if (message.alterTableContexts) {+ obj.alterTableContexts = message.alterTableContexts.map((e) => e ? AlterTableContext.toJSON(e) : undefined);+ } else {+ obj.alterTableContexts = [];+ }+ if (message.renameTableContexts) {+ obj.renameTableContexts = message.renameTableContexts.map((e) => e ? RenameTableContext.toJSON(e) : undefined);+ } else {+ obj.renameTableContexts = [];+ }+ if (message.dropTableContexts) {+ obj.dropTableContexts = message.dropTableContexts.map((e) => e ? DropTableContext.toJSON(e) : undefined);+ } else {+ obj.dropTableContexts = [];+ }+ return obj;+ },++ create(base?: DeepPartial<DatabaseEdit>): DatabaseEdit {+ return DatabaseEdit.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<DatabaseEdit>): DatabaseEdit {+ const message = createBaseDatabaseEdit();+ message.createSchemaContexts = object.createSchemaContexts?.map((e) => CreateSchemaContext.fromPartial(e)) || [];+ message.renameSchemaContexts = object.renameSchemaContexts?.map((e) => RenameSchemaContext.fromPartial(e)) || [];+ message.dropSchemaContexts = object.dropSchemaContexts?.map((e) => DropSchemaContext.fromPartial(e)) || [];+ message.createTableContexts = object.createTableContexts?.map((e) => CreateTableContext.fromPartial(e)) || [];+ message.alterTableContexts = object.alterTableContexts?.map((e) => AlterTableContext.fromPartial(e)) || [];+ message.renameTableContexts = object.renameTableContexts?.map((e) => RenameTableContext.fromPartial(e)) || [];+ message.dropTableContexts = object.dropTableContexts?.map((e) => DropTableContext.fromPartial(e)) || [];+ return message;+ },+};++function createBaseCreateSchemaContext(): CreateSchemaContext {+ return { name: "" };+}++export const CreateSchemaContext = {+ encode(message: CreateSchemaContext, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.name !== "") {+ writer.uint32(10).string(message.name);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): CreateSchemaContext {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseCreateSchemaContext();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.name = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): CreateSchemaContext {+ return { name: isSet(object.name) ? String(object.name) : "" };+ },++ toJSON(message: CreateSchemaContext): unknown {+ const obj: any = {};+ message.name !== undefined && (obj.name = message.name);+ return obj;+ },++ create(base?: DeepPartial<CreateSchemaContext>): CreateSchemaContext {+ return CreateSchemaContext.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<CreateSchemaContext>): CreateSchemaContext {+ const message = createBaseCreateSchemaContext();+ message.name = object.name ?? "";+ return message;+ },+};++function createBaseRenameSchemaContext(): RenameSchemaContext {+ return { oldName: "", newName: "" };+}++export const RenameSchemaContext = {+ encode(message: RenameSchemaContext, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.oldName !== "") {+ writer.uint32(10).string(message.oldName);+ }+ if (message.newName !== "") {+ writer.uint32(18).string(message.newName);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): RenameSchemaContext {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseRenameSchemaContext();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.oldName = reader.string();+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.newName = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): RenameSchemaContext {+ return {+ oldName: isSet(object.oldName) ? String(object.oldName) : "",+ newName: isSet(object.newName) ? String(object.newName) : "",+ };+ },++ toJSON(message: RenameSchemaContext): unknown {+ const obj: any = {};+ message.oldName !== undefined && (obj.oldName = message.oldName);+ message.newName !== undefined && (obj.newName = message.newName);+ return obj;+ },++ create(base?: DeepPartial<RenameSchemaContext>): RenameSchemaContext {+ return RenameSchemaContext.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<RenameSchemaContext>): RenameSchemaContext {+ const message = createBaseRenameSchemaContext();+ message.oldName = object.oldName ?? "";+ message.newName = object.newName ?? "";+ return message;+ },+};++function createBaseDropSchemaContext(): DropSchemaContext {+ return { name: "" };+}++export const DropSchemaContext = {+ encode(message: DropSchemaContext, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.name !== "") {+ writer.uint32(10).string(message.name);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): DropSchemaContext {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseDropSchemaContext();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.name = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): DropSchemaContext {+ return { name: isSet(object.name) ? String(object.name) : "" };+ },++ toJSON(message: DropSchemaContext): unknown {+ const obj: any = {};+ message.name !== undefined && (obj.name = message.name);+ return obj;+ },++ create(base?: DeepPartial<DropSchemaContext>): DropSchemaContext {+ return DropSchemaContext.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<DropSchemaContext>): DropSchemaContext {+ const message = createBaseDropSchemaContext();+ message.name = object.name ?? "";+ return message;+ },+};++function createBaseCreateTableContext(): CreateTableContext {+ return {+ name: "",+ schema: "",+ type: "",+ engine: "",+ characterSet: "",+ collation: "",+ comment: "",+ addColumnContexts: [],+ primaryKeys: [],+ addForeignKeyContexts: [],+ };+}++export const CreateTableContext = {+ encode(message: CreateTableContext, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.name !== "") {+ writer.uint32(10).string(message.name);+ }+ if (message.schema !== "") {+ writer.uint32(18).string(message.schema);+ }+ if (message.type !== "") {+ writer.uint32(26).string(message.type);+ }+ if (message.engine !== "") {+ writer.uint32(34).string(message.engine);+ }+ if (message.characterSet !== "") {+ writer.uint32(42).string(message.characterSet);+ }+ if (message.collation !== "") {+ writer.uint32(50).string(message.collation);+ }+ if (message.comment !== "") {+ writer.uint32(58).string(message.comment);+ }+ for (const v of message.addColumnContexts) {+ AddColumnContext.encode(v!, writer.uint32(66).fork()).ldelim();+ }+ for (const v of message.primaryKeys) {+ writer.uint32(74).string(v!);+ }+ for (const v of message.addForeignKeyContexts) {+ AddForeignKeyContext.encode(v!, writer.uint32(82).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): CreateTableContext {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseCreateTableContext();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.name = reader.string();+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.schema = reader.string();+ continue;+ case 3:+ if (tag !== 26) {+ break;+ }++ message.type = reader.string();+ continue;+ case 4:+ if (tag !== 34) {+ break;+ }++ message.engine = reader.string();+ continue;+ case 5:+ if (tag !== 42) {+ break;+ }++ message.characterSet = reader.string();+ continue;+ case 6:+ if (tag !== 50) {+ break;+ }++ message.collation = reader.string();+ continue;+ case 7:+ if (tag !== 58) {+ break;+ }++ message.comment = reader.string();+ continue;+ case 8:+ if (tag !== 66) {+ break;+ }++ message.addColumnContexts.push(AddColumnContext.decode(reader, reader.uint32()));+ continue;+ case 9:+ if (tag !== 74) {+ break;+ }++ message.primaryKeys.push(reader.string());+ continue;+ case 10:+ if (tag !== 82) {+ break;+ }++ message.addForeignKeyContexts.push(AddForeignKeyContext.decode(reader, reader.uint32()));+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): CreateTableContext {+ return {+ name: isSet(object.name) ? String(object.name) : "",+ schema: isSet(object.schema) ? String(object.schema) : "",+ type: isSet(object.type) ? String(object.type) : "",+ engine: isSet(object.engine) ? String(object.engine) : "",+ characterSet: isSet(object.characterSet) ? String(object.characterSet) : "",+ collation: isSet(object.collation) ? String(object.collation) : "",+ comment: isSet(object.comment) ? String(object.comment) : "",+ addColumnContexts: Array.isArray(object?.addColumnContexts)+ ? object.addColumnContexts.map((e: any) => AddColumnContext.fromJSON(e))+ : [],+ primaryKeys: Array.isArray(object?.primaryKeys) ? object.primaryKeys.map((e: any) => String(e)) : [],+ addForeignKeyContexts: Array.isArray(object?.addForeignKeyContexts)+ ? object.addForeignKeyContexts.map((e: any) => AddForeignKeyContext.fromJSON(e))+ : [],+ };+ },++ toJSON(message: CreateTableContext): unknown {+ const obj: any = {};+ message.name !== undefined && (obj.name = message.name);+ message.schema !== undefined && (obj.schema = message.schema);+ message.type !== undefined && (obj.type = message.type);+ message.engine !== undefined && (obj.engine = message.engine);+ message.characterSet !== undefined && (obj.characterSet = message.characterSet);+ message.collation !== undefined && (obj.collation = message.collation);+ message.comment !== undefined && (obj.comment = message.comment);+ if (message.addColumnContexts) {+ obj.addColumnContexts = message.addColumnContexts.map((e) => e ? AddColumnContext.toJSON(e) : undefined);+ } else {+ obj.addColumnContexts = [];+ }+ if (message.primaryKeys) {+ obj.primaryKeys = message.primaryKeys.map((e) => e);+ } else {+ obj.primaryKeys = [];+ }+ if (message.addForeignKeyContexts) {+ obj.addForeignKeyContexts = message.addForeignKeyContexts.map((e) =>+ e ? AddForeignKeyContext.toJSON(e) : undefined+ );+ } else {+ obj.addForeignKeyContexts = [];+ }+ return obj;+ },++ create(base?: DeepPartial<CreateTableContext>): CreateTableContext {+ return CreateTableContext.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<CreateTableContext>): CreateTableContext {+ const message = createBaseCreateTableContext();+ message.name = object.name ?? "";+ message.schema = object.schema ?? "";+ message.type = object.type ?? "";+ message.engine = object.engine ?? "";+ message.characterSet = object.characterSet ?? "";+ message.collation = object.collation ?? "";+ message.comment = object.comment ?? "";+ message.addColumnContexts = object.addColumnContexts?.map((e) => AddColumnContext.fromPartial(e)) || [];+ message.primaryKeys = object.primaryKeys?.map((e) => e) || [];+ message.addForeignKeyContexts = object.addForeignKeyContexts?.map((e) => AddForeignKeyContext.fromPartial(e)) || [];+ return message;+ },+};++function createBaseAlterTableContext(): AlterTableContext {+ return {+ name: "",+ schema: "",+ addColumnContexts: [],+ alterColumnContexts: [],+ dropColumnContexts: [],+ dropPrimaryKeys: [],+ primaryKeys: [],+ dropForeignKeys: [],+ addForeignKeyContexts: [],+ };+}++export const AlterTableContext = {+ encode(message: AlterTableContext, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.name !== "") {+ writer.uint32(10).string(message.name);+ }+ if (message.schema !== "") {+ writer.uint32(18).string(message.schema);+ }+ for (const v of message.addColumnContexts) {+ AddColumnContext.encode(v!, writer.uint32(26).fork()).ldelim();+ }+ for (const v of message.alterColumnContexts) {+ AlterColumnContext.encode(v!, writer.uint32(34).fork()).ldelim();+ }+ for (const v of message.dropColumnContexts) {+ DropColumnContext.encode(v!, writer.uint32(42).fork()).ldelim();+ }+ for (const v of message.dropPrimaryKeys) {+ writer.uint32(50).string(v!);+ }+ for (const v of message.primaryKeys) {+ writer.uint32(58).string(v!);+ }+ for (const v of message.dropForeignKeys) {+ writer.uint32(66).string(v!);+ }+ for (const v of message.addForeignKeyContexts) {+ AddForeignKeyContext.encode(v!, writer.uint32(74).fork()).ldelim();+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): AlterTableContext {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseAlterTableContext();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.name = reader.string();+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.schema = reader.string();+ continue;+ case 3:+ if (tag !== 26) {+ break;+ }++ message.addColumnContexts.push(AddColumnContext.decode(reader, reader.uint32()));+ continue;+ case 4:+ if (tag !== 34) {+ break;+ }++ message.alterColumnContexts.push(AlterColumnContext.decode(reader, reader.uint32()));+ continue;+ case 5:+ if (tag !== 42) {+ break;+ }++ message.dropColumnContexts.push(DropColumnContext.decode(reader, reader.uint32()));+ continue;+ case 6:+ if (tag !== 50) {+ break;+ }++ message.dropPrimaryKeys.push(reader.string());+ continue;+ case 7:+ if (tag !== 58) {+ break;+ }++ message.primaryKeys.push(reader.string());+ continue;+ case 8:+ if (tag !== 66) {+ break;+ }++ message.dropForeignKeys.push(reader.string());+ continue;+ case 9:+ if (tag !== 74) {+ break;+ }++ message.addForeignKeyContexts.push(AddForeignKeyContext.decode(reader, reader.uint32()));+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): AlterTableContext {+ return {+ name: isSet(object.name) ? String(object.name) : "",+ schema: isSet(object.schema) ? String(object.schema) : "",+ addColumnContexts: Array.isArray(object?.addColumnContexts)+ ? object.addColumnContexts.map((e: any) => AddColumnContext.fromJSON(e))+ : [],+ alterColumnContexts: Array.isArray(object?.alterColumnContexts)+ ? object.alterColumnContexts.map((e: any) => AlterColumnContext.fromJSON(e))+ : [],+ dropColumnContexts: Array.isArray(object?.dropColumnContexts)+ ? object.dropColumnContexts.map((e: any) => DropColumnContext.fromJSON(e))+ : [],+ dropPrimaryKeys: Array.isArray(object?.dropPrimaryKeys) ? object.dropPrimaryKeys.map((e: any) => String(e)) : [],+ primaryKeys: Array.isArray(object?.primaryKeys) ? object.primaryKeys.map((e: any) => String(e)) : [],+ dropForeignKeys: Array.isArray(object?.dropForeignKeys) ? object.dropForeignKeys.map((e: any) => String(e)) : [],+ addForeignKeyContexts: Array.isArray(object?.addForeignKeyContexts)+ ? object.addForeignKeyContexts.map((e: any) => AddForeignKeyContext.fromJSON(e))+ : [],+ };+ },++ toJSON(message: AlterTableContext): unknown {+ const obj: any = {};+ message.name !== undefined && (obj.name = message.name);+ message.schema !== undefined && (obj.schema = message.schema);+ if (message.addColumnContexts) {+ obj.addColumnContexts = message.addColumnContexts.map((e) => e ? AddColumnContext.toJSON(e) : undefined);+ } else {+ obj.addColumnContexts = [];+ }+ if (message.alterColumnContexts) {+ obj.alterColumnContexts = message.alterColumnContexts.map((e) => e ? AlterColumnContext.toJSON(e) : undefined);+ } else {+ obj.alterColumnContexts = [];+ }+ if (message.dropColumnContexts) {+ obj.dropColumnContexts = message.dropColumnContexts.map((e) => e ? DropColumnContext.toJSON(e) : undefined);+ } else {+ obj.dropColumnContexts = [];+ }+ if (message.dropPrimaryKeys) {+ obj.dropPrimaryKeys = message.dropPrimaryKeys.map((e) => e);+ } else {+ obj.dropPrimaryKeys = [];+ }+ if (message.primaryKeys) {+ obj.primaryKeys = message.primaryKeys.map((e) => e);+ } else {+ obj.primaryKeys = [];+ }+ if (message.dropForeignKeys) {+ obj.dropForeignKeys = message.dropForeignKeys.map((e) => e);+ } else {+ obj.dropForeignKeys = [];+ }+ if (message.addForeignKeyContexts) {+ obj.addForeignKeyContexts = message.addForeignKeyContexts.map((e) =>+ e ? AddForeignKeyContext.toJSON(e) : undefined+ );+ } else {+ obj.addForeignKeyContexts = [];+ }+ return obj;+ },++ create(base?: DeepPartial<AlterTableContext>): AlterTableContext {+ return AlterTableContext.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<AlterTableContext>): AlterTableContext {+ const message = createBaseAlterTableContext();+ message.name = object.name ?? "";+ message.schema = object.schema ?? "";+ message.addColumnContexts = object.addColumnContexts?.map((e) => AddColumnContext.fromPartial(e)) || [];+ message.alterColumnContexts = object.alterColumnContexts?.map((e) => AlterColumnContext.fromPartial(e)) || [];+ message.dropColumnContexts = object.dropColumnContexts?.map((e) => DropColumnContext.fromPartial(e)) || [];+ message.dropPrimaryKeys = object.dropPrimaryKeys?.map((e) => e) || [];+ message.primaryKeys = object.primaryKeys?.map((e) => e) || [];+ message.dropForeignKeys = object.dropForeignKeys?.map((e) => e) || [];+ message.addForeignKeyContexts = object.addForeignKeyContexts?.map((e) => AddForeignKeyContext.fromPartial(e)) || [];+ return message;+ },+};++function createBaseRenameTableContext(): RenameTableContext {+ return { schema: "", oldName: "", newName: "" };+}++export const RenameTableContext = {+ encode(message: RenameTableContext, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.schema !== "") {+ writer.uint32(10).string(message.schema);+ }+ if (message.oldName !== "") {+ writer.uint32(18).string(message.oldName);+ }+ if (message.newName !== "") {+ writer.uint32(26).string(message.newName);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): RenameTableContext {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseRenameTableContext();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.schema = reader.string();+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.oldName = reader.string();+ continue;+ case 3:+ if (tag !== 26) {+ break;+ }++ message.newName = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): RenameTableContext {+ return {+ schema: isSet(object.schema) ? String(object.schema) : "",+ oldName: isSet(object.oldName) ? String(object.oldName) : "",+ newName: isSet(object.newName) ? String(object.newName) : "",+ };+ },++ toJSON(message: RenameTableContext): unknown {+ const obj: any = {};+ message.schema !== undefined && (obj.schema = message.schema);+ message.oldName !== undefined && (obj.oldName = message.oldName);+ message.newName !== undefined && (obj.newName = message.newName);+ return obj;+ },++ create(base?: DeepPartial<RenameTableContext>): RenameTableContext {+ return RenameTableContext.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<RenameTableContext>): RenameTableContext {+ const message = createBaseRenameTableContext();+ message.schema = object.schema ?? "";+ message.oldName = object.oldName ?? "";+ message.newName = object.newName ?? "";+ return message;+ },+};++function createBaseDropTableContext(): DropTableContext {+ return { name: "", schema: "" };+}++export const DropTableContext = {+ encode(message: DropTableContext, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.name !== "") {+ writer.uint32(10).string(message.name);+ }+ if (message.schema !== "") {+ writer.uint32(18).string(message.schema);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): DropTableContext {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseDropTableContext();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.name = reader.string();+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.schema = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): DropTableContext {+ return {+ name: isSet(object.name) ? String(object.name) : "",+ schema: isSet(object.schema) ? String(object.schema) : "",+ };+ },++ toJSON(message: DropTableContext): unknown {+ const obj: any = {};+ message.name !== undefined && (obj.name = message.name);+ message.schema !== undefined && (obj.schema = message.schema);+ return obj;+ },++ create(base?: DeepPartial<DropTableContext>): DropTableContext {+ return DropTableContext.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<DropTableContext>): DropTableContext {+ const message = createBaseDropTableContext();+ message.name = object.name ?? "";+ message.schema = object.schema ?? "";+ return message;+ },+};++function createBaseAddColumnContext(): AddColumnContext {+ return {+ name: "",+ type: "",+ characterSet: "",+ collation: "",+ comment: "",+ nullable: false,+ defaultValue: "",+ hasDefaultValue: false,+ };+}++export const AddColumnContext = {+ encode(message: AddColumnContext, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.name !== "") {+ writer.uint32(10).string(message.name);+ }+ if (message.type !== "") {+ writer.uint32(18).string(message.type);+ }+ if (message.characterSet !== "") {+ writer.uint32(26).string(message.characterSet);+ }+ if (message.collation !== "") {+ writer.uint32(34).string(message.collation);+ }+ if (message.comment !== "") {+ writer.uint32(42).string(message.comment);+ }+ if (message.nullable === true) {+ writer.uint32(48).bool(message.nullable);+ }+ if (message.defaultValue !== "") {+ writer.uint32(58).string(message.defaultValue);+ }+ if (message.hasDefaultValue === true) {+ writer.uint32(64).bool(message.hasDefaultValue);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): AddColumnContext {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseAddColumnContext();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.name = reader.string();+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.type = reader.string();+ continue;+ case 3:+ if (tag !== 26) {+ break;+ }++ message.characterSet = reader.string();+ continue;+ case 4:+ if (tag !== 34) {+ break;+ }++ message.collation = reader.string();+ continue;+ case 5:+ if (tag !== 42) {+ break;+ }++ message.comment = reader.string();+ continue;+ case 6:+ if (tag !== 48) {+ break;+ }++ message.nullable = reader.bool();+ continue;+ case 7:+ if (tag !== 58) {+ break;+ }++ message.defaultValue = reader.string();+ continue;+ case 8:+ if (tag !== 64) {+ break;+ }++ message.hasDefaultValue = reader.bool();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): AddColumnContext {+ return {+ name: isSet(object.name) ? String(object.name) : "",+ type: isSet(object.type) ? String(object.type) : "",+ characterSet: isSet(object.characterSet) ? String(object.characterSet) : "",+ collation: isSet(object.collation) ? String(object.collation) : "",+ comment: isSet(object.comment) ? String(object.comment) : "",+ nullable: isSet(object.nullable) ? Boolean(object.nullable) : false,+ defaultValue: isSet(object.defaultValue) ? String(object.defaultValue) : "",+ hasDefaultValue: isSet(object.hasDefaultValue) ? Boolean(object.hasDefaultValue) : false,+ };+ },++ toJSON(message: AddColumnContext): unknown {+ const obj: any = {};+ message.name !== undefined && (obj.name = message.name);+ message.type !== undefined && (obj.type = message.type);+ message.characterSet !== undefined && (obj.characterSet = message.characterSet);+ message.collation !== undefined && (obj.collation = message.collation);+ message.comment !== undefined && (obj.comment = message.comment);+ message.nullable !== undefined && (obj.nullable = message.nullable);+ message.defaultValue !== undefined && (obj.defaultValue = message.defaultValue);+ message.hasDefaultValue !== undefined && (obj.hasDefaultValue = message.hasDefaultValue);+ return obj;+ },++ create(base?: DeepPartial<AddColumnContext>): AddColumnContext {+ return AddColumnContext.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<AddColumnContext>): AddColumnContext {+ const message = createBaseAddColumnContext();+ message.name = object.name ?? "";+ message.type = object.type ?? "";+ message.characterSet = object.characterSet ?? "";+ message.collation = object.collation ?? "";+ message.comment = object.comment ?? "";+ message.nullable = object.nullable ?? false;+ message.defaultValue = object.defaultValue ?? "";+ message.hasDefaultValue = object.hasDefaultValue ?? false;+ return message;+ },+};++function createBaseAlterColumnContext(): AlterColumnContext {+ return {+ oldName: "",+ newName: "",+ type: "",+ characterSet: "",+ collation: "",+ comment: "",+ nullable: false,+ defaultValue: "",+ isDefaultValueChanged: false,+ };+}++export const AlterColumnContext = {+ encode(message: AlterColumnContext, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.oldName !== "") {+ writer.uint32(10).string(message.oldName);+ }+ if (message.newName !== "") {+ writer.uint32(18).string(message.newName);+ }+ if (message.type !== "") {+ writer.uint32(26).string(message.type);+ }+ if (message.characterSet !== "") {+ writer.uint32(34).string(message.characterSet);+ }+ if (message.collation !== "") {+ writer.uint32(42).string(message.collation);+ }+ if (message.comment !== "") {+ writer.uint32(50).string(message.comment);+ }+ if (message.nullable === true) {+ writer.uint32(56).bool(message.nullable);+ }+ if (message.defaultValue !== "") {+ writer.uint32(66).string(message.defaultValue);+ }+ if (message.isDefaultValueChanged === true) {+ writer.uint32(72).bool(message.isDefaultValueChanged);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): AlterColumnContext {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseAlterColumnContext();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.oldName = reader.string();+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.newName = reader.string();+ continue;+ case 3:+ if (tag !== 26) {+ break;+ }++ message.type = reader.string();+ continue;+ case 4:+ if (tag !== 34) {+ break;+ }++ message.characterSet = reader.string();+ continue;+ case 5:+ if (tag !== 42) {+ break;+ }++ message.collation = reader.string();+ continue;+ case 6:+ if (tag !== 50) {+ break;+ }++ message.comment = reader.string();+ continue;+ case 7:+ if (tag !== 56) {+ break;+ }++ message.nullable = reader.bool();+ continue;+ case 8:+ if (tag !== 66) {+ break;+ }++ message.defaultValue = reader.string();+ continue;+ case 9:+ if (tag !== 72) {+ break;+ }++ message.isDefaultValueChanged = reader.bool();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): AlterColumnContext {+ return {+ oldName: isSet(object.oldName) ? String(object.oldName) : "",+ newName: isSet(object.newName) ? String(object.newName) : "",+ type: isSet(object.type) ? String(object.type) : "",+ characterSet: isSet(object.characterSet) ? String(object.characterSet) : "",+ collation: isSet(object.collation) ? String(object.collation) : "",+ comment: isSet(object.comment) ? String(object.comment) : "",+ nullable: isSet(object.nullable) ? Boolean(object.nullable) : false,+ defaultValue: isSet(object.defaultValue) ? String(object.defaultValue) : "",+ isDefaultValueChanged: isSet(object.isDefaultValueChanged) ? Boolean(object.isDefaultValueChanged) : false,+ };+ },++ toJSON(message: AlterColumnContext): unknown {+ const obj: any = {};+ message.oldName !== undefined && (obj.oldName = message.oldName);+ message.newName !== undefined && (obj.newName = message.newName);+ message.type !== undefined && (obj.type = message.type);+ message.characterSet !== undefined && (obj.characterSet = message.characterSet);+ message.collation !== undefined && (obj.collation = message.collation);+ message.comment !== undefined && (obj.comment = message.comment);+ message.nullable !== undefined && (obj.nullable = message.nullable);+ message.defaultValue !== undefined && (obj.defaultValue = message.defaultValue);+ message.isDefaultValueChanged !== undefined && (obj.isDefaultValueChanged = message.isDefaultValueChanged);+ return obj;+ },++ create(base?: DeepPartial<AlterColumnContext>): AlterColumnContext {+ return AlterColumnContext.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<AlterColumnContext>): AlterColumnContext {+ const message = createBaseAlterColumnContext();+ message.oldName = object.oldName ?? "";+ message.newName = object.newName ?? "";+ message.type = object.type ?? "";+ message.characterSet = object.characterSet ?? "";+ message.collation = object.collation ?? "";+ message.comment = object.comment ?? "";+ message.nullable = object.nullable ?? false;+ message.defaultValue = object.defaultValue ?? "";+ message.isDefaultValueChanged = object.isDefaultValueChanged ?? false;+ return message;+ },+};++function createBaseDropColumnContext(): DropColumnContext {+ return { name: "" };+}++export const DropColumnContext = {+ encode(message: DropColumnContext, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.name !== "") {+ writer.uint32(10).string(message.name);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): DropColumnContext {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseDropColumnContext();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.name = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): DropColumnContext {+ return { name: isSet(object.name) ? String(object.name) : "" };+ },++ toJSON(message: DropColumnContext): unknown {+ const obj: any = {};+ message.name !== undefined && (obj.name = message.name);+ return obj;+ },++ create(base?: DeepPartial<DropColumnContext>): DropColumnContext {+ return DropColumnContext.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<DropColumnContext>): DropColumnContext {+ const message = createBaseDropColumnContext();+ message.name = object.name ?? "";+ return message;+ },+};++function createBaseAddForeignKeyContext(): AddForeignKeyContext {+ return { column: "", referencedSchema: "", referencedTable: "", referencedColumn: "" };+}++export const AddForeignKeyContext = {+ encode(message: AddForeignKeyContext, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.column !== "") {+ writer.uint32(10).string(message.column);+ }+ if (message.referencedSchema !== "") {+ writer.uint32(18).string(message.referencedSchema);+ }+ if (message.referencedTable !== "") {+ writer.uint32(26).string(message.referencedTable);+ }+ if (message.referencedColumn !== "") {+ writer.uint32(34).string(message.referencedColumn);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): AddForeignKeyContext {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseAddForeignKeyContext();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.column = reader.string();+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.referencedSchema = reader.string();+ continue;+ case 3:+ if (tag !== 26) {+ break;+ }++ message.referencedTable = reader.string();+ continue;+ case 4:+ if (tag !== 34) {+ break;+ }++ message.referencedColumn = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): AddForeignKeyContext {+ return {+ column: isSet(object.column) ? String(object.column) : "",+ referencedSchema: isSet(object.referencedSchema) ? String(object.referencedSchema) : "",+ referencedTable: isSet(object.referencedTable) ? String(object.referencedTable) : "",+ referencedColumn: isSet(object.referencedColumn) ? String(object.referencedColumn) : "",+ };+ },++ toJSON(message: AddForeignKeyContext): unknown {+ const obj: any = {};+ message.column !== undefined && (obj.column = message.column);+ message.referencedSchema !== undefined && (obj.referencedSchema = message.referencedSchema);+ message.referencedTable !== undefined && (obj.referencedTable = message.referencedTable);+ message.referencedColumn !== undefined && (obj.referencedColumn = message.referencedColumn);+ return obj;+ },++ create(base?: DeepPartial<AddForeignKeyContext>): AddForeignKeyContext {+ return AddForeignKeyContext.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<AddForeignKeyContext>): AddForeignKeyContext {+ const message = createBaseAddForeignKeyContext();+ message.column = object.column ?? "";+ message.referencedSchema = object.referencedSchema ?? "";+ message.referencedTable = object.referencedTable ?? "";+ message.referencedColumn = object.referencedColumn ?? "";+ return message;+ },+};++type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;++export type DeepPartial<T> = T extends Builtin ? T+ : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }+ : Partial<T>;++function isSet(value: any): boolean {+ return value !== null && value !== undefined;+}diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex 75abc45fbb..6719494317 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -107,6 +107,20 @@- [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)@@ -1936,6 +1950,247 @@ 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>diff --git a/proto/generated-go/v1/database_edit.pb.go b/proto/generated-go/v1/database_edit.pb.gonew file mode 100644index 0000000000..33b181ca47--- /dev/null+++ b/proto/generated-go/v1/database_edit.pb.go@@ -0,0 +1,1397 @@+// Code generated by protoc-gen-go. DO NOT EDIT.+// versions:+// protoc-gen-go v1.31.0+// protoc (unknown)+// source: v1/database_edit.proto++package v1++import (+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"+ reflect "reflect"+ sync "sync"+)++const (+ // Verify that this generated code is sufficiently up-to-date.+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)+ // Verify that runtime/protoimpl is sufficiently up-to-date.+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)+)++type DatabaseEdit struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // List of schema creation contexts.+ CreateSchemaContexts []*CreateSchemaContext `protobuf:"bytes,1,rep,name=create_schema_contexts,json=createSchemaContexts,proto3" json:"create_schema_contexts,omitempty"`+ // List of schema renaming contexts.+ RenameSchemaContexts []*RenameSchemaContext `protobuf:"bytes,2,rep,name=rename_schema_contexts,json=renameSchemaContexts,proto3" json:"rename_schema_contexts,omitempty"`+ // List of schema dropping contexts.+ DropSchemaContexts []*DropSchemaContext `protobuf:"bytes,3,rep,name=drop_schema_contexts,json=dropSchemaContexts,proto3" json:"drop_schema_contexts,omitempty"`+ // List of table creation contexts.+ CreateTableContexts []*CreateTableContext `protobuf:"bytes,4,rep,name=create_table_contexts,json=createTableContexts,proto3" json:"create_table_contexts,omitempty"`+ // List of table alteration contexts.+ AlterTableContexts []*AlterTableContext `protobuf:"bytes,5,rep,name=alter_table_contexts,json=alterTableContexts,proto3" json:"alter_table_contexts,omitempty"`+ // List of table renaming contexts.+ RenameTableContexts []*RenameTableContext `protobuf:"bytes,6,rep,name=rename_table_contexts,json=renameTableContexts,proto3" json:"rename_table_contexts,omitempty"`+ // List of table dropping contexts.+ DropTableContexts []*DropTableContext `protobuf:"bytes,7,rep,name=drop_table_contexts,json=dropTableContexts,proto3" json:"drop_table_contexts,omitempty"`+}++func (x *DatabaseEdit) Reset() {+ *x = DatabaseEdit{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_edit_proto_msgTypes[0]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *DatabaseEdit) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DatabaseEdit) ProtoMessage() {}++func (x *DatabaseEdit) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_edit_proto_msgTypes[0]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DatabaseEdit.ProtoReflect.Descriptor instead.+func (*DatabaseEdit) Descriptor() ([]byte, []int) {+ return file_v1_database_edit_proto_rawDescGZIP(), []int{0}+}++func (x *DatabaseEdit) GetCreateSchemaContexts() []*CreateSchemaContext {+ if x != nil {+ return x.CreateSchemaContexts+ }+ return nil+}++func (x *DatabaseEdit) GetRenameSchemaContexts() []*RenameSchemaContext {+ if x != nil {+ return x.RenameSchemaContexts+ }+ return nil+}++func (x *DatabaseEdit) GetDropSchemaContexts() []*DropSchemaContext {+ if x != nil {+ return x.DropSchemaContexts+ }+ return nil+}++func (x *DatabaseEdit) GetCreateTableContexts() []*CreateTableContext {+ if x != nil {+ return x.CreateTableContexts+ }+ return nil+}++func (x *DatabaseEdit) GetAlterTableContexts() []*AlterTableContext {+ if x != nil {+ return x.AlterTableContexts+ }+ return nil+}++func (x *DatabaseEdit) GetRenameTableContexts() []*RenameTableContext {+ if x != nil {+ return x.RenameTableContexts+ }+ return nil+}++func (x *DatabaseEdit) GetDropTableContexts() []*DropTableContext {+ if x != nil {+ return x.DropTableContexts+ }+ return nil+}++type CreateSchemaContext struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The name of the schema to create.+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+}++func (x *CreateSchemaContext) Reset() {+ *x = CreateSchemaContext{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_edit_proto_msgTypes[1]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *CreateSchemaContext) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*CreateSchemaContext) ProtoMessage() {}++func (x *CreateSchemaContext) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_edit_proto_msgTypes[1]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use CreateSchemaContext.ProtoReflect.Descriptor instead.+func (*CreateSchemaContext) Descriptor() ([]byte, []int) {+ return file_v1_database_edit_proto_rawDescGZIP(), []int{1}+}++func (x *CreateSchemaContext) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++type RenameSchemaContext struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The old name of the schema.+ OldName string `protobuf:"bytes,1,opt,name=old_name,json=oldName,proto3" json:"old_name,omitempty"`+ // The new name of the schema.+ NewName string `protobuf:"bytes,2,opt,name=new_name,json=newName,proto3" json:"new_name,omitempty"`+}++func (x *RenameSchemaContext) Reset() {+ *x = RenameSchemaContext{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_edit_proto_msgTypes[2]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *RenameSchemaContext) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*RenameSchemaContext) ProtoMessage() {}++func (x *RenameSchemaContext) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_edit_proto_msgTypes[2]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use RenameSchemaContext.ProtoReflect.Descriptor instead.+func (*RenameSchemaContext) Descriptor() ([]byte, []int) {+ return file_v1_database_edit_proto_rawDescGZIP(), []int{2}+}++func (x *RenameSchemaContext) GetOldName() string {+ if x != nil {+ return x.OldName+ }+ return ""+}++func (x *RenameSchemaContext) GetNewName() string {+ if x != nil {+ return x.NewName+ }+ return ""+}++type DropSchemaContext struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The name of the schema to drop.+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+}++func (x *DropSchemaContext) Reset() {+ *x = DropSchemaContext{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_edit_proto_msgTypes[3]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *DropSchemaContext) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DropSchemaContext) ProtoMessage() {}++func (x *DropSchemaContext) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_edit_proto_msgTypes[3]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DropSchemaContext.ProtoReflect.Descriptor instead.+func (*DropSchemaContext) Descriptor() ([]byte, []int) {+ return file_v1_database_edit_proto_rawDescGZIP(), []int{3}+}++func (x *DropSchemaContext) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++type CreateTableContext struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The name of the table to create.+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ // The schema of the table.+ Schema string `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"`+ // The type of the table.+ Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`+ // The engine of the table.+ Engine string `protobuf:"bytes,4,opt,name=engine,proto3" json:"engine,omitempty"`+ // The character set of the table.+ CharacterSet string `protobuf:"bytes,5,opt,name=character_set,json=characterSet,proto3" json:"character_set,omitempty"`+ // The collation of the table.+ Collation string `protobuf:"bytes,6,opt,name=collation,proto3" json:"collation,omitempty"`+ // The comment of the table.+ Comment string `protobuf:"bytes,7,opt,name=comment,proto3" json:"comment,omitempty"`+ // List of column addition contexts.+ AddColumnContexts []*AddColumnContext `protobuf:"bytes,8,rep,name=add_column_contexts,json=addColumnContexts,proto3" json:"add_column_contexts,omitempty"`+ // List of primary key columns.+ PrimaryKeys []string `protobuf:"bytes,9,rep,name=primary_keys,json=primaryKeys,proto3" json:"primary_keys,omitempty"`+ // List of foreign key addition contexts.+ AddForeignKeyContexts []*AddForeignKeyContext `protobuf:"bytes,10,rep,name=add_foreign_key_contexts,json=addForeignKeyContexts,proto3" json:"add_foreign_key_contexts,omitempty"`+}++func (x *CreateTableContext) Reset() {+ *x = CreateTableContext{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_edit_proto_msgTypes[4]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *CreateTableContext) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*CreateTableContext) ProtoMessage() {}++func (x *CreateTableContext) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_edit_proto_msgTypes[4]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use CreateTableContext.ProtoReflect.Descriptor instead.+func (*CreateTableContext) Descriptor() ([]byte, []int) {+ return file_v1_database_edit_proto_rawDescGZIP(), []int{4}+}++func (x *CreateTableContext) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *CreateTableContext) GetSchema() string {+ if x != nil {+ return x.Schema+ }+ return ""+}++func (x *CreateTableContext) GetType() string {+ if x != nil {+ return x.Type+ }+ return ""+}++func (x *CreateTableContext) GetEngine() string {+ if x != nil {+ return x.Engine+ }+ return ""+}++func (x *CreateTableContext) GetCharacterSet() string {+ if x != nil {+ return x.CharacterSet+ }+ return ""+}++func (x *CreateTableContext) GetCollation() string {+ if x != nil {+ return x.Collation+ }+ return ""+}++func (x *CreateTableContext) GetComment() string {+ if x != nil {+ return x.Comment+ }+ return ""+}++func (x *CreateTableContext) GetAddColumnContexts() []*AddColumnContext {+ if x != nil {+ return x.AddColumnContexts+ }+ return nil+}++func (x *CreateTableContext) GetPrimaryKeys() []string {+ if x != nil {+ return x.PrimaryKeys+ }+ return nil+}++func (x *CreateTableContext) GetAddForeignKeyContexts() []*AddForeignKeyContext {+ if x != nil {+ return x.AddForeignKeyContexts+ }+ return nil+}++type AlterTableContext struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The name of the table to alter.+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ // The schema of the table.+ Schema string `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"`+ // List of column addition contexts.+ AddColumnContexts []*AddColumnContext `protobuf:"bytes,3,rep,name=add_column_contexts,json=addColumnContexts,proto3" json:"add_column_contexts,omitempty"`+ // List of column alteration contexts.+ AlterColumnContexts []*AlterColumnContext `protobuf:"bytes,4,rep,name=alter_column_contexts,json=alterColumnContexts,proto3" json:"alter_column_contexts,omitempty"`+ // List of column dropping contexts.+ DropColumnContexts []*DropColumnContext `protobuf:"bytes,5,rep,name=drop_column_contexts,json=dropColumnContexts,proto3" json:"drop_column_contexts,omitempty"`+ // List of primary key columns to be dropped.+ DropPrimaryKeys []string `protobuf:"bytes,6,rep,name=drop_primary_keys,json=dropPrimaryKeys,proto3" json:"drop_primary_keys,omitempty"`+ // List of primary key columns.+ PrimaryKeys []string `protobuf:"bytes,7,rep,name=primary_keys,json=primaryKeys,proto3" json:"primary_keys,omitempty"`+ // List of foreign key columns to be dropped.+ DropForeignKeys []string `protobuf:"bytes,8,rep,name=drop_foreign_keys,json=dropForeignKeys,proto3" json:"drop_foreign_keys,omitempty"`+ // List of foreign key addition contexts.+ AddForeignKeyContexts []*AddForeignKeyContext `protobuf:"bytes,9,rep,name=add_foreign_key_contexts,json=addForeignKeyContexts,proto3" json:"add_foreign_key_contexts,omitempty"`+}++func (x *AlterTableContext) Reset() {+ *x = AlterTableContext{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_edit_proto_msgTypes[5]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *AlterTableContext) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*AlterTableContext) ProtoMessage() {}++func (x *AlterTableContext) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_edit_proto_msgTypes[5]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use AlterTableContext.ProtoReflect.Descriptor instead.+func (*AlterTableContext) Descriptor() ([]byte, []int) {+ return file_v1_database_edit_proto_rawDescGZIP(), []int{5}+}++func (x *AlterTableContext) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *AlterTableContext) GetSchema() string {+ if x != nil {+ return x.Schema+ }+ return ""+}++func (x *AlterTableContext) GetAddColumnContexts() []*AddColumnContext {+ if x != nil {+ return x.AddColumnContexts+ }+ return nil+}++func (x *AlterTableContext) GetAlterColumnContexts() []*AlterColumnContext {+ if x != nil {+ return x.AlterColumnContexts+ }+ return nil+}++func (x *AlterTableContext) GetDropColumnContexts() []*DropColumnContext {+ if x != nil {+ return x.DropColumnContexts+ }+ return nil+}++func (x *AlterTableContext) GetDropPrimaryKeys() []string {+ if x != nil {+ return x.DropPrimaryKeys+ }+ return nil+}++func (x *AlterTableContext) GetPrimaryKeys() []string {+ if x != nil {+ return x.PrimaryKeys+ }+ return nil+}++func (x *AlterTableContext) GetDropForeignKeys() []string {+ if x != nil {+ return x.DropForeignKeys+ }+ return nil+}++func (x *AlterTableContext) GetAddForeignKeyContexts() []*AddForeignKeyContext {+ if x != nil {+ return x.AddForeignKeyContexts+ }+ return nil+}++type RenameTableContext struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The schema of the table.+ Schema string `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"`+ // The old name of the table.+ OldName string `protobuf:"bytes,2,opt,name=old_name,json=oldName,proto3" json:"old_name,omitempty"`+ // The new name of the table.+ NewName string `protobuf:"bytes,3,opt,name=new_name,json=newName,proto3" json:"new_name,omitempty"`+}++func (x *RenameTableContext) Reset() {+ *x = RenameTableContext{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_edit_proto_msgTypes[6]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *RenameTableContext) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*RenameTableContext) ProtoMessage() {}++func (x *RenameTableContext) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_edit_proto_msgTypes[6]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use RenameTableContext.ProtoReflect.Descriptor instead.+func (*RenameTableContext) Descriptor() ([]byte, []int) {+ return file_v1_database_edit_proto_rawDescGZIP(), []int{6}+}++func (x *RenameTableContext) GetSchema() string {+ if x != nil {+ return x.Schema+ }+ return ""+}++func (x *RenameTableContext) GetOldName() string {+ if x != nil {+ return x.OldName+ }+ return ""+}++func (x *RenameTableContext) GetNewName() string {+ if x != nil {+ return x.NewName+ }+ return ""+}++type DropTableContext struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The name of the table to drop.+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ // The schema of the table.+ Schema string `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"`+}++func (x *DropTableContext) Reset() {+ *x = DropTableContext{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_edit_proto_msgTypes[7]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *DropTableContext) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DropTableContext) ProtoMessage() {}++func (x *DropTableContext) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_edit_proto_msgTypes[7]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DropTableContext.ProtoReflect.Descriptor instead.+func (*DropTableContext) Descriptor() ([]byte, []int) {+ return file_v1_database_edit_proto_rawDescGZIP(), []int{7}+}++func (x *DropTableContext) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *DropTableContext) GetSchema() string {+ if x != nil {+ return x.Schema+ }+ return ""+}++type AddColumnContext struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The name of the column to add.+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ // The type of the column.+ Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`+ // The character set of the column.+ CharacterSet string `protobuf:"bytes,3,opt,name=character_set,json=characterSet,proto3" json:"character_set,omitempty"`+ // The collation of the column.+ Collation string `protobuf:"bytes,4,opt,name=collation,proto3" json:"collation,omitempty"`+ // The comment of the column.+ Comment string `protobuf:"bytes,5,opt,name=comment,proto3" json:"comment,omitempty"`+ // Whether the column is nullable.+ Nullable bool `protobuf:"varint,6,opt,name=nullable,proto3" json:"nullable,omitempty"`+ // The default value of the column.+ DefaultValue string `protobuf:"bytes,7,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`+ // Whether the column has a default value.+ HasDefaultValue bool `protobuf:"varint,8,opt,name=has_default_value,json=hasDefaultValue,proto3" json:"has_default_value,omitempty"`+}++func (x *AddColumnContext) Reset() {+ *x = AddColumnContext{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_edit_proto_msgTypes[8]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *AddColumnContext) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*AddColumnContext) ProtoMessage() {}++func (x *AddColumnContext) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_edit_proto_msgTypes[8]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use AddColumnContext.ProtoReflect.Descriptor instead.+func (*AddColumnContext) Descriptor() ([]byte, []int) {+ return file_v1_database_edit_proto_rawDescGZIP(), []int{8}+}++func (x *AddColumnContext) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *AddColumnContext) GetType() string {+ if x != nil {+ return x.Type+ }+ return ""+}++func (x *AddColumnContext) GetCharacterSet() string {+ if x != nil {+ return x.CharacterSet+ }+ return ""+}++func (x *AddColumnContext) GetCollation() string {+ if x != nil {+ return x.Collation+ }+ return ""+}++func (x *AddColumnContext) GetComment() string {+ if x != nil {+ return x.Comment+ }+ return ""+}++func (x *AddColumnContext) GetNullable() bool {+ if x != nil {+ return x.Nullable+ }+ return false+}++func (x *AddColumnContext) GetDefaultValue() string {+ if x != nil {+ return x.DefaultValue+ }+ return ""+}++func (x *AddColumnContext) GetHasDefaultValue() bool {+ if x != nil {+ return x.HasDefaultValue+ }+ return false+}++type AlterColumnContext struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The old name of the column.+ OldName string `protobuf:"bytes,1,opt,name=old_name,json=oldName,proto3" json:"old_name,omitempty"`+ // The new name of the column.+ NewName string `protobuf:"bytes,2,opt,name=new_name,json=newName,proto3" json:"new_name,omitempty"`+ // The type of the column.+ Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`+ // The character set of the column.+ CharacterSet string `protobuf:"bytes,4,opt,name=character_set,json=characterSet,proto3" json:"character_set,omitempty"`+ // The collation of the column.+ Collation string `protobuf:"bytes,5,opt,name=collation,proto3" json:"collation,omitempty"`+ // The comment of the column.+ Comment string `protobuf:"bytes,6,opt,name=comment,proto3" json:"comment,omitempty"`+ // Whether the column is nullable.+ Nullable bool `protobuf:"varint,7,opt,name=nullable,proto3" json:"nullable,omitempty"`+ // The default value of the column.+ DefaultValue string `protobuf:"bytes,8,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"`+ // Whether the default value of the column has changed.+ IsDefaultValueChanged bool `protobuf:"varint,9,opt,name=is_default_value_changed,json=isDefaultValueChanged,proto3" json:"is_default_value_changed,omitempty"`+}++func (x *AlterColumnContext) Reset() {+ *x = AlterColumnContext{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_edit_proto_msgTypes[9]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *AlterColumnContext) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*AlterColumnContext) ProtoMessage() {}++func (x *AlterColumnContext) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_edit_proto_msgTypes[9]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use AlterColumnContext.ProtoReflect.Descriptor instead.+func (*AlterColumnContext) Descriptor() ([]byte, []int) {+ return file_v1_database_edit_proto_rawDescGZIP(), []int{9}+}++func (x *AlterColumnContext) GetOldName() string {+ if x != nil {+ return x.OldName+ }+ return ""+}++func (x *AlterColumnContext) GetNewName() string {+ if x != nil {+ return x.NewName+ }+ return ""+}++func (x *AlterColumnContext) GetType() string {+ if x != nil {+ return x.Type+ }+ return ""+}++func (x *AlterColumnContext) GetCharacterSet() string {+ if x != nil {+ return x.CharacterSet+ }+ return ""+}++func (x *AlterColumnContext) GetCollation() string {+ if x != nil {+ return x.Collation+ }+ return ""+}++func (x *AlterColumnContext) GetComment() string {+ if x != nil {+ return x.Comment+ }+ return ""+}++func (x *AlterColumnContext) GetNullable() bool {+ if x != nil {+ return x.Nullable+ }+ return false+}++func (x *AlterColumnContext) GetDefaultValue() string {+ if x != nil {+ return x.DefaultValue+ }+ return ""+}++func (x *AlterColumnContext) GetIsDefaultValueChanged() bool {+ if x != nil {+ return x.IsDefaultValueChanged+ }+ return false+}++type DropColumnContext struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The name of the column to drop.+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+}++func (x *DropColumnContext) Reset() {+ *x = DropColumnContext{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_edit_proto_msgTypes[10]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *DropColumnContext) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*DropColumnContext) ProtoMessage() {}++func (x *DropColumnContext) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_edit_proto_msgTypes[10]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use DropColumnContext.ProtoReflect.Descriptor instead.+func (*DropColumnContext) Descriptor() ([]byte, []int) {+ return file_v1_database_edit_proto_rawDescGZIP(), []int{10}+}++func (x *DropColumnContext) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++type AddForeignKeyContext struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The column of the foreign key.+ Column string `protobuf:"bytes,1,opt,name=column,proto3" json:"column,omitempty"`+ // The referenced schema of the foreign key.+ ReferencedSchema string `protobuf:"bytes,2,opt,name=referenced_schema,json=referencedSchema,proto3" json:"referenced_schema,omitempty"`+ // The referenced table of the foreign key.+ ReferencedTable string `protobuf:"bytes,3,opt,name=referenced_table,json=referencedTable,proto3" json:"referenced_table,omitempty"`+ // The referenced column of the foreign key.+ ReferencedColumn string `protobuf:"bytes,4,opt,name=referenced_column,json=referencedColumn,proto3" json:"referenced_column,omitempty"`+}++func (x *AddForeignKeyContext) Reset() {+ *x = AddForeignKeyContext{}+ if protoimpl.UnsafeEnabled {+ mi := &file_v1_database_edit_proto_msgTypes[11]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *AddForeignKeyContext) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*AddForeignKeyContext) ProtoMessage() {}++func (x *AddForeignKeyContext) ProtoReflect() protoreflect.Message {+ mi := &file_v1_database_edit_proto_msgTypes[11]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use AddForeignKeyContext.ProtoReflect.Descriptor instead.+func (*AddForeignKeyContext) Descriptor() ([]byte, []int) {+ return file_v1_database_edit_proto_rawDescGZIP(), []int{11}+}++func (x *AddForeignKeyContext) GetColumn() string {+ if x != nil {+ return x.Column+ }+ return ""+}++func (x *AddForeignKeyContext) GetReferencedSchema() string {+ if x != nil {+ return x.ReferencedSchema+ }+ return ""+}++func (x *AddForeignKeyContext) GetReferencedTable() string {+ if x != nil {+ return x.ReferencedTable+ }+ return ""+}++func (x *AddForeignKeyContext) GetReferencedColumn() string {+ if x != nil {+ return x.ReferencedColumn+ }+ return ""+}++var File_v1_database_edit_proto protoreflect.FileDescriptor++var file_v1_database_edit_proto_rawDesc = []byte{+ 0x0a, 0x16, 0x76, 0x31, 0x2f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x65, 0x64,+ 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x22, 0xdb, 0x04, 0x0a, 0x0c, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61,+ 0x73, 0x65, 0x45, 0x64, 0x69, 0x74, 0x12, 0x56, 0x0a, 0x16, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,+ 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73,+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d,+ 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x14, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,+ 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x56,+ 0x0a, 0x16, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f,+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6e,+ 0x61, 0x6d, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,+ 0x52, 0x14, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f,+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x50, 0x0a, 0x14, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x73,+ 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x03,+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e,+ 0x74, 0x65, 0x78, 0x74, 0x52, 0x12, 0x64, 0x72, 0x6f, 0x70, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61,+ 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x53, 0x0a, 0x15, 0x63, 0x72, 0x65, 0x61,+ 0x74, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,+ 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x62, 0x6c,+ 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x13, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,+ 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x50, 0x0a,+ 0x14, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e,+ 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x54,+ 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x12, 0x61, 0x6c, 0x74,+ 0x65, 0x72, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12,+ 0x53, 0x0a, 0x15, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f,+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6e,+ 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52,+ 0x13, 0x72, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74,+ 0x65, 0x78, 0x74, 0x73, 0x12, 0x4d, 0x0a, 0x13, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x74, 0x61, 0x62,+ 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28,+ 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,+ 0x44, 0x72, 0x6f, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,+ 0x52, 0x11, 0x64, 0x72, 0x6f, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65,+ 0x78, 0x74, 0x73, 0x22, 0x29, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68,+ 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,+ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4b,+ 0x0a, 0x13, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f,+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d,+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65,+ 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x27, 0x0a, 0x11, 0x44,+ 0x72, 0x6f, 0x70, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,+ 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,+ 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x97, 0x03, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,+ 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,+ 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,+ 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65,+ 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x6e, 0x67,+ 0x69, 0x6e, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72,+ 0x5f, 0x73, 0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x72,+ 0x61, 0x63, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6c, 0x6c,+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6c,+ 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,+ 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74,+ 0x12, 0x4d, 0x0a, 0x13, 0x61, 0x64, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x63,+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43,+ 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x11, 0x61, 0x64,+ 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12,+ 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18,+ 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65,+ 0x79, 0x73, 0x12, 0x5a, 0x0a, 0x18, 0x61, 0x64, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67,+ 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x0a,+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79,+ 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x15, 0x61, 0x64, 0x64, 0x46, 0x6f, 0x72, 0x65,+ 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x22, 0x8c,+ 0x04, 0x0a, 0x11, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e,+ 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65,+ 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61,+ 0x12, 0x4d, 0x0a, 0x13, 0x61, 0x64, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x63,+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x43,+ 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x11, 0x61, 0x64,+ 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12,+ 0x53, 0x0a, 0x15, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f,+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x74,+ 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52,+ 0x13, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x43, 0x6f, 0x6e, 0x74,+ 0x65, 0x78, 0x74, 0x73, 0x12, 0x50, 0x0a, 0x14, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x63, 0x6f, 0x6c,+ 0x75, 0x6d, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03,+ 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65,+ 0x78, 0x74, 0x52, 0x12, 0x64, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x43, 0x6f,+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x70,+ 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28,+ 0x09, 0x52, 0x0f, 0x64, 0x72, 0x6f, 0x70, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x4b, 0x65,+ 0x79, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x6b, 0x65,+ 0x79, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72,+ 0x79, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x72, 0x6f, 0x70, 0x5f, 0x66, 0x6f,+ 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09,+ 0x52, 0x0f, 0x64, 0x72, 0x6f, 0x70, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79,+ 0x73, 0x12, 0x5a, 0x0a, 0x18, 0x61, 0x64, 0x64, 0x5f, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e,+ 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x18, 0x09, 0x20,+ 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x31, 0x2e, 0x41, 0x64, 0x64, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x43,+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x15, 0x61, 0x64, 0x64, 0x46, 0x6f, 0x72, 0x65, 0x69,+ 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x22, 0x62, 0x0a,+ 0x12, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x74,+ 0x65, 0x78, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20,+ 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x19, 0x0a, 0x08, 0x6f,+ 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f,+ 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x6e, 0x61,+ 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x4e, 0x61, 0x6d,+ 0x65, 0x22, 0x3e, 0x0a, 0x10, 0x44, 0x72, 0x6f, 0x70, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x43, 0x6f,+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68,+ 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d,+ 0x61, 0x22, 0x84, 0x02, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x43,+ 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79,+ 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23,+ 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x18,+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72,+ 0x53, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f,+ 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e,+ 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e,+ 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75,+ 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,+ 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x11,+ 0x68, 0x61, 0x73, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75,+ 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x68, 0x61, 0x73, 0x44, 0x65, 0x66, 0x61,+ 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xb5, 0x02, 0x0a, 0x12, 0x41, 0x6c, 0x74,+ 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12,+ 0x19, 0x0a, 0x08, 0x6f, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x07, 0x6f, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65,+ 0x77, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65,+ 0x77, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20,+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61,+ 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,+ 0x52, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x12, 0x1c,+ 0x0a, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07,+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,+ 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62,+ 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62,+ 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61,+ 0x6c, 0x75, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75,+ 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x73, 0x5f, 0x64, 0x65,+ 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e,+ 0x67, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x73, 0x44, 0x65, 0x66,+ 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64,+ 0x22, 0x27, 0x0a, 0x11, 0x44, 0x72, 0x6f, 0x70, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x43, 0x6f,+ 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xb3, 0x01, 0x0a, 0x14, 0x41, 0x64,+ 0x64, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65,+ 0x78, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x01, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65,+ 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18,+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,+ 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x65, 0x72,+ 0x65, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x0f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x54, 0x61, 0x62,+ 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64,+ 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72,+ 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x42,+ 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f,+ 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+}++var (+ file_v1_database_edit_proto_rawDescOnce sync.Once+ file_v1_database_edit_proto_rawDescData = file_v1_database_edit_proto_rawDesc+)++func file_v1_database_edit_proto_rawDescGZIP() []byte {+ file_v1_database_edit_proto_rawDescOnce.Do(func() {+ file_v1_database_edit_proto_rawDescData = protoimpl.X.CompressGZIP(file_v1_database_edit_proto_rawDescData)+ })+ return file_v1_database_edit_proto_rawDescData+}++var file_v1_database_edit_proto_msgTypes = make([]protoimpl.MessageInfo, 12)+var file_v1_database_edit_proto_goTypes = []interface{}{+ (*DatabaseEdit)(nil), // 0: bytebase.v1.DatabaseEdit+ (*CreateSchemaContext)(nil), // 1: bytebase.v1.CreateSchemaContext+ (*RenameSchemaContext)(nil), // 2: bytebase.v1.RenameSchemaContext+ (*DropSchemaContext)(nil), // 3: bytebase.v1.DropSchemaContext+ (*CreateTableContext)(nil), // 4: bytebase.v1.CreateTableContext+ (*AlterTableContext)(nil), // 5: bytebase.v1.AlterTableContext+ (*RenameTableContext)(nil), // 6: bytebase.v1.RenameTableContext+ (*DropTableContext)(nil), // 7: bytebase.v1.DropTableContext+ (*AddColumnContext)(nil), // 8: bytebase.v1.AddColumnContext+ (*AlterColumnContext)(nil), // 9: bytebase.v1.AlterColumnContext+ (*DropColumnContext)(nil), // 10: bytebase.v1.DropColumnContext+ (*AddForeignKeyContext)(nil), // 11: bytebase.v1.AddForeignKeyContext+}+var file_v1_database_edit_proto_depIdxs = []int32{+ 1, // 0: bytebase.v1.DatabaseEdit.create_schema_contexts:type_name -> bytebase.v1.CreateSchemaContext+ 2, // 1: bytebase.v1.DatabaseEdit.rename_schema_contexts:type_name -> bytebase.v1.RenameSchemaContext+ 3, // 2: bytebase.v1.DatabaseEdit.drop_schema_contexts:type_name -> bytebase.v1.DropSchemaContext+ 4, // 3: bytebase.v1.DatabaseEdit.create_table_contexts:type_name -> bytebase.v1.CreateTableContext+ 5, // 4: bytebase.v1.DatabaseEdit.alter_table_contexts:type_name -> bytebase.v1.AlterTableContext+ 6, // 5: bytebase.v1.DatabaseEdit.rename_table_contexts:type_name -> bytebase.v1.RenameTableContext+ 7, // 6: bytebase.v1.DatabaseEdit.drop_table_contexts:type_name -> bytebase.v1.DropTableContext+ 8, // 7: bytebase.v1.CreateTableContext.add_column_contexts:type_name -> bytebase.v1.AddColumnContext+ 11, // 8: bytebase.v1.CreateTableContext.add_foreign_key_contexts:type_name -> bytebase.v1.AddForeignKeyContext+ 8, // 9: bytebase.v1.AlterTableContext.add_column_contexts:type_name -> bytebase.v1.AddColumnContext+ 9, // 10: bytebase.v1.AlterTableContext.alter_column_contexts:type_name -> bytebase.v1.AlterColumnContext+ 10, // 11: bytebase.v1.AlterTableContext.drop_column_contexts:type_name -> bytebase.v1.DropColumnContext+ 11, // 12: bytebase.v1.AlterTableContext.add_foreign_key_contexts:type_name -> bytebase.v1.AddForeignKeyContext+ 13, // [13:13] is the sub-list for method output_type+ 13, // [13:13] is the sub-list for method input_type+ 13, // [13:13] is the sub-list for extension type_name+ 13, // [13:13] is the sub-list for extension extendee+ 0, // [0:13] is the sub-list for field type_name+}++func init() { file_v1_database_edit_proto_init() }+func file_v1_database_edit_proto_init() {+ if File_v1_database_edit_proto != nil {+ return+ }+ if !protoimpl.UnsafeEnabled {+ file_v1_database_edit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*DatabaseEdit); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_database_edit_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*CreateSchemaContext); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_database_edit_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*RenameSchemaContext); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_database_edit_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*DropSchemaContext); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_database_edit_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*CreateTableContext); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_database_edit_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*AlterTableContext); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_database_edit_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*RenameTableContext); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_database_edit_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*DropTableContext); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_database_edit_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*AddColumnContext); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_database_edit_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*AlterColumnContext); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_database_edit_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*DropColumnContext); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_v1_database_edit_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*AddForeignKeyContext); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ }+ type x struct{}+ out := protoimpl.TypeBuilder{+ File: protoimpl.DescBuilder{+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),+ RawDescriptor: file_v1_database_edit_proto_rawDesc,+ NumEnums: 0,+ NumMessages: 12,+ NumExtensions: 0,+ NumServices: 0,+ },+ GoTypes: file_v1_database_edit_proto_goTypes,+ DependencyIndexes: file_v1_database_edit_proto_depIdxs,+ MessageInfos: file_v1_database_edit_proto_msgTypes,+ }.Build()+ File_v1_database_edit_proto = out.File+ file_v1_database_edit_proto_rawDesc = nil+ file_v1_database_edit_proto_goTypes = nil+ file_v1_database_edit_proto_depIdxs = nil+}diff --git a/proto/v1/database_edit.proto b/proto/v1/database_edit.protonew file mode 100644index 0000000000..0f0f6241a7--- /dev/null+++ b/proto/v1/database_edit.proto@@ -0,0 +1,200 @@+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;+}