Skip to content

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

chore: advice store (#12275)

Danny Xu83bda65a270e
diff --git a/frontend/src/types/proto/google/protobuf/descriptor.ts b/frontend/src/types/proto/google/protobuf/descriptor.ts
index 3185d3cbac..f12b30a9e2 100644
--- a/frontend/src/types/proto/google/protobuf/descriptor.ts
+++ b/frontend/src/types/proto/google/protobuf/descriptor.ts
@@ -8,6 +8,11 @@ export const protobufPackage = "google.protobuf";
export enum Edition {
/** EDITION_UNKNOWN - A placeholder for an unknown edition value. */
EDITION_UNKNOWN = "EDITION_UNKNOWN",
+ /**
+ * EDITION_LEGACY - A placeholder edition for specifying default behaviors *before* a feature
+ * was first introduced. This is effectively an "infinite past".
+ */
+ EDITION_LEGACY = "EDITION_LEGACY",
/**
* EDITION_PROTO2 - Legacy syntax "editions". These pre-date editions, but behave much like
* distinct editions. These can't be used to specify the edition of proto
@@ -22,6 +27,7 @@ export enum Edition {
* comparison.
*/
EDITION_2023 = "EDITION_2023",
+ EDITION_2024 = "EDITION_2024",
/**
* EDITION_1_TEST_ONLY - Placeholder editions for testing feature resolution. These should not be
* used or relyed on outside of tests.
@@ -31,6 +37,12 @@ export enum Edition {
EDITION_99997_TEST_ONLY = "EDITION_99997_TEST_ONLY",
EDITION_99998_TEST_ONLY = "EDITION_99998_TEST_ONLY",
EDITION_99999_TEST_ONLY = "EDITION_99999_TEST_ONLY",
+ /**
+ * EDITION_MAX - Placeholder for specifying unbounded edition support. This should only
+ * ever be used by plugins that can expect to never require any changes to
+ * support a new edition.
+ */
+ EDITION_MAX = "EDITION_MAX",
UNRECOGNIZED = "UNRECOGNIZED",
}
@@ -39,6 +51,9 @@ export function editionFromJSON(object: any): Edition {
case 0:
case "EDITION_UNKNOWN":
return Edition.EDITION_UNKNOWN;
+ case 900:
+ case "EDITION_LEGACY":
+ return Edition.EDITION_LEGACY;
case 998:
case "EDITION_PROTO2":
return Edition.EDITION_PROTO2;
@@ -48,6 +63,9 @@ export function editionFromJSON(object: any): Edition {
case 1000:
case "EDITION_2023":
return Edition.EDITION_2023;
+ case 1001:
+ case "EDITION_2024":
+ return Edition.EDITION_2024;
case 1:
case "EDITION_1_TEST_ONLY":
return Edition.EDITION_1_TEST_ONLY;
@@ -63,6 +81,9 @@ export function editionFromJSON(object: any): Edition {
case 99999:
case "EDITION_99999_TEST_ONLY":
return Edition.EDITION_99999_TEST_ONLY;
+ case 2147483647:
+ case "EDITION_MAX":
+ return Edition.EDITION_MAX;
case -1:
case "UNRECOGNIZED":
default:
@@ -74,12 +95,16 @@ export function editionToJSON(object: Edition): string {
switch (object) {
case Edition.EDITION_UNKNOWN:
return "EDITION_UNKNOWN";
+ case Edition.EDITION_LEGACY:
+ return "EDITION_LEGACY";
case Edition.EDITION_PROTO2:
return "EDITION_PROTO2";
case Edition.EDITION_PROTO3:
return "EDITION_PROTO3";
case Edition.EDITION_2023:
return "EDITION_2023";
+ case Edition.EDITION_2024:
+ return "EDITION_2024";
case Edition.EDITION_1_TEST_ONLY:
return "EDITION_1_TEST_ONLY";
case Edition.EDITION_2_TEST_ONLY:
@@ -90,6 +115,8 @@ export function editionToJSON(object: Edition): string {
return "EDITION_99998_TEST_ONLY";
case Edition.EDITION_99999_TEST_ONLY:
return "EDITION_99999_TEST_ONLY";
+ case Edition.EDITION_MAX:
+ return "EDITION_MAX";
case Edition.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
@@ -100,12 +127,16 @@ export function editionToNumber(object: Edition): number {
switch (object) {
case Edition.EDITION_UNKNOWN:
return 0;
+ case Edition.EDITION_LEGACY:
+ return 900;
case Edition.EDITION_PROTO2:
return 998;
case Edition.EDITION_PROTO3:
return 999;
case Edition.EDITION_2023:
return 1000;
+ case Edition.EDITION_2024:
+ return 1001;
case Edition.EDITION_1_TEST_ONLY:
return 1;
case Edition.EDITION_2_TEST_ONLY:
@@ -116,6 +147,8 @@ export function editionToNumber(object: Edition): number {
return 99998;
case Edition.EDITION_99999_TEST_ONLY:
return 99999;
+ case Edition.EDITION_MAX:
+ return 2147483647;
case Edition.UNRECOGNIZED:
default:
return -1;
@@ -357,12 +390,12 @@ export interface FieldDescriptorProto {
* If true, this is a proto3 "optional". When a proto3 field is optional, it
* tracks presence regardless of field type.
*
- * When proto3_optional is true, this field must be belong to a oneof to
- * signal to old proto3 clients that presence is tracked for this field. This
- * oneof is known as a "synthetic" oneof, and this field must be its sole
- * member (each proto3 optional field gets its own synthetic oneof). Synthetic
- * oneofs exist in the descriptor only, and do not generate any API. Synthetic
- * oneofs must be ordered after all "real" oneofs.
+ * When proto3_optional is true, this field must belong to a oneof to signal
+ * to old proto3 clients that presence is tracked for this field. This oneof
+ * is known as a "synthetic" oneof, and this field must be its sole member
+ * (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs
+ * exist in the descriptor only, and do not generate any API. Synthetic oneofs
+ * must be ordered after all "real" oneofs.
*
* For message fields, proto3_optional doesn't create any semantic change,
* since non-repeated message fields always track presence. However it still
@@ -739,12 +772,16 @@ export interface FileOptions {
*/
javaGenerateEqualsAndHash: boolean;
/**
- * If set true, then the Java2 code generator will generate code that
- * throws an exception whenever an attempt is made to assign a non-UTF-8
- * byte sequence to a string field.
- * Message reflection will do the same.
- * However, an extension field still accepts non-UTF-8 byte sequences.
- * This option has no effect on when used with the lite runtime.
+ * A proto2 file can set this to true to opt in to UTF-8 checking for Java,
+ * which will throw an exception if invalid UTF-8 is parsed from the wire or
+ * assigned to a string field.
+ *
+ * TODO: clarify exactly what kinds of field types this option
+ * applies to, and update these docs accordingly.
+ *
+ * Proto3 files already perform these checks. Setting the option explicitly to
+ * false has no effect: it cannot be used to opt proto3 files out of UTF-8
+ * checks.
*/
javaStringCheckUtf8: boolean;
optimizeFor: FileOptions_OptimizeMode;
@@ -771,7 +808,6 @@ export interface FileOptions {
ccGenericServices: boolean;
javaGenericServices: boolean;
pyGenericServices: boolean;
- phpGenericServices: boolean;
/**
* Is this file deprecated?
* Depending on the target platform, this can emit Deprecated annotations
@@ -925,10 +961,6 @@ export interface MessageOptions {
*/
deprecated: boolean;
/**
- * NOTE: Do not set the option in .proto files. Always use the maps syntax
- * instead. The option should only be implicitly set by the proto compiler
- * parser.
- *
* Whether the message is an automatically generated map entry type for the
* maps field.
*
@@ -946,6 +978,10 @@ export interface MessageOptions {
* use a native map in the target language to hold the keys and values.
* The reflection APIs in such implementations still need to work as
* if the field is a repeated message field.
+ *
+ * NOTE: Do not set the option in .proto files. Always use the maps syntax
+ * instead. The option should only be implicitly set by the proto compiler
+ * parser.
*/
mapEntry: boolean;
/**
@@ -1023,19 +1059,11 @@ export interface FieldOptions {
* call from multiple threads concurrently, while non-const methods continue
* to require exclusive access.
*
- * Note that implementations may choose not to check required fields within
- * a lazy sub-message. That is, calling IsInitialized() on the outer message
- * may return true even if the inner message has missing required fields.
- * This is necessary because otherwise the inner message would have to be
- * parsed in order to perform the check, defeating the purpose of lazy
- * parsing. An implementation which chooses not to check required fields
- * must be consistent about it. That is, for any particular sub-message, the
- * implementation must either *always* check its required fields, or *never*
- * check its required fields, regardless of whether or not the message has
- * been parsed.
- *
- * As of May 2022, lazy verifies the contents of the byte stream during
- * parsing. An invalid byte stream will cause the overall parsing to fail.
+ * Note that lazy message fields are still eagerly verified to check
+ * ill-formed wireformat or missing required fields. Calling IsInitialized()
+ * on the outer message would fail if the inner message has missing required
+ * fields. Failed verification would result in parsing failure (except when
+ * uninitialized messages are acceptable).
*/
lazy: boolean;
/**
@@ -1062,8 +1090,9 @@ export interface FieldOptions {
targets: FieldOptions_OptionTargetType[];
editionDefaults: FieldOptions_EditionDefault[];
/** Any features defined in the specific edition. */
- features:
- | FeatureSet
+ features: FeatureSet | undefined;
+ featureSupport:
+ | FieldOptions_FeatureSupport
| undefined;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
@@ -1366,6 +1395,32 @@ export interface FieldOptions_EditionDefault {
value: string;
}
+/** Information about the support window of a feature. */
+export interface FieldOptions_FeatureSupport {
+ /**
+ * The edition that this feature was first available in. In editions
+ * earlier than this one, the default assigned to EDITION_LEGACY will be
+ * used, and proto files will not be able to override it.
+ */
+ editionIntroduced: Edition;
+ /**
+ * The edition this feature becomes deprecated in. Using this after this
+ * edition may trigger warnings.
+ */
+ editionDeprecated: Edition;
+ /**
+ * The deprecation warning text if this feature is used after the edition it
+ * was marked deprecated in.
+ */
+ deprecationWarning: string;
+ /**
+ * The edition this feature is no longer available in. In editions after
+ * this one, the last default assigned will be used, and proto files will
+ * not be able to override it.
+ */
+ editionRemoved: Edition;
+}
+
export interface OneofOptions {
/** Any features defined in the specific edition. */
features:
@@ -1425,6 +1480,10 @@ export interface EnumValueOptions {
* credentials.
*/
debugRedact: boolean;
+ /** Information about the support window of a feature value. */
+ featureSupport:
+ | FieldOptions_FeatureSupport
+ | undefined;
/** The parser stores options it doesn't recognize here. See above. */
uninterpretedOption: UninterpretedOption[];
}
@@ -1742,8 +1801,8 @@ export function featureSet_RepeatedFieldEncodingToNumber(object: FeatureSet_Repe
export enum FeatureSet_Utf8Validation {
UTF8_VALIDATION_UNKNOWN = "UTF8_VALIDATION_UNKNOWN",
- NONE = "NONE",
VERIFY = "VERIFY",
+ NONE = "NONE",
UNRECOGNIZED = "UNRECOGNIZED",
}
@@ -1752,12 +1811,12 @@ export function featureSet_Utf8ValidationFromJSON(object: any): FeatureSet_Utf8V
case 0:
case "UTF8_VALIDATION_UNKNOWN":
return FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN;
- case 1:
- case "NONE":
- return FeatureSet_Utf8Validation.NONE;
case 2:
case "VERIFY":
return FeatureSet_Utf8Validation.VERIFY;
+ case 3:
+ case "NONE":
+ return FeatureSet_Utf8Validation.NONE;
case -1:
case "UNRECOGNIZED":
default:
@@ -1769,10 +1828,10 @@ export function featureSet_Utf8ValidationToJSON(object: FeatureSet_Utf8Validatio
switch (object) {
case FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN:
return "UTF8_VALIDATION_UNKNOWN";
- case FeatureSet_Utf8Validation.NONE:
- return "NONE";
case FeatureSet_Utf8Validation.VERIFY:
return "VERIFY";
+ case FeatureSet_Utf8Validation.NONE:
+ return "NONE";
case FeatureSet_Utf8Validation.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
@@ -1783,10 +1842,10 @@ export function featureSet_Utf8ValidationToNumber(object: FeatureSet_Utf8Validat
switch (object) {
case FeatureSet_Utf8Validation.UTF8_VALIDATION_UNKNOWN:
return 0;
- case FeatureSet_Utf8Validation.NONE:
- return 1;
case FeatureSet_Utf8Validation.VERIFY:
return 2;
+ case FeatureSet_Utf8Validation.NONE:
+ return 3;
case FeatureSet_Utf8Validation.UNRECOGNIZED:
default:
return -1;
@@ -1927,7 +1986,12 @@ export interface FeatureSetDefaults {
*/
export interface FeatureSetDefaults_FeatureSetEditionDefault {
edition: Edition;
- features: FeatureSet | undefined;
+ /** Defaults of features that can be overridden in this edition. */
+ overridableFeatures:
+ | FeatureSet
+ | undefined;
+ /** Defaults of features that can't be overridden in this edition. */
+ fixedFeatures: FeatureSet | undefined;
}
/**
@@ -1989,7 +2053,7 @@ export interface SourceCodeInfo_Location {
* location.
*
* Each element is a field number or an index. They form a path from
- * the root FileDescriptorProto to the place where the definition occurs.
+ * the root FileDescriptorProto to the place where the definition appears.
* For example, this path:
* [ 4, 3, 2, 7, 1 ]
* refers to:
@@ -3987,7 +4051,6 @@ function createBaseFileOptions(): FileOptions {
ccGenericServices: false,
javaGenericServices: false,
pyGenericServices: false,
- phpGenericServices: false,
deprecated: false,
ccEnableArenas: false,
objcClassPrefix: "",
@@ -4034,9 +4097,6 @@ export const FileOptions = {
if (message.pyGenericServices === true) {
writer.uint32(144).bool(message.pyGenericServices);
}
- if (message.phpGenericServices === true) {
- writer.uint32(336).bool(message.phpGenericServices);
- }
if (message.deprecated === true) {
writer.uint32(184).bool(message.deprecated);
}
@@ -4150,13 +4210,6 @@ export const FileOptions = {
message.pyGenericServices = reader.bool();
continue;
- case 42:
- if (tag !== 336) {
- break;
- }
-
- message.phpGenericServices = reader.bool();
- continue;
case 23:
if (tag !== 184) {
break;
@@ -4259,7 +4312,6 @@ export const FileOptions = {
ccGenericServices: isSet(object.ccGenericServices) ? globalThis.Boolean(object.ccGenericServices) : false,
javaGenericServices: isSet(object.javaGenericServices) ? globalThis.Boolean(object.javaGenericServices) : false,
pyGenericServices: isSet(object.pyGenericServices) ? globalThis.Boolean(object.pyGenericServices) : false,
- phpGenericServices: isSet(object.phpGenericServices) ? globalThis.Boolean(object.phpGenericServices) : false,
deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
ccEnableArenas: isSet(object.ccEnableArenas) ? globalThis.Boolean(object.ccEnableArenas) : false,
objcClassPrefix: isSet(object.objcClassPrefix) ? globalThis.String(object.objcClassPrefix) : "",
@@ -4308,9 +4360,6 @@ export const FileOptions = {
if (message.pyGenericServices === true) {
obj.pyGenericServices = message.pyGenericServices;
}
- if (message.phpGenericServices === true) {
- obj.phpGenericServices = message.phpGenericServices;
- }
if (message.deprecated === true) {
obj.deprecated = message.deprecated;
}
@@ -4362,7 +4411,6 @@ export const FileOptions = {
message.ccGenericServices = object.ccGenericServices ?? false;
message.javaGenericServices = object.javaGenericServices ?? false;
message.pyGenericServices = object.pyGenericServices ?? false;
- message.phpGenericServices = object.phpGenericServices ?? false;
message.deprecated = object.deprecated ?? false;
message.ccEnableArenas = object.ccEnableArenas ?? false;
message.objcClassPrefix = object.objcClassPrefix ?? "";
@@ -4561,6 +4609,7 @@ function createBaseFieldOptions(): FieldOptions {
targets: [],
editionDefaults: [],
features: undefined,
+ featureSupport: undefined,
uninterpretedOption: [],
};
}
@@ -4605,6 +4654,9 @@ export const FieldOptions = {
if (message.features !== undefined) {
FeatureSet.encode(message.features, writer.uint32(170).fork()).ldelim();
}
+ if (message.featureSupport !== undefined) {
+ FieldOptions_FeatureSupport.encode(message.featureSupport, writer.uint32(178).fork()).ldelim();
+ }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -4712,6 +4764,13 @@ export const FieldOptions = {
message.features = FeatureSet.decode(reader, reader.uint32());
continue;
+ case 22:
+ if (tag !== 178) {
+ break;
+ }
+
+ message.featureSupport = FieldOptions_FeatureSupport.decode(reader, reader.uint32());
+ continue;
case 999:
if (tag !== 7994) {
break;
@@ -4748,6 +4807,9 @@ export const FieldOptions = {
? object.editionDefaults.map((e: any) => FieldOptions_EditionDefault.fromJSON(e))
: [],
features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
+ featureSupport: isSet(object.featureSupport)
+ ? FieldOptions_FeatureSupport.fromJSON(object.featureSupport)
+ : undefined,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -4792,6 +4854,9 @@ export const FieldOptions = {
if (message.features !== undefined) {
obj.features = FeatureSet.toJSON(message.features);
}
+ if (message.featureSupport !== undefined) {
+ obj.featureSupport = FieldOptions_FeatureSupport.toJSON(message.featureSupport);
+ }
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
@@ -4817,6 +4882,9 @@ export const FieldOptions = {
message.features = (object.features !== undefined && object.features !== null)
? FeatureSet.fromPartial(object.features)
: undefined;
+ message.featureSupport = (object.featureSupport !== undefined && object.featureSupport !== null)
+ ? FieldOptions_FeatureSupport.fromPartial(object.featureSupport)
+ : undefined;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
@@ -4896,6 +4964,119 @@ export const FieldOptions_EditionDefault = {
},
};
+function createBaseFieldOptions_FeatureSupport(): FieldOptions_FeatureSupport {
+ return {
+ editionIntroduced: Edition.EDITION_UNKNOWN,
+ editionDeprecated: Edition.EDITION_UNKNOWN,
+ deprecationWarning: "",
+ editionRemoved: Edition.EDITION_UNKNOWN,
+ };
+}
+
+export const FieldOptions_FeatureSupport = {
+ encode(message: FieldOptions_FeatureSupport, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.editionIntroduced !== Edition.EDITION_UNKNOWN) {
+ writer.uint32(8).int32(editionToNumber(message.editionIntroduced));
+ }
+ if (message.editionDeprecated !== Edition.EDITION_UNKNOWN) {
+ writer.uint32(16).int32(editionToNumber(message.editionDeprecated));
+ }
+ if (message.deprecationWarning !== "") {
+ writer.uint32(26).string(message.deprecationWarning);
+ }
+ if (message.editionRemoved !== Edition.EDITION_UNKNOWN) {
+ writer.uint32(32).int32(editionToNumber(message.editionRemoved));
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): FieldOptions_FeatureSupport {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseFieldOptions_FeatureSupport();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 8) {
+ break;
+ }
+
+ message.editionIntroduced = editionFromJSON(reader.int32());
+ continue;
+ case 2:
+ if (tag !== 16) {
+ break;
+ }
+
+ message.editionDeprecated = editionFromJSON(reader.int32());
+ continue;
+ case 3:
+ if (tag !== 26) {
+ break;
+ }
+
+ message.deprecationWarning = reader.string();
+ continue;
+ case 4:
+ if (tag !== 32) {
+ break;
+ }
+
+ message.editionRemoved = editionFromJSON(reader.int32());
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): FieldOptions_FeatureSupport {
+ return {
+ editionIntroduced: isSet(object.editionIntroduced)
+ ? editionFromJSON(object.editionIntroduced)
+ : Edition.EDITION_UNKNOWN,
+ editionDeprecated: isSet(object.editionDeprecated)
+ ? editionFromJSON(object.editionDeprecated)
+ : Edition.EDITION_UNKNOWN,
+ deprecationWarning: isSet(object.deprecationWarning) ? globalThis.String(object.deprecationWarning) : "",
+ editionRemoved: isSet(object.editionRemoved) ? editionFromJSON(object.editionRemoved) : Edition.EDITION_UNKNOWN,
+ };
+ },
+
+ toJSON(message: FieldOptions_FeatureSupport): unknown {
+ const obj: any = {};
+ if (message.editionIntroduced !== Edition.EDITION_UNKNOWN) {
+ obj.editionIntroduced = editionToJSON(message.editionIntroduced);
+ }
+ if (message.editionDeprecated !== Edition.EDITION_UNKNOWN) {
+ obj.editionDeprecated = editionToJSON(message.editionDeprecated);
+ }
+ if (message.deprecationWarning !== "") {
+ obj.deprecationWarning = message.deprecationWarning;
+ }
+ if (message.editionRemoved !== Edition.EDITION_UNKNOWN) {
+ obj.editionRemoved = editionToJSON(message.editionRemoved);
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<FieldOptions_FeatureSupport>): FieldOptions_FeatureSupport {
+ return FieldOptions_FeatureSupport.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<FieldOptions_FeatureSupport>): FieldOptions_FeatureSupport {
+ const message = createBaseFieldOptions_FeatureSupport();
+ message.editionIntroduced = object.editionIntroduced ?? Edition.EDITION_UNKNOWN;
+ message.editionDeprecated = object.editionDeprecated ?? Edition.EDITION_UNKNOWN;
+ message.deprecationWarning = object.deprecationWarning ?? "";
+ message.editionRemoved = object.editionRemoved ?? Edition.EDITION_UNKNOWN;
+ return message;
+ },
+};
+
function createBaseOneofOptions(): OneofOptions {
return { features: undefined, uninterpretedOption: [] };
}
@@ -5106,7 +5287,13 @@ export const EnumOptions = {
};
function createBaseEnumValueOptions(): EnumValueOptions {
- return { deprecated: false, features: undefined, debugRedact: false, uninterpretedOption: [] };
+ return {
+ deprecated: false,
+ features: undefined,
+ debugRedact: false,
+ featureSupport: undefined,
+ uninterpretedOption: [],
+ };
}
export const EnumValueOptions = {
@@ -5120,6 +5307,9 @@ export const EnumValueOptions = {
if (message.debugRedact === true) {
writer.uint32(24).bool(message.debugRedact);
}
+ if (message.featureSupport !== undefined) {
+ FieldOptions_FeatureSupport.encode(message.featureSupport, writer.uint32(34).fork()).ldelim();
+ }
for (const v of message.uninterpretedOption) {
UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim();
}
@@ -5154,6 +5344,13 @@ export const EnumValueOptions = {
message.debugRedact = reader.bool();
continue;
+ case 4:
+ if (tag !== 34) {
+ break;
+ }
+
+ message.featureSupport = FieldOptions_FeatureSupport.decode(reader, reader.uint32());
+ continue;
case 999:
if (tag !== 7994) {
break;
@@ -5175,6 +5372,9 @@ export const EnumValueOptions = {
deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false,
features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
debugRedact: isSet(object.debugRedact) ? globalThis.Boolean(object.debugRedact) : false,
+ featureSupport: isSet(object.featureSupport)
+ ? FieldOptions_FeatureSupport.fromJSON(object.featureSupport)
+ : undefined,
uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption)
? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e))
: [],
@@ -5192,6 +5392,9 @@ export const EnumValueOptions = {
if (message.debugRedact === true) {
obj.debugRedact = message.debugRedact;
}
+ if (message.featureSupport !== undefined) {
+ obj.featureSupport = FieldOptions_FeatureSupport.toJSON(message.featureSupport);
+ }
if (message.uninterpretedOption?.length) {
obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e));
}
@@ -5208,6 +5411,9 @@ export const EnumValueOptions = {
? FeatureSet.fromPartial(object.features)
: undefined;
message.debugRedact = object.debugRedact ?? false;
+ message.featureSupport = (object.featureSupport !== undefined && object.featureSupport !== null)
+ ? FieldOptions_FeatureSupport.fromPartial(object.featureSupport)
+ : undefined;
message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || [];
return message;
},
@@ -5904,7 +6110,7 @@ export const FeatureSetDefaults = {
};
function createBaseFeatureSetDefaults_FeatureSetEditionDefault(): FeatureSetDefaults_FeatureSetEditionDefault {
- return { edition: Edition.EDITION_UNKNOWN, features: undefined };
+ return { edition: Edition.EDITION_UNKNOWN, overridableFeatures: undefined, fixedFeatures: undefined };
}
export const FeatureSetDefaults_FeatureSetEditionDefault = {
@@ -5912,8 +6118,11 @@ export const FeatureSetDefaults_FeatureSetEditionDefault = {
if (message.edition !== Edition.EDITION_UNKNOWN) {
writer.uint32(24).int32(editionToNumber(message.edition));
}
- if (message.features !== undefined) {
- FeatureSet.encode(message.features, writer.uint32(18).fork()).ldelim();
+ if (message.overridableFeatures !== undefined) {
+ FeatureSet.encode(message.overridableFeatures, writer.uint32(34).fork()).ldelim();
+ }
+ if (message.fixedFeatures !== undefined) {
+ FeatureSet.encode(message.fixedFeatures, writer.uint32(42).fork()).ldelim();
}
return writer;
},
@@ -5932,12 +6141,19 @@ export const FeatureSetDefaults_FeatureSetEditionDefault = {
message.edition = editionFromJSON(reader.int32());
continue;
- case 2:
- if (tag !== 18) {
+ case 4:
+ if (tag !== 34) {
break;
}
- message.features = FeatureSet.decode(reader, reader.uint32());
+ message.overridableFeatures = FeatureSet.decode(reader, reader.uint32());
+ continue;
+ case 5:
+ if (tag !== 42) {
+ break;
+ }
+
+ message.fixedFeatures = FeatureSet.decode(reader, reader.uint32());
continue;
}
if ((tag & 7) === 4 || tag === 0) {
@@ -5951,7 +6167,10 @@ export const FeatureSetDefaults_FeatureSetEditionDefault = {
fromJSON(object: any): FeatureSetDefaults_FeatureSetEditionDefault {
return {
edition: isSet(object.edition) ? editionFromJSON(object.edition) : Edition.EDITION_UNKNOWN,
- features: isSet(object.features) ? FeatureSet.fromJSON(object.features) : undefined,
+ overridableFeatures: isSet(object.overridableFeatures)
+ ? FeatureSet.fromJSON(object.overridableFeatures)
+ : undefined,
+ fixedFeatures: isSet(object.fixedFeatures) ? FeatureSet.fromJSON(object.fixedFeatures) : undefined,
};
},
@@ -5960,8 +6179,11 @@ export const FeatureSetDefaults_FeatureSetEditionDefault = {
if (message.edition !== Edition.EDITION_UNKNOWN) {
obj.edition = editionToJSON(message.edition);
}
- if (message.features !== undefined) {
- obj.features = FeatureSet.toJSON(message.features);
+ if (message.overridableFeatures !== undefined) {
+ obj.overridableFeatures = FeatureSet.toJSON(message.overridableFeatures);
+ }
+ if (message.fixedFeatures !== undefined) {
+ obj.fixedFeatures = FeatureSet.toJSON(message.fixedFeatures);
}
return obj;
},
@@ -5974,8 +6196,11 @@ export const FeatureSetDefaults_FeatureSetEditionDefault = {
): FeatureSetDefaults_FeatureSetEditionDefault {
const message = createBaseFeatureSetDefaults_FeatureSetEditionDefault();
message.edition = object.edition ?? Edition.EDITION_UNKNOWN;
- message.features = (object.features !== undefined && object.features !== null)
- ? FeatureSet.fromPartial(object.features)
+ message.overridableFeatures = (object.overridableFeatures !== undefined && object.overridableFeatures !== null)
+ ? FeatureSet.fromPartial(object.overridableFeatures)
+ : undefined;
+ message.fixedFeatures = (object.fixedFeatures !== undefined && object.fixedFeatures !== null)
+ ? FeatureSet.fromPartial(object.fixedFeatures)
: undefined;
return message;
},
diff --git a/frontend/src/types/proto/store/advice.ts b/frontend/src/types/proto/store/advice.ts
new file mode 100644
index 0000000000..bdce317478
--- /dev/null
+++ b/frontend/src/types/proto/store/advice.ts
@@ -0,0 +1,242 @@
+/* eslint-disable */
+import Long from "long";
+import _m0 from "protobufjs/minimal";
+import { Position } from "./common";
+
+export const protobufPackage = "bytebase.store";
+
+export interface Advice {
+ /** The advice status. */
+ status: Advice_Status;
+ /** The advice code. */
+ code: number;
+ /** The advice title. */
+ title: string;
+ /** The advice content. */
+ content: string;
+ /** The advice detail. */
+ detail: string;
+ startPosition: Position | undefined;
+}
+
+export enum Advice_Status {
+ /** STATUS_UNSPECIFIED - Unspecified. */
+ STATUS_UNSPECIFIED = "STATUS_UNSPECIFIED",
+ SUCCESS = "SUCCESS",
+ WARNING = "WARNING",
+ ERROR = "ERROR",
+ UNRECOGNIZED = "UNRECOGNIZED",
+}
+
+export function advice_StatusFromJSON(object: any): Advice_Status {
+ switch (object) {
+ case 0:
+ case "STATUS_UNSPECIFIED":
+ return Advice_Status.STATUS_UNSPECIFIED;
+ case 1:
+ case "SUCCESS":
+ return Advice_Status.SUCCESS;
+ case 2:
+ case "WARNING":
+ return Advice_Status.WARNING;
+ case 3:
+ case "ERROR":
+ return Advice_Status.ERROR;
+ case -1:
+ case "UNRECOGNIZED":
+ default:
+ return Advice_Status.UNRECOGNIZED;
+ }
+}
+
+export function advice_StatusToJSON(object: Advice_Status): string {
+ switch (object) {
+ case Advice_Status.STATUS_UNSPECIFIED:
+ return "STATUS_UNSPECIFIED";
+ case Advice_Status.SUCCESS:
+ return "SUCCESS";
+ case Advice_Status.WARNING:
+ return "WARNING";
+ case Advice_Status.ERROR:
+ return "ERROR";
+ case Advice_Status.UNRECOGNIZED:
+ default:
+ return "UNRECOGNIZED";
+ }
+}
+
+export function advice_StatusToNumber(object: Advice_Status): number {
+ switch (object) {
+ case Advice_Status.STATUS_UNSPECIFIED:
+ return 0;
+ case Advice_Status.SUCCESS:
+ return 1;
+ case Advice_Status.WARNING:
+ return 2;
+ case Advice_Status.ERROR:
+ return 3;
+ case Advice_Status.UNRECOGNIZED:
+ default:
+ return -1;
+ }
+}
+
+function createBaseAdvice(): Advice {
+ return {
+ status: Advice_Status.STATUS_UNSPECIFIED,
+ code: 0,
+ title: "",
+ content: "",
+ detail: "",
+ startPosition: undefined,
+ };
+}
+
+export const Advice = {
+ encode(message: Advice, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.status !== Advice_Status.STATUS_UNSPECIFIED) {
+ writer.uint32(8).int32(advice_StatusToNumber(message.status));
+ }
+ if (message.code !== 0) {
+ writer.uint32(16).int32(message.code);
+ }
+ if (message.title !== "") {
+ writer.uint32(26).string(message.title);
+ }
+ if (message.content !== "") {
+ writer.uint32(34).string(message.content);
+ }
+ if (message.detail !== "") {
+ writer.uint32(42).string(message.detail);
+ }
+ if (message.startPosition !== undefined) {
+ Position.encode(message.startPosition, writer.uint32(50).fork()).ldelim();
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): Advice {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBaseAdvice();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 8) {
+ break;
+ }
+
+ message.status = advice_StatusFromJSON(reader.int32());
+ continue;
+ case 2:
+ if (tag !== 16) {
+ break;
+ }
+
+ message.code = reader.int32();
+ continue;
+ case 3:
+ if (tag !== 26) {
+ break;
+ }
+
+ message.title = reader.string();
+ continue;
+ case 4:
+ if (tag !== 34) {
+ break;
+ }
+
+ message.content = reader.string();
+ continue;
+ case 5:
+ if (tag !== 42) {
+ break;
+ }
+
+ message.detail = reader.string();
+ continue;
+ case 6:
+ if (tag !== 50) {
+ break;
+ }
+
+ message.startPosition = Position.decode(reader, reader.uint32());
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): Advice {
+ return {
+ status: isSet(object.status) ? advice_StatusFromJSON(object.status) : Advice_Status.STATUS_UNSPECIFIED,
+ code: isSet(object.code) ? globalThis.Number(object.code) : 0,
+ title: isSet(object.title) ? globalThis.String(object.title) : "",
+ content: isSet(object.content) ? globalThis.String(object.content) : "",
+ detail: isSet(object.detail) ? globalThis.String(object.detail) : "",
+ startPosition: isSet(object.startPosition) ? Position.fromJSON(object.startPosition) : undefined,
+ };
+ },
+
+ toJSON(message: Advice): unknown {
+ const obj: any = {};
+ if (message.status !== Advice_Status.STATUS_UNSPECIFIED) {
+ obj.status = advice_StatusToJSON(message.status);
+ }
+ if (message.code !== 0) {
+ obj.code = Math.round(message.code);
+ }
+ if (message.title !== "") {
+ obj.title = message.title;
+ }
+ if (message.content !== "") {
+ obj.content = message.content;
+ }
+ if (message.detail !== "") {
+ obj.detail = message.detail;
+ }
+ if (message.startPosition !== undefined) {
+ obj.startPosition = Position.toJSON(message.startPosition);
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<Advice>): Advice {
+ return Advice.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<Advice>): Advice {
+ const message = createBaseAdvice();
+ message.status = object.status ?? Advice_Status.STATUS_UNSPECIFIED;
+ message.code = object.code ?? 0;
+ message.title = object.title ?? "";
+ message.content = object.content ?? "";
+ message.detail = object.detail ?? "";
+ message.startPosition = (object.startPosition !== undefined && object.startPosition !== null)
+ ? Position.fromPartial(object.startPosition)
+ : undefined;
+ return message;
+ },
+};
+
+type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
+
+export type DeepPartial<T> = T extends Builtin ? T
+ : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
+ : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
+ : T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
+ : Partial<T>;
+
+if (_m0.util.Long !== Long) {
+ _m0.util.Long = Long as any;
+ _m0.configure();
+}
+
+function isSet(value: any): boolean {
+ return value !== null && value !== undefined;
+}
diff --git a/frontend/src/types/proto/store/common.ts b/frontend/src/types/proto/store/common.ts
index ca011a7984..f736f8c787 100644
--- a/frontend/src/types/proto/store/common.ts
+++ b/frontend/src/types/proto/store/common.ts
@@ -434,6 +434,11 @@ export interface PageToken {
offset: number;
}
+export interface Position {
+ line: number;
+ column: number;
+}
+
function createBasePageToken(): PageToken {
return { limit: 0, offset: 0 };
}
@@ -508,6 +513,80 @@ export const PageToken = {
},
};
+function createBasePosition(): Position {
+ return { line: 0, column: 0 };
+}
+
+export const Position = {
+ encode(message: Position, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
+ if (message.line !== 0) {
+ writer.uint32(8).int32(message.line);
+ }
+ if (message.column !== 0) {
+ writer.uint32(16).int32(message.column);
+ }
+ return writer;
+ },
+
+ decode(input: _m0.Reader | Uint8Array, length?: number): Position {
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
+ let end = length === undefined ? reader.len : reader.pos + length;
+ const message = createBasePosition();
+ while (reader.pos < end) {
+ const tag = reader.uint32();
+ switch (tag >>> 3) {
+ case 1:
+ if (tag !== 8) {
+ break;
+ }
+
+ message.line = reader.int32();
+ continue;
+ case 2:
+ if (tag !== 16) {
+ break;
+ }
+
+ message.column = reader.int32();
+ continue;
+ }
+ if ((tag & 7) === 4 || tag === 0) {
+ break;
+ }
+ reader.skipType(tag & 7);
+ }
+ return message;
+ },
+
+ fromJSON(object: any): Position {
+ return {
+ line: isSet(object.line) ? globalThis.Number(object.line) : 0,
+ column: isSet(object.column) ? globalThis.Number(object.column) : 0,
+ };
+ },
+
+ toJSON(message: Position): unknown {
+ const obj: any = {};
+ if (message.line !== 0) {
+ obj.line = Math.round(message.line);
+ }
+ if (message.column !== 0) {
+ obj.column = Math.round(message.column);
+ }
+ return obj;
+ },
+
+ create(base?: DeepPartial<Position>): Position {
+ return Position.fromPartial(base ?? {});
+ },
+ fromPartial(object: DeepPartial<Position>): Position {
+ const message = createBasePosition();
+ message.line = object.line ?? 0;
+ message.column = object.column ?? 0;
+ return message;
+ },
+};
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
export type DeepPartial<T> = T extends Builtin ? T
diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.md
index e976bde198..1d833f465a 100644
--- a/proto/gen/grpc-doc/store/README.md
+++ b/proto/gen/grpc-doc/store/README.md
@@ -29,6 +29,20 @@
- [ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Action](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Action)
- [ActivityIssueCommentCreatePayload.ExternalApprovalEvent.Type](#bytebase-store-ActivityIssueCommentCreatePayload-ExternalApprovalEvent-Type)
+- [store/common.proto](#store_common-proto)
+ - [PageToken](#bytebase-store-PageToken)
+ - [Position](#bytebase-store-Position)
+
+ - [Engine](#bytebase-store-Engine)
+ - [ExportFormat](#bytebase-store-ExportFormat)
+ - [MaskingLevel](#bytebase-store-MaskingLevel)
+ - [VCSType](#bytebase-store-VCSType)
+
+- [store/advice.proto](#store_advice-proto)
+ - [Advice](#bytebase-store-Advice)
+
+ - [Advice.Status](#bytebase-store-Advice-Status)
+
- [store/audit_log.proto](#store_audit_log-proto)
- [AuditLog](#bytebase-store-AuditLog)
@@ -80,14 +94,6 @@
- [Changelist](#bytebase-store-Changelist)
- [Changelist.Change](#bytebase-store-Changelist-Change)
-- [store/common.proto](#store_common-proto)
- - [PageToken](#bytebase-store-PageToken)
-
- - [Engine](#bytebase-store-Engine)
- - [ExportFormat](#bytebase-store-ExportFormat)
- - [MaskingLevel](#bytebase-store-MaskingLevel)
- - [VCSType](#bytebase-store-VCSType)
-
- [store/data_source.proto](#store_data_source-proto)
- [DataSourceExternalSecret](#bytebase-store-DataSourceExternalSecret)
- [DataSourceExternalSecret.AppRoleAuthOption](#bytebase-store-DataSourceExternalSecret-AppRoleAuthOption)
@@ -630,6 +636,182 @@ convert to the expected struct there.
+<a name="store_common-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## store/common.proto
+
+
+
+<a name="bytebase-store-PageToken"></a>
+
+### PageToken
+Used internally for obfuscating the page token.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| limit | [int32](#int32) | | |
+| offset | [int32](#int32) | | |
+
+
+
+
+
+
+<a name="bytebase-store-Position"></a>
+
+### Position
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| line | [int32](#int32) | | |
+| column | [int32](#int32) | | |
+
+
+
+
+
+
+
+
+<a name="bytebase-store-Engine"></a>
+
+### Engine
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| ENGINE_UNSPECIFIED | 0 | |
+| CLICKHOUSE | 1 | |
+| MYSQL | 2 | |
+| POSTGRES | 3 | |
+| SNOWFLAKE | 4 | |
+| SQLITE | 5 | |
+| TIDB | 6 | |
+| MONGODB | 7 | |
+| REDIS | 8 | |
+| ORACLE | 9 | |
+| SPANNER | 10 | |
+| MSSQL | 11 | |
+| REDSHIFT | 12 | |
+| MARIADB | 13 | |
+| OCEANBASE | 14 | |
+| DM | 15 | |
+| RISINGWAVE | 16 | |
+| OCEANBASE_ORACLE | 17 | |
+| STARROCKS | 18 | |
+| DORIS | 19 | |
+| HIVE | 20 | |
+| ELASTICSEARCH | 21 | |
+| BIGQUERY | 22 | |
+| DYNAMODB | 23 | |
+
+
+
+<a name="bytebase-store-ExportFormat"></a>
+
+### ExportFormat
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| FORMAT_UNSPECIFIED | 0 | |
+| CSV | 1 | |
+| JSON | 2 | |
+| SQL | 3 | |
+| XLSX | 4 | |
+
+
+
+<a name="bytebase-store-MaskingLevel"></a>
+
+### MaskingLevel
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| MASKING_LEVEL_UNSPECIFIED | 0 | |
+| NONE | 1 | |
+| PARTIAL | 2 | |
+| FULL | 3 | |
+
+
+
+<a name="bytebase-store-VCSType"></a>
+
+### VCSType
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| VCS_TYPE_UNSPECIFIED | 0 | |
+| GITHUB | 1 | GitHub type. Using for GitHub community edition(ce). |
+| GITLAB | 2 | GitLab type. Using for GitLab community edition(ce) and enterprise edition(ee). |
+| BITBUCKET | 3 | BitBucket type. Using for BitBucket cloud or BitBucket server. |
+| AZURE_DEVOPS | 4 | Azure DevOps. Using for Azure DevOps GitOps workflow. |
+
+
+
+
+
+
+
+
+
+
+<a name="store_advice-proto"></a>
+<p align="right"><a href="#top">Top</a></p>
+
+## store/advice.proto
+
+
+
+<a name="bytebase-store-Advice"></a>
+
+### Advice
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| status | [Advice.Status](#bytebase-store-Advice-Status) | | The advice status. |
+| code | [int32](#int32) | | The advice code. |
+| title | [string](#string) | | The advice title. |
+| content | [string](#string) | | The advice content. |
+| detail | [string](#string) | | The advice detail. |
+| start_position | [Position](#bytebase-store-Position) | | |
+
+
+
+
+
+
+
+
+<a name="bytebase-store-Advice-Status"></a>
+
+### Advice.Status
+
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| STATUS_UNSPECIFIED | 0 | Unspecified. |
+| SUCCESS | 1 | |
+| WARNING | 2 | |
+| ERROR | 3 | |
+
+
+
+
+
+
+
+
+
+
<a name="store_audit_log-proto"></a>
<p align="right"><a href="#top">Top</a></p>
@@ -1448,116 +1630,6 @@ PostgreSQL: RANGE, LIST, HASH (https://www.postgresql.org/docs/current/ddl-parti
-<a name="store_common-proto"></a>
-<p align="right"><a href="#top">Top</a></p>
-
-## store/common.proto
-
-
-
-<a name="bytebase-store-PageToken"></a>
-
-### PageToken
-Used internally for obfuscating the page token.
-
-
-| Field | Type | Label | Description |
-| ----- | ---- | ----- | ----------- |
-| limit | [int32](#int32) | | |
-| offset | [int32](#int32) | | |
-
-
-
-
-
-
-
-
-<a name="bytebase-store-Engine"></a>
-
-### Engine
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| ENGINE_UNSPECIFIED | 0 | |
-| CLICKHOUSE | 1 | |
-| MYSQL | 2 | |
-| POSTGRES | 3 | |
-| SNOWFLAKE | 4 | |
-| SQLITE | 5 | |
-| TIDB | 6 | |
-| MONGODB | 7 | |
-| REDIS | 8 | |
-| ORACLE | 9 | |
-| SPANNER | 10 | |
-| MSSQL | 11 | |
-| REDSHIFT | 12 | |
-| MARIADB | 13 | |
-| OCEANBASE | 14 | |
-| DM | 15 | |
-| RISINGWAVE | 16 | |
-| OCEANBASE_ORACLE | 17 | |
-| STARROCKS | 18 | |
-| DORIS | 19 | |
-| HIVE | 20 | |
-| ELASTICSEARCH | 21 | |
-| BIGQUERY | 22 | |
-| DYNAMODB | 23 | |
-
-
-
-<a name="bytebase-store-ExportFormat"></a>
-
-### ExportFormat
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| FORMAT_UNSPECIFIED | 0 | |
-| CSV | 1 | |
-| JSON | 2 | |
-| SQL | 3 | |
-| XLSX | 4 | |
-
-
-
-<a name="bytebase-store-MaskingLevel"></a>
-
-### MaskingLevel
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| MASKING_LEVEL_UNSPECIFIED | 0 | |
-| NONE | 1 | |
-| PARTIAL | 2 | |
-| FULL | 3 | |
-
-
-
-<a name="bytebase-store-VCSType"></a>
-
-### VCSType
-
-
-| Name | Number | Description |
-| ---- | ------ | ----------- |
-| VCS_TYPE_UNSPECIFIED | 0 | |
-| GITHUB | 1 | GitHub type. Using for GitHub community edition(ce). |
-| GITLAB | 2 | GitLab type. Using for GitLab community edition(ce) and enterprise edition(ee). |
-| BITBUCKET | 3 | BitBucket type. Using for BitBucket cloud or BitBucket server. |
-| AZURE_DEVOPS | 4 | Azure DevOps. Using for Azure DevOps GitOps workflow. |
-
-
-
-
-
-
-
-
-
-
<a name="store_data_source-proto"></a>
<p align="right"><a href="#top">Top</a></p>
diff --git a/proto/gen/grpc-doc/store/index.html b/proto/gen/grpc-doc/store/index.html
index 7e3a6f2d91..3d2ebbc45e 100644
--- a/proto/gen/grpc-doc/store/index.html
+++ b/proto/gen/grpc-doc/store/index.html
@@ -276,6 +276,60 @@
</li>
+ <li>
+ <a href="#store%2fcommon.proto">store/common.proto</a>
+ <ul>
+
+ <li>
+ <a href="#bytebase.store.PageToken"><span class="badge">M</span>PageToken</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.store.Position"><span class="badge">M</span>Position</a>
+ </li>
+
+
+ <li>
+ <a href="#bytebase.store.Engine"><span class="badge">E</span>Engine</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.store.ExportFormat"><span class="badge">E</span>ExportFormat</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.store.MaskingLevel"><span class="badge">E</span>MaskingLevel</a>
+ </li>
+
+ <li>
+ <a href="#bytebase.store.VCSType"><span class="badge">E</span>VCSType</a>
+ </li>
+
+
+
+ </ul>
+ </li>
+
+
+ <li>
+ <a href="#store%2fadvice.proto">store/advice.proto</a>
+ <ul>
+
+ <li>
+ <a href="#bytebase.store.Advice"><span class="badge">M</span>Advice</a>
+ </li>
+
+
+ <li>
+ <a href="#bytebase.store.Advice.Status"><span class="badge">E</span>Advice.Status</a>
+ </li>
+
+
+
+ </ul>
+ </li>
+
+
<li>
<a href="#store%2faudit_log.proto">store/audit_log.proto</a>
<ul>
@@ -484,37 +538,6 @@
</li>
- <li>
- <a href="#store%2fcommon.proto">store/common.proto</a>
- <ul>
-
- <li>
- <a href="#bytebase.store.PageToken"><span class="badge">M</span>PageToken</a>
- </li>
-
-
- <li>
- <a href="#bytebase.store.Engine"><span class="badge">E</span>Engine</a>
- </li>
-
- <li>
- <a href="#bytebase.store.ExportFormat"><span class="badge">E</span>ExportFormat</a>
- </li>
-
- <li>
- <a href="#bytebase.store.MaskingLevel"><span class="badge">E</span>MaskingLevel</a>
- </li>
-
- <li>
- <a href="#bytebase.store.VCSType"><span class="badge">E</span>VCSType</a>
- </li>
-
-
-
- </ul>
- </li>
-
-
<li>
<a href="#store%2fdata_source.proto">store/data_source.proto</a>
<ul>
@@ -1990,13 +2013,13 @@ If `true`, other fields are available. </p></td>
<div class="file-heading">
- <h2 id="store/audit_log.proto">store/audit_log.proto</h2><a href="#title">Top</a>
+ <h2 id="store/common.proto">store/common.proto</h2><a href="#title">Top</a>
</div>
<p></p>
- <h3 id="bytebase.store.AuditLog">AuditLog</h3>
- <p></p>
+ <h3 id="bytebase.store.PageToken">PageToken</h3>
+ <p>Used internally for obfuscating the page token.</p>
<table class="field-table">
@@ -2006,62 +2029,46 @@ If `true`, other fields are available. </p></td>
<tbody>
<tr>
- <td>parent</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The project or workspace the audit log belongs to.
-Formats:
-- projects/{project}
-- workspaces/{workspace} </p></td>
- </tr>
-
- <tr>
- <td>method</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>e.g. /bytebase.v1.SQLService/Query </p></td>
- </tr>
-
- <tr>
- <td>resource</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>resource name
-projects/{project} </p></td>
- </tr>
-
- <tr>
- <td>user</td>
- <td><a href="#string">string</a></td>
+ <td>limit</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>Format: users/{userUID}. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>severity</td>
- <td><a href="#bytebase.store.AuditLog.Severity">AuditLog.Severity</a></td>
+ <td>offset</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
<td><p> </p></td>
</tr>
- <tr>
- <td>request</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>Marshalled request. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.Position">Position</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>response</td>
- <td><a href="#string">string</a></td>
+ <td>line</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>Marshalled response.
-Some fields are omitted because they are too large or contain sensitive information. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>status</td>
- <td><a href="#google.rpc.Status">google.rpc.Status</a></td>
+ <td>column</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
<td><p> </p></td>
</tr>
@@ -2075,7 +2082,7 @@ Some fields are omitted because they are too large or contain sensitive informat
- <h3 id="bytebase.store.AuditLog.Severity">AuditLog.Severity</h3>
+ <h3 id="bytebase.store.Engine">Engine</h3>
<p></p>
<table class="enum-table">
<thead>
@@ -2084,152 +2091,283 @@ Some fields are omitted because they are too large or contain sensitive informat
<tbody>
<tr>
- <td>DEFAULT</td>
+ <td>ENGINE_UNSPECIFIED</td>
<td>0</td>
<td><p></p></td>
</tr>
<tr>
- <td>DEBUG</td>
+ <td>CLICKHOUSE</td>
<td>1</td>
<td><p></p></td>
</tr>
<tr>
- <td>INFO</td>
+ <td>MYSQL</td>
<td>2</td>
<td><p></p></td>
</tr>
<tr>
- <td>NOTICE</td>
+ <td>POSTGRES</td>
<td>3</td>
<td><p></p></td>
</tr>
<tr>
- <td>WARNING</td>
+ <td>SNOWFLAKE</td>
<td>4</td>
<td><p></p></td>
</tr>
<tr>
- <td>ERROR</td>
+ <td>SQLITE</td>
<td>5</td>
<td><p></p></td>
</tr>
<tr>
- <td>CRITICAL</td>
+ <td>TIDB</td>
<td>6</td>
<td><p></p></td>
</tr>
<tr>
- <td>ALERT</td>
+ <td>MONGODB</td>
<td>7</td>
<td><p></p></td>
</tr>
<tr>
- <td>EMERGENCY</td>
+ <td>REDIS</td>
<td>8</td>
<td><p></p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
-
-
- <div class="file-heading">
- <h2 id="store/database.proto">store/database.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.store.ColumnConfig">ColumnConfig</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of a column. </p></td>
- </tr>
-
- <tr>
- <td>semantic_type_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>labels</td>
- <td><a href="#bytebase.store.ColumnConfig.LabelsEntry">ColumnConfig.LabelsEntry</a></td>
- <td>repeated</td>
- <td><p>The user labels for a column. </p></td>
- </tr>
-
- <tr>
- <td>classification_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.ColumnConfig.LabelsEntry">ColumnConfig.LabelsEntry</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>key</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>value</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
+ <tr>
+ <td>ORACLE</td>
+ <td>9</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SPANNER</td>
+ <td>10</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>MSSQL</td>
+ <td>11</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>REDSHIFT</td>
+ <td>12</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>MARIADB</td>
+ <td>13</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>OCEANBASE</td>
+ <td>14</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DM</td>
+ <td>15</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>RISINGWAVE</td>
+ <td>16</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>OCEANBASE_ORACLE</td>
+ <td>17</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>STARROCKS</td>
+ <td>18</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DORIS</td>
+ <td>19</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>HIVE</td>
+ <td>20</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ELASTICSEARCH</td>
+ <td>21</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>BIGQUERY</td>
+ <td>22</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DYNAMODB</td>
+ <td>23</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.store.ExportFormat">ExportFormat</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>FORMAT_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CSV</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>JSON</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>SQL</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>XLSX</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.store.MaskingLevel">MaskingLevel</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>MASKING_LEVEL_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>NONE</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>PARTIAL</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>FULL</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.store.VCSType">VCSType</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>VCS_TYPE_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>GITHUB</td>
+ <td>1</td>
+ <td><p>GitHub type. Using for GitHub community edition(ce).</p></td>
+ </tr>
+
+ <tr>
+ <td>GITLAB</td>
+ <td>2</td>
+ <td><p>GitLab type. Using for GitLab community edition(ce) and enterprise edition(ee).</p></td>
+ </tr>
+
+ <tr>
+ <td>BITBUCKET</td>
+ <td>3</td>
+ <td><p>BitBucket type. Using for BitBucket cloud or BitBucket server.</p></td>
+ </tr>
+
+ <tr>
+ <td>AZURE_DEVOPS</td>
+ <td>4</td>
+ <td><p>Azure DevOps. Using for Azure DevOps GitOps workflow.</p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
-
+
-
- <h3 id="bytebase.store.ColumnMetadata">ColumnMetadata</h3>
- <p>ColumnMetadata is the metadata for columns.</p>
+
+
+ <div class="file-heading">
+ <h2 id="store/advice.proto">store/advice.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.store.Advice">Advice</h3>
+ <p></p>
<table class="field-table">
@@ -2239,89 +2377,45 @@ Some fields are omitted because they are too large or contain sensitive informat
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
+ <td>status</td>
+ <td><a href="#bytebase.store.Advice.Status">Advice.Status</a></td>
<td></td>
- <td><p>The name is the name of a column. </p></td>
+ <td><p>The advice status. </p></td>
</tr>
<tr>
- <td>position</td>
+ <td>code</td>
<td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The position is the position in columns. </p></td>
- </tr>
-
- <tr>
- <td>default</td>
- <td><a href="#google.protobuf.StringValue">google.protobuf.StringValue</a></td>
- <td></td>
- <td><p>The default is the default of a column. Use google.protobuf.StringValue to distinguish between an empty string default value or no default. </p></td>
- </tr>
-
- <tr>
- <td>default_null</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>default_expression</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>on_update</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The on_update is the on update action of a column.
-For MySQL like databases, it&#39;s only supported for TIMESTAMP columns with CURRENT_TIMESTAMP as on update value. </p></td>
- </tr>
-
- <tr>
- <td>nullable</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>The nullable is the nullable of a column. </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The type is the type of a column. </p></td>
+ <td><p>The advice code. </p></td>
</tr>
<tr>
- <td>character_set</td>
+ <td>title</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The character_set is the character_set of a column. </p></td>
+ <td><p>The advice title. </p></td>
</tr>
<tr>
- <td>collation</td>
+ <td>content</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The collation is the collation of a column. </p></td>
+ <td><p>The advice content. </p></td>
</tr>
<tr>
- <td>comment</td>
+ <td>detail</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment is the comment of a column.
-classification and user_comment is parsed from the comment. </p></td>
+ <td><p>The advice detail. </p></td>
</tr>
<tr>
- <td>user_comment</td>
- <td><a href="#string">string</a></td>
+ <td>start_position</td>
+ <td><a href="#bytebase.store.Position">Position</a></td>
<td></td>
- <td><p>The user_comment is the user comment of a table parsed from the comment. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -2331,78 +2425,56 @@ classification and user_comment is parsed from the comment. </p></td>
- <h3 id="bytebase.store.DatabaseConfig">DatabaseConfig</h3>
- <p></p>
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>schema_configs</td>
- <td><a href="#bytebase.store.SchemaConfig">SchemaConfig</a></td>
- <td>repeated</td>
- <td><p>The schema_configs is the list of configs for schemas in a database. </p></td>
- </tr>
-
- <tr>
- <td>classification_from_config</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>If true, we will only store the classification in the config.
-Otherwise we will get the classification from table/column comment,
-and write back to the schema metadata. </p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
-
- <h3 id="bytebase.store.DatabaseMetadata">DatabaseMetadata</h3>
- <p>DatabaseMetadata is the metadata for databases.</p>
+ <h3 id="bytebase.store.Advice.Status">Advice.Status</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>STATUS_UNSPECIFIED</td>
+ <td>0</td>
+ <td><p>Unspecified.</p></td>
+ </tr>
+
+ <tr>
+ <td>SUCCESS</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>WARNING</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ERROR</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>labels</td>
- <td><a href="#bytebase.store.DatabaseMetadata.LabelsEntry">DatabaseMetadata.LabelsEntry</a></td>
- <td>repeated</td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>last_sync_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p> </p></td>
- </tr>
-
- </tbody>
- </table>
+
-
+
+
+
+ <div class="file-heading">
+ <h2 id="store/audit_log.proto">store/audit_log.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
-
- <h3 id="bytebase.store.DatabaseMetadata.LabelsEntry">DatabaseMetadata.LabelsEntry</h3>
+ <h3 id="bytebase.store.AuditLog">AuditLog</h3>
<p></p>
@@ -2413,89 +2485,63 @@ and write back to the schema metadata. </p></td>
<tbody>
<tr>
- <td>key</td>
+ <td>parent</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The project or workspace the audit log belongs to.
+Formats:
+- projects/{project}
+- workspaces/{workspace} </p></td>
</tr>
<tr>
- <td>value</td>
+ <td>method</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>e.g. /bytebase.v1.SQLService/Query </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.DatabaseSchemaMetadata">DatabaseSchemaMetadata</h3>
- <p>DatabaseSchemaMetadata is the schema metadata for databases.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>resource</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
- </tr>
-
- <tr>
- <td>schemas</td>
- <td><a href="#bytebase.store.SchemaMetadata">SchemaMetadata</a></td>
- <td>repeated</td>
- <td><p>The schemas is the list of schemas in a database. </p></td>
+ <td><p>resource name
+projects/{project} </p></td>
</tr>
<tr>
- <td>character_set</td>
+ <td>user</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The character_set is the character set of a database. </p></td>
+ <td><p>Format: users/{userUID}. </p></td>
</tr>
<tr>
- <td>collation</td>
- <td><a href="#string">string</a></td>
+ <td>severity</td>
+ <td><a href="#bytebase.store.AuditLog.Severity">AuditLog.Severity</a></td>
<td></td>
- <td><p>The collation is the collation of a database. </p></td>
- </tr>
-
- <tr>
- <td>extensions</td>
- <td><a href="#bytebase.store.ExtensionMetadata">ExtensionMetadata</a></td>
- <td>repeated</td>
- <td><p>The extensions is the list of extensions in a database. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>datashare</td>
- <td><a href="#bool">bool</a></td>
+ <td>request</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The database belongs to a datashare. </p></td>
+ <td><p>Marshalled request. </p></td>
</tr>
<tr>
- <td>service_name</td>
+ <td>response</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The service name of the database. It&#39;s the Oracle specific concept. </p></td>
+ <td><p>Marshalled response.
+Some fields are omitted because they are too large or contain sensitive information. </p></td>
</tr>
<tr>
- <td>linked_databases</td>
- <td><a href="#bytebase.store.LinkedDatabaseMetadata">LinkedDatabaseMetadata</a></td>
- <td>repeated</td>
+ <td>status</td>
+ <td><a href="#google.rpc.Status">google.rpc.Status</a></td>
+ <td></td>
<td><p> </p></td>
</tr>
@@ -2506,8 +2552,87 @@ and write back to the schema metadata. </p></td>
- <h3 id="bytebase.store.DependentColumn">DependentColumn</h3>
- <p>DependentColumn is the metadata for dependent columns.</p>
+
+
+ <h3 id="bytebase.store.AuditLog.Severity">AuditLog.Severity</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>DEFAULT</td>
+ <td>0</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>DEBUG</td>
+ <td>1</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>INFO</td>
+ <td>2</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>NOTICE</td>
+ <td>3</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>WARNING</td>
+ <td>4</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ERROR</td>
+ <td>5</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>CRITICAL</td>
+ <td>6</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>ALERT</td>
+ <td>7</td>
+ <td><p></p></td>
+ </tr>
+
+ <tr>
+ <td>EMERGENCY</td>
+ <td>8</td>
+ <td><p></p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+
+
+ <div class="file-heading">
+ <h2 id="store/database.proto">store/database.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.store.ColumnConfig">ColumnConfig</h3>
+ <p></p>
<table class="field-table">
@@ -2517,24 +2642,31 @@ and write back to the schema metadata. </p></td>
<tbody>
<tr>
- <td>schema</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The schema is the schema of a reference column. </p></td>
+ <td><p>The name is the name of a column. </p></td>
</tr>
<tr>
- <td>table</td>
+ <td>semantic_type_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The table is the table of a reference column. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>column</td>
+ <td>labels</td>
+ <td><a href="#bytebase.store.ColumnConfig.LabelsEntry">ColumnConfig.LabelsEntry</a></td>
+ <td>repeated</td>
+ <td><p>The user labels for a column. </p></td>
+ </tr>
+
+ <tr>
+ <td>classification_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The column is the name of a reference column. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -2544,8 +2676,8 @@ and write back to the schema metadata. </p></td>
- <h3 id="bytebase.store.ExtensionMetadata">ExtensionMetadata</h3>
- <p>ExtensionMetadata is the metadata for extensions.</p>
+ <h3 id="bytebase.store.ColumnConfig.LabelsEntry">ColumnConfig.LabelsEntry</h3>
+ <p></p>
<table class="field-table">
@@ -2555,31 +2687,17 @@ and write back to the schema metadata. </p></td>
<tbody>
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of an extension. </p></td>
- </tr>
-
- <tr>
- <td>schema</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The schema is the extension that is installed to. But the extension usage is not limited to the schema. </p></td>
- </tr>
-
- <tr>
- <td>version</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The version is the version of an extension. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>description</td>
+ <td>value</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The description is the description of an extension. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -2589,8 +2707,8 @@ and write back to the schema metadata. </p></td>
- <h3 id="bytebase.store.ExternalTableMetadata">ExternalTableMetadata</h3>
- <p></p>
+ <h3 id="bytebase.store.ColumnMetadata">ColumnMetadata</h3>
+ <p>ColumnMetadata is the metadata for columns.</p>
<table class="field-table">
@@ -2603,104 +2721,86 @@ and write back to the schema metadata. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a external table. </p></td>
+ <td><p>The name is the name of a column. </p></td>
</tr>
<tr>
- <td>external_server_name</td>
- <td><a href="#string">string</a></td>
+ <td>position</td>
+ <td><a href="#int32">int32</a></td>
<td></td>
- <td><p>The external_server_name is the name of the external server. </p></td>
+ <td><p>The position is the position in columns. </p></td>
</tr>
<tr>
- <td>external_database_name</td>
- <td><a href="#string">string</a></td>
+ <td>default</td>
+ <td><a href="#google.protobuf.StringValue">google.protobuf.StringValue</a></td>
<td></td>
- <td><p>The external_database_name is the name of the external database. </p></td>
+ <td><p>The default is the default of a column. Use google.protobuf.StringValue to distinguish between an empty string default value or no default. </p></td>
</tr>
<tr>
- <td>columns</td>
- <td><a href="#bytebase.store.ColumnMetadata">ColumnMetadata</a></td>
- <td>repeated</td>
- <td><p>The columns is the ordered list of columns in a foreign table. </p></td>
+ <td>default_null</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.ForeignKeyMetadata">ForeignKeyMetadata</h3>
- <p>ForeignKeyMetadata is the metadata for foreign keys.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>default_expression</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a foreign key. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>columns</td>
- <td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The columns are the ordered referencing columns of a foreign key. </p></td>
+ <td>on_update</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The on_update is the on update action of a column.
+For MySQL like databases, it&#39;s only supported for TIMESTAMP columns with CURRENT_TIMESTAMP as on update value. </p></td>
</tr>
<tr>
- <td>referenced_schema</td>
- <td><a href="#string">string</a></td>
+ <td>nullable</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The referenced_schema is the referenced schema name of a foreign key.
-It is an empty string for databases without such concept such as MySQL. </p></td>
+ <td><p>The nullable is the nullable of a column. </p></td>
</tr>
<tr>
- <td>referenced_table</td>
+ <td>type</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The referenced_table is the referenced table name of a foreign key. </p></td>
+ <td><p>The type is the type of a column. </p></td>
</tr>
<tr>
- <td>referenced_columns</td>
+ <td>character_set</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The referenced_columns are the ordered referenced columns of a foreign key. </p></td>
+ <td></td>
+ <td><p>The character_set is the character_set of a column. </p></td>
</tr>
<tr>
- <td>on_delete</td>
+ <td>collation</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The on_delete is the on delete action of a foreign key. </p></td>
+ <td><p>The collation is the collation of a column. </p></td>
</tr>
<tr>
- <td>on_update</td>
+ <td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The on_update is the on update action of a foreign key. </p></td>
+ <td><p>The comment is the comment of a column.
+classification and user_comment is parsed from the comment. </p></td>
</tr>
<tr>
- <td>match_type</td>
+ <td>user_comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The match_type is the match type of a foreign key.
-The match_type is the PostgreSQL specific field.
-It&#39;s empty string for other databases. </p></td>
+ <td><p>The user_comment is the user comment of a table parsed from the comment. </p></td>
</tr>
</tbody>
@@ -2710,7 +2810,7 @@ It&#39;s empty string for other databases. </p></td>
- <h3 id="bytebase.store.FunctionConfig">FunctionConfig</h3>
+ <h3 id="bytebase.store.DatabaseConfig">DatabaseConfig</h3>
<p></p>
@@ -2724,22 +2824,54 @@ It&#39;s empty string for other databases. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a function. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>updater</td>
- <td><a href="#string">string</a></td>
+ <td>schema_configs</td>
+ <td><a href="#bytebase.store.SchemaConfig">SchemaConfig</a></td>
+ <td>repeated</td>
+ <td><p>The schema_configs is the list of configs for schemas in a database. </p></td>
+ </tr>
+
+ <tr>
+ <td>classification_from_config</td>
+ <td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The last updater of the function in branch.
-Format: users/{userUID}. </p></td>
+ <td><p>If true, we will only store the classification in the config.
+Otherwise we will get the classification from table/column comment,
+and write back to the schema metadata. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.DatabaseMetadata">DatabaseMetadata</h3>
+ <p>DatabaseMetadata is the metadata for databases.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>labels</td>
+ <td><a href="#bytebase.store.DatabaseMetadata.LabelsEntry">DatabaseMetadata.LabelsEntry</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>update_time</td>
+ <td>last_sync_time</td>
<td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The timestamp when the function is updated in branch. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -2749,8 +2881,8 @@ Format: users/{userUID}. </p></td>
- <h3 id="bytebase.store.FunctionMetadata">FunctionMetadata</h3>
- <p>FunctionMetadata is the metadata for functions.</p>
+ <h3 id="bytebase.store.DatabaseMetadata.LabelsEntry">DatabaseMetadata.LabelsEntry</h3>
+ <p></p>
<table class="field-table">
@@ -2760,17 +2892,17 @@ Format: users/{userUID}. </p></td>
<tbody>
<tr>
- <td>name</td>
+ <td>key</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a function. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>definition</td>
+ <td>value</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The definition is the definition of a function. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -2780,8 +2912,8 @@ Format: users/{userUID}. </p></td>
- <h3 id="bytebase.store.IndexMetadata">IndexMetadata</h3>
- <p>IndexMetadata is the metadata for indexes.</p>
+ <h3 id="bytebase.store.DatabaseSchemaMetadata">DatabaseSchemaMetadata</h3>
+ <p>DatabaseSchemaMetadata is the schema metadata for databases.</p>
<table class="field-table">
@@ -2794,65 +2926,94 @@ Format: users/{userUID}. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of an index. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>expressions</td>
- <td><a href="#string">string</a></td>
+ <td>schemas</td>
+ <td><a href="#bytebase.store.SchemaMetadata">SchemaMetadata</a></td>
<td>repeated</td>
- <td><p>The expressions are the ordered columns or expressions of an index.
-This could refer to a column or an expression. </p></td>
+ <td><p>The schemas is the list of schemas in a database. </p></td>
</tr>
<tr>
- <td>key_length</td>
- <td><a href="#int64">int64</a></td>
- <td>repeated</td>
- <td><p>The key_lengths are the ordered key lengths of an index.
-If the key length is not specified, it&#39;s -1. </p></td>
+ <td>character_set</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The character_set is the character set of a database. </p></td>
</tr>
<tr>
- <td>type</td>
+ <td>collation</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The type is the type of an index. </p></td>
+ <td><p>The collation is the collation of a database. </p></td>
</tr>
<tr>
- <td>unique</td>
+ <td>extensions</td>
+ <td><a href="#bytebase.store.ExtensionMetadata">ExtensionMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The extensions is the list of extensions in a database. </p></td>
+ </tr>
+
+ <tr>
+ <td>datashare</td>
<td><a href="#bool">bool</a></td>
<td></td>
- <td><p>The unique is whether the index is unique. </p></td>
+ <td><p>The database belongs to a datashare. </p></td>
</tr>
<tr>
- <td>primary</td>
- <td><a href="#bool">bool</a></td>
+ <td>service_name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The primary is whether the index is a primary key index. </p></td>
+ <td><p>The service name of the database. It&#39;s the Oracle specific concept. </p></td>
</tr>
<tr>
- <td>visible</td>
- <td><a href="#bool">bool</a></td>
+ <td>linked_databases</td>
+ <td><a href="#bytebase.store.LinkedDatabaseMetadata">LinkedDatabaseMetadata</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.DependentColumn">DependentColumn</h3>
+ <p>DependentColumn is the metadata for dependent columns.</p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>schema</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p>The visible is whether the index is visible. </p></td>
+ <td><p>The schema is the schema of a reference column. </p></td>
</tr>
<tr>
- <td>comment</td>
+ <td>table</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment is the comment of an index. </p></td>
+ <td><p>The table is the table of a reference column. </p></td>
</tr>
<tr>
- <td>definition</td>
+ <td>column</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The definition of an index. </p></td>
+ <td><p>The column is the name of a reference column. </p></td>
</tr>
</tbody>
@@ -2862,8 +3023,8 @@ If the key length is not specified, it&#39;s -1. </p></td>
- <h3 id="bytebase.store.InstanceRoleMetadata">InstanceRoleMetadata</h3>
- <p>InstanceRoleMetadata is the message for instance role.</p>
+ <h3 id="bytebase.store.ExtensionMetadata">ExtensionMetadata</h3>
+ <p>ExtensionMetadata is the metadata for extensions.</p>
<table class="field-table">
@@ -2876,14 +3037,28 @@ If the key length is not specified, it&#39;s -1. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The role name. It&#39;s unique within the instance. </p></td>
+ <td><p>The name is the name of an extension. </p></td>
</tr>
<tr>
- <td>grant</td>
+ <td>schema</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The grant display string on the instance. It&#39;s generated by database engine. </p></td>
+ <td><p>The schema is the extension that is installed to. But the extension usage is not limited to the schema. </p></td>
+ </tr>
+
+ <tr>
+ <td>version</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The version is the version of an extension. </p></td>
+ </tr>
+
+ <tr>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The description is the description of an extension. </p></td>
</tr>
</tbody>
@@ -2893,7 +3068,7 @@ If the key length is not specified, it&#39;s -1. </p></td>
- <h3 id="bytebase.store.LinkedDatabaseMetadata">LinkedDatabaseMetadata</h3>
+ <h3 id="bytebase.store.ExternalTableMetadata">ExternalTableMetadata</h3>
<p></p>
@@ -2907,21 +3082,28 @@ If the key length is not specified, it&#39;s -1. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name is the name of a external table. </p></td>
</tr>
<tr>
- <td>username</td>
+ <td>external_server_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The external_server_name is the name of the external server. </p></td>
</tr>
<tr>
- <td>host</td>
+ <td>external_database_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The external_database_name is the name of the external database. </p></td>
+ </tr>
+
+ <tr>
+ <td>columns</td>
+ <td><a href="#bytebase.store.ColumnMetadata">ColumnMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The columns is the ordered list of columns in a foreign table. </p></td>
</tr>
</tbody>
@@ -2931,8 +3113,8 @@ If the key length is not specified, it&#39;s -1. </p></td>
- <h3 id="bytebase.store.MaterializedViewMetadata">MaterializedViewMetadata</h3>
- <p>MaterializedViewMetadata is the metadata for materialized views.</p>
+ <h3 id="bytebase.store.ForeignKeyMetadata">ForeignKeyMetadata</h3>
+ <p>ForeignKeyMetadata is the metadata for foreign keys.</p>
<table class="field-table">
@@ -2945,28 +3127,59 @@ If the key length is not specified, it&#39;s -1. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a view. </p></td>
+ <td><p>The name is the name of a foreign key. </p></td>
</tr>
<tr>
- <td>definition</td>
+ <td>columns</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The columns are the ordered referencing columns of a foreign key. </p></td>
+ </tr>
+
+ <tr>
+ <td>referenced_schema</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The referenced_schema is the referenced schema name of a foreign key.
+It is an empty string for databases without such concept such as MySQL. </p></td>
+ </tr>
+
+ <tr>
+ <td>referenced_table</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The referenced_table is the referenced table name of a foreign key. </p></td>
+ </tr>
+
+ <tr>
+ <td>referenced_columns</td>
+ <td><a href="#string">string</a></td>
+ <td>repeated</td>
+ <td><p>The referenced_columns are the ordered referenced columns of a foreign key. </p></td>
+ </tr>
+
+ <tr>
+ <td>on_delete</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The definition is the definition of a view. </p></td>
+ <td><p>The on_delete is the on delete action of a foreign key. </p></td>
</tr>
<tr>
- <td>comment</td>
+ <td>on_update</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment is the comment of a view. </p></td>
+ <td><p>The on_update is the on update action of a foreign key. </p></td>
</tr>
<tr>
- <td>dependent_columns</td>
- <td><a href="#bytebase.store.DependentColumn">DependentColumn</a></td>
- <td>repeated</td>
- <td><p>The dependent_columns is the list of dependent columns of a view. </p></td>
+ <td>match_type</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The match_type is the match type of a foreign key.
+The match_type is the PostgreSQL specific field.
+It&#39;s empty string for other databases. </p></td>
</tr>
</tbody>
@@ -2976,7 +3189,7 @@ If the key length is not specified, it&#39;s -1. </p></td>
- <h3 id="bytebase.store.ProcedureConfig">ProcedureConfig</h3>
+ <h3 id="bytebase.store.FunctionConfig">FunctionConfig</h3>
<p></p>
@@ -2990,14 +3203,14 @@ If the key length is not specified, it&#39;s -1. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a procedure. </p></td>
+ <td><p>The name is the name of a function. </p></td>
</tr>
<tr>
<td>updater</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The last updater of the procedure in branch.
+ <td><p>The last updater of the function in branch.
Format: users/{userUID}. </p></td>
</tr>
@@ -3005,7 +3218,7 @@ Format: users/{userUID}. </p></td>
<td>update_time</td>
<td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The timestamp when the procedure is updated in branch. </p></td>
+ <td><p>The timestamp when the function is updated in branch. </p></td>
</tr>
</tbody>
@@ -3015,8 +3228,8 @@ Format: users/{userUID}. </p></td>
- <h3 id="bytebase.store.ProcedureMetadata">ProcedureMetadata</h3>
- <p>ProcedureMetadata is the metadata for procedures.</p>
+ <h3 id="bytebase.store.FunctionMetadata">FunctionMetadata</h3>
+ <p>FunctionMetadata is the metadata for functions.</p>
<table class="field-table">
@@ -3029,14 +3242,14 @@ Format: users/{userUID}. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a procedure. </p></td>
+ <td><p>The name is the name of a function. </p></td>
</tr>
<tr>
<td>definition</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The definition is the definition of a procedure. </p></td>
+ <td><p>The definition is the definition of a function. </p></td>
</tr>
</tbody>
@@ -3046,8 +3259,8 @@ Format: users/{userUID}. </p></td>
- <h3 id="bytebase.store.SchemaConfig">SchemaConfig</h3>
- <p></p>
+ <h3 id="bytebase.store.IndexMetadata">IndexMetadata</h3>
+ <p>IndexMetadata is the metadata for indexes.</p>
<table class="field-table">
@@ -3060,124 +3273,65 @@ Format: users/{userUID}. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the schema name.
-It is an empty string for databases without such concept such as MySQL. </p></td>
- </tr>
-
- <tr>
- <td>table_configs</td>
- <td><a href="#bytebase.store.TableConfig">TableConfig</a></td>
- <td>repeated</td>
- <td><p>The table_configs is the list of configs for tables in a schema. </p></td>
- </tr>
-
- <tr>
- <td>function_configs</td>
- <td><a href="#bytebase.store.FunctionConfig">FunctionConfig</a></td>
- <td>repeated</td>
- <td><p> </p></td>
+ <td><p>The name is the name of an index. </p></td>
</tr>
<tr>
- <td>procedure_configs</td>
- <td><a href="#bytebase.store.ProcedureConfig">ProcedureConfig</a></td>
+ <td>expressions</td>
+ <td><a href="#string">string</a></td>
<td>repeated</td>
- <td><p> </p></td>
+ <td><p>The expressions are the ordered columns or expressions of an index.
+This could refer to a column or an expression. </p></td>
</tr>
<tr>
- <td>view_configs</td>
- <td><a href="#bytebase.store.ViewConfig">ViewConfig</a></td>
+ <td>key_length</td>
+ <td><a href="#int64">int64</a></td>
<td>repeated</td>
- <td><p> </p></td>
+ <td><p>The key_lengths are the ordered key lengths of an index.
+If the key length is not specified, it&#39;s -1. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.SchemaMetadata">SchemaMetadata</h3>
- <p>SchemaMetadata is the metadata for schemas.</p><p>This is the concept of schema in Postgres, but it's a no-op for MySQL.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>type</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the schema name.
-It is an empty string for databases without such concept such as MySQL. </p></td>
- </tr>
-
- <tr>
- <td>tables</td>
- <td><a href="#bytebase.store.TableMetadata">TableMetadata</a></td>
- <td>repeated</td>
- <td><p>The tables is the list of tables in a schema. </p></td>
- </tr>
-
- <tr>
- <td>external_tables</td>
- <td><a href="#bytebase.store.ExternalTableMetadata">ExternalTableMetadata</a></td>
- <td>repeated</td>
- <td><p>The external_tables is the list of external tables in a schema. </p></td>
- </tr>
-
- <tr>
- <td>views</td>
- <td><a href="#bytebase.store.ViewMetadata">ViewMetadata</a></td>
- <td>repeated</td>
- <td><p>The views is the list of views in a schema. </p></td>
- </tr>
-
- <tr>
- <td>functions</td>
- <td><a href="#bytebase.store.FunctionMetadata">FunctionMetadata</a></td>
- <td>repeated</td>
- <td><p>The functions is the list of functions in a schema. </p></td>
+ <td><p>The type is the type of an index. </p></td>
</tr>
<tr>
- <td>procedures</td>
- <td><a href="#bytebase.store.ProcedureMetadata">ProcedureMetadata</a></td>
- <td>repeated</td>
- <td><p>The procedures is the list of procedures in a schema. </p></td>
+ <td>unique</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The unique is whether the index is unique. </p></td>
</tr>
<tr>
- <td>streams</td>
- <td><a href="#bytebase.store.StreamMetadata">StreamMetadata</a></td>
- <td>repeated</td>
- <td><p>The streams is the list of streams in a schema, currently, only used for Snowflake. </p></td>
+ <td>primary</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The primary is whether the index is a primary key index. </p></td>
</tr>
<tr>
- <td>tasks</td>
- <td><a href="#bytebase.store.TaskMetadata">TaskMetadata</a></td>
- <td>repeated</td>
- <td><p>The routines is the list of routines in a schema, currently, only used for Snowflake. </p></td>
+ <td>visible</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>The visible is whether the index is visible. </p></td>
</tr>
<tr>
- <td>materialized_views</td>
- <td><a href="#bytebase.store.MaterializedViewMetadata">MaterializedViewMetadata</a></td>
- <td>repeated</td>
- <td><p>The materialized_views is the list of materialized views in a schema. </p></td>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment is the comment of an index. </p></td>
</tr>
<tr>
- <td>sequences</td>
- <td><a href="#bytebase.store.SequenceMetadata">SequenceMetadata</a></td>
- <td>repeated</td>
- <td><p>The sequences is the list of sequences in a schema. </p></td>
+ <td>definition</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The definition of an index. </p></td>
</tr>
</tbody>
@@ -3187,8 +3341,8 @@ It is an empty string for databases without such concept such as MySQL. </p></td
- <h3 id="bytebase.store.SecretItem">SecretItem</h3>
- <p></p>
+ <h3 id="bytebase.store.InstanceRoleMetadata">InstanceRoleMetadata</h3>
+ <p>InstanceRoleMetadata is the message for instance role.</p>
<table class="field-table">
@@ -3201,21 +3355,14 @@ It is an empty string for databases without such concept such as MySQL. </p></td
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of the secret. </p></td>
- </tr>
-
- <tr>
- <td>value</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The value is the value of the secret. </p></td>
+ <td><p>The role name. It&#39;s unique within the instance. </p></td>
</tr>
<tr>
- <td>description</td>
+ <td>grant</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The description is the description of the secret. </p></td>
+ <td><p>The grant display string on the instance. It&#39;s generated by database engine. </p></td>
</tr>
</tbody>
@@ -3225,7 +3372,7 @@ It is an empty string for databases without such concept such as MySQL. </p></td
- <h3 id="bytebase.store.Secrets">Secrets</h3>
+ <h3 id="bytebase.store.LinkedDatabaseMetadata">LinkedDatabaseMetadata</h3>
<p></p>
@@ -3236,41 +3383,24 @@ It is an empty string for databases without such concept such as MySQL. </p></td
<tbody>
<tr>
- <td>items</td>
- <td><a href="#bytebase.store.SecretItem">SecretItem</a></td>
- <td>repeated</td>
- <td><p>The list of secrets. </p></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.SequenceMetadata">SequenceMetadata</h3>
- <p>SequenceMetadata is the metadata for sequences.</p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
+ <td>username</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of a sequence. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>data_type</td>
+ <td>host</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The data type of a sequence. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -3280,8 +3410,8 @@ It is an empty string for databases without such concept such as MySQL. </p></td
- <h3 id="bytebase.store.StreamMetadata">StreamMetadata</h3>
- <p></p>
+ <h3 id="bytebase.store.MaterializedViewMetadata">MaterializedViewMetadata</h3>
+ <p>MaterializedViewMetadata is the metadata for materialized views.</p>
<table class="field-table">
@@ -3294,56 +3424,28 @@ It is an empty string for databases without such concept such as MySQL. </p></td
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a stream. </p></td>
- </tr>
-
- <tr>
- <td>table_name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The table_name is the name of the table/view that the stream is created on. </p></td>
+ <td><p>The name is the name of a view. </p></td>
</tr>
<tr>
- <td>owner</td>
+ <td>definition</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The owner of the stream. </p></td>
+ <td><p>The definition is the definition of a view. </p></td>
</tr>
<tr>
<td>comment</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment of the stream. </p></td>
- </tr>
-
- <tr>
- <td>type</td>
- <td><a href="#bytebase.store.StreamMetadata.Type">StreamMetadata.Type</a></td>
- <td></td>
- <td><p>The type of the stream. </p></td>
- </tr>
-
- <tr>
- <td>stale</td>
- <td><a href="#bool">bool</a></td>
- <td></td>
- <td><p>Indicates whether the stream was last read before the `stale_after` time. </p></td>
- </tr>
-
- <tr>
- <td>mode</td>
- <td><a href="#bytebase.store.StreamMetadata.Mode">StreamMetadata.Mode</a></td>
- <td></td>
- <td><p>The mode of the stream. </p></td>
+ <td><p>The comment is the comment of a view. </p></td>
</tr>
-
- <tr>
- <td>definition</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The definition of the stream. </p></td>
+
+ <tr>
+ <td>dependent_columns</td>
+ <td><a href="#bytebase.store.DependentColumn">DependentColumn</a></td>
+ <td>repeated</td>
+ <td><p>The dependent_columns is the list of dependent columns of a view. </p></td>
</tr>
</tbody>
@@ -3353,7 +3455,7 @@ It is an empty string for databases without such concept such as MySQL. </p></td
- <h3 id="bytebase.store.TableConfig">TableConfig</h3>
+ <h3 id="bytebase.store.ProcedureConfig">ProcedureConfig</h3>
<p></p>
@@ -3367,28 +3469,14 @@ It is an empty string for databases without such concept such as MySQL. </p></td
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a table. </p></td>
- </tr>
-
- <tr>
- <td>column_configs</td>
- <td><a href="#bytebase.store.ColumnConfig">ColumnConfig</a></td>
- <td>repeated</td>
- <td><p>The column_configs is the ordered list of configs for columns in a table. </p></td>
- </tr>
-
- <tr>
- <td>classification_id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p> </p></td>
+ <td><p>The name is the name of a procedure. </p></td>
</tr>
<tr>
<td>updater</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The last updater of the table in branch.
+ <td><p>The last updater of the procedure in branch.
Format: users/{userUID}. </p></td>
</tr>
@@ -3396,7 +3484,7 @@ Format: users/{userUID}. </p></td>
<td>update_time</td>
<td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The timestamp when the table is updated in branch. </p></td>
+ <td><p>The timestamp when the procedure is updated in branch. </p></td>
</tr>
</tbody>
@@ -3406,8 +3494,8 @@ Format: users/{userUID}. </p></td>
- <h3 id="bytebase.store.TableMetadata">TableMetadata</h3>
- <p>TableMetadata is the metadata for tables.</p>
+ <h3 id="bytebase.store.ProcedureMetadata">ProcedureMetadata</h3>
+ <p>ProcedureMetadata is the metadata for procedures.</p>
<table class="field-table">
@@ -3420,99 +3508,67 @@ Format: users/{userUID}. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a table. </p></td>
- </tr>
-
- <tr>
- <td>columns</td>
- <td><a href="#bytebase.store.ColumnMetadata">ColumnMetadata</a></td>
- <td>repeated</td>
- <td><p>The columns is the ordered list of columns in a table. </p></td>
- </tr>
-
- <tr>
- <td>indexes</td>
- <td><a href="#bytebase.store.IndexMetadata">IndexMetadata</a></td>
- <td>repeated</td>
- <td><p>The indexes is the list of indexes in a table. </p></td>
- </tr>
-
- <tr>
- <td>engine</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The engine is the engine of a table. </p></td>
+ <td><p>The name is the name of a procedure. </p></td>
</tr>
<tr>
- <td>collation</td>
+ <td>definition</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The collation is the collation of a table. </p></td>
- </tr>
-
- <tr>
- <td>row_count</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The row_count is the estimated number of rows of a table. </p></td>
- </tr>
-
- <tr>
- <td>data_size</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The data_size is the estimated data size of a table. </p></td>
- </tr>
-
- <tr>
- <td>index_size</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The index_size is the estimated index size of a table. </p></td>
+ <td><p>The definition is the definition of a procedure. </p></td>
</tr>
- <tr>
- <td>data_free</td>
- <td><a href="#int64">int64</a></td>
- <td></td>
- <td><p>The data_free is the estimated free data size of a table. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.SchemaConfig">SchemaConfig</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>create_options</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The create_options is the create option of a table. </p></td>
+ <td><p>The name is the schema name.
+It is an empty string for databases without such concept such as MySQL. </p></td>
</tr>
<tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment is the comment of a table.
-classification and user_comment is parsed from the comment. </p></td>
+ <td>table_configs</td>
+ <td><a href="#bytebase.store.TableConfig">TableConfig</a></td>
+ <td>repeated</td>
+ <td><p>The table_configs is the list of configs for tables in a schema. </p></td>
</tr>
<tr>
- <td>user_comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The user_comment is the user comment of a table parsed from the comment. </p></td>
+ <td>function_configs</td>
+ <td><a href="#bytebase.store.FunctionConfig">FunctionConfig</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>foreign_keys</td>
- <td><a href="#bytebase.store.ForeignKeyMetadata">ForeignKeyMetadata</a></td>
+ <td>procedure_configs</td>
+ <td><a href="#bytebase.store.ProcedureConfig">ProcedureConfig</a></td>
<td>repeated</td>
- <td><p>The foreign_keys is the list of foreign keys in a table. </p></td>
+ <td><p> </p></td>
</tr>
<tr>
- <td>partitions</td>
- <td><a href="#bytebase.store.TablePartitionMetadata">TablePartitionMetadata</a></td>
+ <td>view_configs</td>
+ <td><a href="#bytebase.store.ViewConfig">ViewConfig</a></td>
<td>repeated</td>
- <td><p>The partitions is the list of partitions in a table. </p></td>
+ <td><p> </p></td>
</tr>
</tbody>
@@ -3522,8 +3578,8 @@ classification and user_comment is parsed from the comment. </p></td>
- <h3 id="bytebase.store.TablePartitionMetadata">TablePartitionMetadata</h3>
- <p>TablePartitionMetadata is the metadata for table partitions.</p>
+ <h3 id="bytebase.store.SchemaMetadata">SchemaMetadata</h3>
+ <p>SchemaMetadata is the metadata for schemas.</p><p>This is the concept of schema in Postgres, but it's a no-op for MySQL.</p>
<table class="field-table">
@@ -3536,142 +3592,133 @@ classification and user_comment is parsed from the comment. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a table partition. </p></td>
+ <td><p>The name is the schema name.
+It is an empty string for databases without such concept such as MySQL. </p></td>
</tr>
<tr>
- <td>type</td>
- <td><a href="#bytebase.store.TablePartitionMetadata.Type">TablePartitionMetadata.Type</a></td>
- <td></td>
- <td><p>The type of a table partition. </p></td>
+ <td>tables</td>
+ <td><a href="#bytebase.store.TableMetadata">TableMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The tables is the list of tables in a schema. </p></td>
</tr>
<tr>
- <td>expression</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The expression is the expression of a table partition.
-For PostgreSQL, the expression is the text of {FOR VALUES partition_bound_spec}, see https://www.postgresql.org/docs/current/sql-createtable.html.
-For MySQL, the expression is the `expr` or `column_list` of the following syntax.
-PARTITION BY
- { [LINEAR] HASH(expr)
- | [LINEAR] KEY [ALGORITHM={1 | 2}] (column_list)
- | RANGE{(expr) | COLUMNS(column_list)}
- | LIST{(expr) | COLUMNS(column_list)} }. </p></td>
+ <td>external_tables</td>
+ <td><a href="#bytebase.store.ExternalTableMetadata">ExternalTableMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The external_tables is the list of external tables in a schema. </p></td>
</tr>
<tr>
- <td>value</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The value is the value of a table partition.
-For MySQL, the value is for RANGE and LIST partition types,
-- For a RANGE partition, it contains the value set in the partition&#39;s VALUES LESS THAN clause, which can be either an integer or MAXVALUE.
-- For a LIST partition, this column contains the values defined in the partition&#39;s VALUES IN clause, which is a list of comma-separated integer values.
-- For others, it&#39;s an empty string. </p></td>
+ <td>views</td>
+ <td><a href="#bytebase.store.ViewMetadata">ViewMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The views is the list of views in a schema. </p></td>
</tr>
<tr>
- <td>use_default</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The use_default is whether the users use the default partition, it stores the different value for different database engines.
-For MySQL, it&#39;s [INT] type, 0 means not use default partition, otherwise, it&#39;s equals to number in syntax [SUB]PARTITION {number}. </p></td>
+ <td>functions</td>
+ <td><a href="#bytebase.store.FunctionMetadata">FunctionMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The functions is the list of functions in a schema. </p></td>
</tr>
<tr>
- <td>subpartitions</td>
- <td><a href="#bytebase.store.TablePartitionMetadata">TablePartitionMetadata</a></td>
+ <td>procedures</td>
+ <td><a href="#bytebase.store.ProcedureMetadata">ProcedureMetadata</a></td>
<td>repeated</td>
- <td><p>The subpartitions is the list of subpartitions in a table partition. </p></td>
+ <td><p>The procedures is the list of procedures in a schema. </p></td>
</tr>
- </tbody>
- </table>
-
-
-
-
-
- <h3 id="bytebase.store.TaskMetadata">TaskMetadata</h3>
- <p></p>
-
-
- <table class="field-table">
- <thead>
- <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>name</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The name is the name of a task. </p></td>
+ <td>streams</td>
+ <td><a href="#bytebase.store.StreamMetadata">StreamMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The streams is the list of streams in a schema, currently, only used for Snowflake. </p></td>
</tr>
<tr>
- <td>id</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The id is the snowflake-generated id of a task.
-Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>
+ <td>tasks</td>
+ <td><a href="#bytebase.store.TaskMetadata">TaskMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The routines is the list of routines in a schema, currently, only used for Snowflake. </p></td>
</tr>
<tr>
- <td>owner</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The owner of the task. </p></td>
+ <td>materialized_views</td>
+ <td><a href="#bytebase.store.MaterializedViewMetadata">MaterializedViewMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The materialized_views is the list of materialized views in a schema. </p></td>
</tr>
<tr>
- <td>comment</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The comment of the task. </p></td>
+ <td>sequences</td>
+ <td><a href="#bytebase.store.SequenceMetadata">SequenceMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The sequences is the list of sequences in a schema. </p></td>
</tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.SecretItem">SecretItem</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>warehouse</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The warehouse of the task. </p></td>
+ <td><p>The name is the name of the secret. </p></td>
</tr>
<tr>
- <td>schedule</td>
+ <td>value</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The schedule interval of the task. </p></td>
+ <td><p>The value is the value of the secret. </p></td>
</tr>
<tr>
- <td>predecessors</td>
+ <td>description</td>
<td><a href="#string">string</a></td>
- <td>repeated</td>
- <td><p>The predecessor tasks of the task. </p></td>
- </tr>
-
- <tr>
- <td>state</td>
- <td><a href="#bytebase.store.TaskMetadata.State">TaskMetadata.State</a></td>
<td></td>
- <td><p>The state of the task. </p></td>
+ <td><p>The description is the description of the secret. </p></td>
</tr>
- <tr>
- <td>condition</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The condition of the task. </p></td>
- </tr>
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.Secrets">Secrets</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
<tr>
- <td>definition</td>
- <td><a href="#string">string</a></td>
- <td></td>
- <td><p>The definition of the task. </p></td>
+ <td>items</td>
+ <td><a href="#bytebase.store.SecretItem">SecretItem</a></td>
+ <td>repeated</td>
+ <td><p>The list of secrets. </p></td>
</tr>
</tbody>
@@ -3681,8 +3728,8 @@ Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>
- <h3 id="bytebase.store.ViewConfig">ViewConfig</h3>
- <p></p>
+ <h3 id="bytebase.store.SequenceMetadata">SequenceMetadata</h3>
+ <p>SequenceMetadata is the metadata for sequences.</p>
<table class="field-table">
@@ -3695,22 +3742,14 @@ Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a view. </p></td>
+ <td><p>The name of a sequence. </p></td>
</tr>
<tr>
- <td>updater</td>
+ <td>data_type</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The last updater of the view in branch.
-Format: users/{userUID}. </p></td>
- </tr>
-
- <tr>
- <td>update_time</td>
- <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
- <td></td>
- <td><p>The timestamp when the view is updated in branch. </p></td>
+ <td><p>The data type of a sequence. </p></td>
</tr>
</tbody>
@@ -3720,8 +3759,8 @@ Format: users/{userUID}. </p></td>
- <h3 id="bytebase.store.ViewMetadata">ViewMetadata</h3>
- <p>ViewMetadata is the metadata for views.</p>
+ <h3 id="bytebase.store.StreamMetadata">StreamMetadata</h3>
+ <p></p>
<table class="field-table">
@@ -3734,204 +3773,66 @@ Format: users/{userUID}. </p></td>
<td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name is the name of a view. </p></td>
+ <td><p>The name is the name of a stream. </p></td>
</tr>
<tr>
- <td>definition</td>
+ <td>table_name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The definition is the definition of a view. </p></td>
+ <td><p>The table_name is the name of the table/view that the stream is created on. </p></td>
</tr>
<tr>
- <td>comment</td>
+ <td>owner</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The comment is the comment of a view. </p></td>
- </tr>
-
- <tr>
- <td>dependent_columns</td>
- <td><a href="#bytebase.store.DependentColumn">DependentColumn</a></td>
- <td>repeated</td>
- <td><p>The dependent_columns is the list of dependent columns of a view. </p></td>
+ <td><p>The owner of the stream. </p></td>
</tr>
-
- </tbody>
- </table>
-
-
-
-
-
-
-
- <h3 id="bytebase.store.StreamMetadata.Mode">StreamMetadata.Mode</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>MODE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>MODE_DEFAULT</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>MODE_APPEND_ONLY</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>MODE_INSERT_ONLY</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.store.StreamMetadata.Type">StreamMetadata.Type</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>TYPE_DELTA</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.store.TablePartitionMetadata.Type">TablePartitionMetadata.Type</h3>
- <p>Type is the type of a table partition, some database engines may not support all types.</p><p>Only avilable for the following database engines now:</p><p>MySQL: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, LINEAR HASH, KEY, LINEAR_KEY (https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html)</p><p>TiDB: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, KEY</p><p>PostgreSQL: RANGE, LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)</p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>TYPE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>RANGE</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>RANGE_COLUMNS</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>LIST</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>LIST_COLUMNS</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>HASH</td>
- <td>5</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>LINEAR_HASH</td>
- <td>6</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>KEY</td>
- <td>7</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>LINEAR_KEY</td>
- <td>8</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
- <h3 id="bytebase.store.TaskMetadata.State">TaskMetadata.State</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
- <tr>
- <td>STATE_UNSPECIFIED</td>
- <td>0</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>STATE_STARTED</td>
- <td>1</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>STATE_SUSPENDED</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- </tbody>
- </table>
-
-
-
+
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment of the stream. </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.store.StreamMetadata.Type">StreamMetadata.Type</a></td>
+ <td></td>
+ <td><p>The type of the stream. </p></td>
+ </tr>
+
+ <tr>
+ <td>stale</td>
+ <td><a href="#bool">bool</a></td>
+ <td></td>
+ <td><p>Indicates whether the stream was last read before the `stale_after` time. </p></td>
+ </tr>
+
+ <tr>
+ <td>mode</td>
+ <td><a href="#bytebase.store.StreamMetadata.Mode">StreamMetadata.Mode</a></td>
+ <td></td>
+ <td><p>The mode of the stream. </p></td>
+ </tr>
+
+ <tr>
+ <td>definition</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The definition of the stream. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
-
-
-
- <div class="file-heading">
- <h2 id="store/branch.proto">store/branch.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
+
- <h3 id="bytebase.store.BranchConfig">BranchConfig</h3>
+ <h3 id="bytebase.store.TableConfig">TableConfig</h3>
<p></p>
@@ -3942,21 +3843,39 @@ Format: users/{userUID}. </p></td>
<tbody>
<tr>
- <td>source_database</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of source database.
-Optional.
-Example: instances/instance-id/databases/database-name. </p></td>
+ <td><p>The name is the name of a table. </p></td>
</tr>
<tr>
- <td>source_branch</td>
+ <td>column_configs</td>
+ <td><a href="#bytebase.store.ColumnConfig">ColumnConfig</a></td>
+ <td>repeated</td>
+ <td><p>The column_configs is the ordered list of configs for columns in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>classification_id</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of the source branch.
-Optional.
-Example: projects/project-id/branches/branch-id. </p></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>updater</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The last updater of the table in branch.
+Format: users/{userUID}. </p></td>
+ </tr>
+
+ <tr>
+ <td>update_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
+ <td></td>
+ <td><p>The timestamp when the table is updated in branch. </p></td>
</tr>
</tbody>
@@ -3966,8 +3885,8 @@ Example: projects/project-id/branches/branch-id. </p></td>
- <h3 id="bytebase.store.BranchSnapshot">BranchSnapshot</h3>
- <p></p>
+ <h3 id="bytebase.store.TableMetadata">TableMetadata</h3>
+ <p>TableMetadata is the metadata for tables.</p>
<table class="field-table">
@@ -3977,17 +3896,102 @@ Example: projects/project-id/branches/branch-id. </p></td>
<tbody>
<tr>
- <td>metadata</td>
- <td><a href="#bytebase.store.DatabaseSchemaMetadata">DatabaseSchemaMetadata</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name is the name of a table. </p></td>
</tr>
<tr>
- <td>database_config</td>
- <td><a href="#bytebase.store.DatabaseConfig">DatabaseConfig</a></td>
+ <td>columns</td>
+ <td><a href="#bytebase.store.ColumnMetadata">ColumnMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The columns is the ordered list of columns in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>indexes</td>
+ <td><a href="#bytebase.store.IndexMetadata">IndexMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The indexes is the list of indexes in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>engine</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The engine is the engine of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>collation</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The collation is the collation of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>row_count</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>The row_count is the estimated number of rows of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>data_size</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>The data_size is the estimated data size of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>index_size</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>The index_size is the estimated index size of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>data_free</td>
+ <td><a href="#int64">int64</a></td>
+ <td></td>
+ <td><p>The data_free is the estimated free data size of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>create_options</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The create_options is the create option of a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment is the comment of a table.
+classification and user_comment is parsed from the comment. </p></td>
+ </tr>
+
+ <tr>
+ <td>user_comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The user_comment is the user comment of a table parsed from the comment. </p></td>
+ </tr>
+
+ <tr>
+ <td>foreign_keys</td>
+ <td><a href="#bytebase.store.ForeignKeyMetadata">ForeignKeyMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The foreign_keys is the list of foreign keys in a table. </p></td>
+ </tr>
+
+ <tr>
+ <td>partitions</td>
+ <td><a href="#bytebase.store.TablePartitionMetadata">TablePartitionMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The partitions is the list of partitions in a table. </p></td>
</tr>
</tbody>
@@ -3997,21 +4001,78 @@ Example: projects/project-id/branches/branch-id. </p></td>
+ <h3 id="bytebase.store.TablePartitionMetadata">TablePartitionMetadata</h3>
+ <p>TablePartitionMetadata is the metadata for table partitions.</p>
-
-
-
-
-
-
-
- <div class="file-heading">
- <h2 id="store/changelist.proto">store/changelist.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name is the name of a table partition. </p></td>
+ </tr>
+
+ <tr>
+ <td>type</td>
+ <td><a href="#bytebase.store.TablePartitionMetadata.Type">TablePartitionMetadata.Type</a></td>
+ <td></td>
+ <td><p>The type of a table partition. </p></td>
+ </tr>
+
+ <tr>
+ <td>expression</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The expression is the expression of a table partition.
+For PostgreSQL, the expression is the text of {FOR VALUES partition_bound_spec}, see https://www.postgresql.org/docs/current/sql-createtable.html.
+For MySQL, the expression is the `expr` or `column_list` of the following syntax.
+PARTITION BY
+ { [LINEAR] HASH(expr)
+ | [LINEAR] KEY [ALGORITHM={1 | 2}] (column_list)
+ | RANGE{(expr) | COLUMNS(column_list)}
+ | LIST{(expr) | COLUMNS(column_list)} }. </p></td>
+ </tr>
+
+ <tr>
+ <td>value</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The value is the value of a table partition.
+For MySQL, the value is for RANGE and LIST partition types,
+- For a RANGE partition, it contains the value set in the partition&#39;s VALUES LESS THAN clause, which can be either an integer or MAXVALUE.
+- For a LIST partition, this column contains the values defined in the partition&#39;s VALUES IN clause, which is a list of comma-separated integer values.
+- For others, it&#39;s an empty string. </p></td>
+ </tr>
+
+ <tr>
+ <td>use_default</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The use_default is whether the users use the default partition, it stores the different value for different database engines.
+For MySQL, it&#39;s [INT] type, 0 means not use default partition, otherwise, it&#39;s equals to number in syntax [SUB]PARTITION {number}. </p></td>
+ </tr>
+
+ <tr>
+ <td>subpartitions</td>
+ <td><a href="#bytebase.store.TablePartitionMetadata">TablePartitionMetadata</a></td>
+ <td>repeated</td>
+ <td><p>The subpartitions is the list of subpartitions in a table partition. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
- <h3 id="bytebase.store.Changelist">Changelist</h3>
+ <h3 id="bytebase.store.TaskMetadata">TaskMetadata</h3>
<p></p>
@@ -4022,17 +4083,74 @@ Example: projects/project-id/branches/branch-id. </p></td>
<tbody>
<tr>
- <td>description</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name is the name of a task. </p></td>
</tr>
<tr>
- <td>changes</td>
- <td><a href="#bytebase.store.Changelist.Change">Changelist.Change</a></td>
+ <td>id</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The id is the snowflake-generated id of a task.
+Example: 01ad32a0-1bb6-5e93-0000-000000000001 </p></td>
+ </tr>
+
+ <tr>
+ <td>owner</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The owner of the task. </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment of the task. </p></td>
+ </tr>
+
+ <tr>
+ <td>warehouse</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The warehouse of the task. </p></td>
+ </tr>
+
+ <tr>
+ <td>schedule</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The schedule interval of the task. </p></td>
+ </tr>
+
+ <tr>
+ <td>predecessors</td>
+ <td><a href="#string">string</a></td>
<td>repeated</td>
- <td><p> </p></td>
+ <td><p>The predecessor tasks of the task. </p></td>
+ </tr>
+
+ <tr>
+ <td>state</td>
+ <td><a href="#bytebase.store.TaskMetadata.State">TaskMetadata.State</a></td>
+ <td></td>
+ <td><p>The state of the task. </p></td>
+ </tr>
+
+ <tr>
+ <td>condition</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The condition of the task. </p></td>
+ </tr>
+
+ <tr>
+ <td>definition</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The definition of the task. </p></td>
</tr>
</tbody>
@@ -4042,7 +4160,7 @@ Example: projects/project-id/branches/branch-id. </p></td>
- <h3 id="bytebase.store.Changelist.Change">Changelist.Change</h3>
+ <h3 id="bytebase.store.ViewConfig">ViewConfig</h3>
<p></p>
@@ -4053,27 +4171,25 @@ Example: projects/project-id/branches/branch-id. </p></td>
<tbody>
<tr>
- <td>sheet</td>
+ <td>name</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The name of a sheet. </p></td>
+ <td><p>The name is the name of a view. </p></td>
</tr>
<tr>
- <td>source</td>
+ <td>updater</td>
<td><a href="#string">string</a></td>
<td></td>
- <td><p>The source of origin.
-1) change history: instances/{instance}/databases/{database}/changeHistories/{changeHistory}.
-2) branch: projects/{project}/branches/{branch}.
-3) raw SQL if empty. </p></td>
+ <td><p>The last updater of the view in branch.
+Format: users/{userUID}. </p></td>
</tr>
<tr>
- <td>version</td>
- <td><a href="#string">string</a></td>
+ <td>update_time</td>
+ <td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
<td></td>
- <td><p>The migration version for a change. </p></td>
+ <td><p>The timestamp when the view is updated in branch. </p></td>
</tr>
</tbody>
@@ -4083,22 +4199,8 @@ Example: projects/project-id/branches/branch-id. </p></td>
-
-
-
-
-
-
-
-
- <div class="file-heading">
- <h2 id="store/common.proto">store/common.proto</h2><a href="#title">Top</a>
- </div>
- <p></p>
-
-
- <h3 id="bytebase.store.PageToken">PageToken</h3>
- <p>Used internally for obfuscating the page token.</p>
+ <h3 id="bytebase.store.ViewMetadata">ViewMetadata</h3>
+ <p>ViewMetadata is the metadata for views.</p>
<table class="field-table">
@@ -4108,17 +4210,31 @@ Example: projects/project-id/branches/branch-id. </p></td>
<tbody>
<tr>
- <td>limit</td>
- <td><a href="#int32">int32</a></td>
+ <td>name</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The name is the name of a view. </p></td>
</tr>
<tr>
- <td>offset</td>
- <td><a href="#int32">int32</a></td>
+ <td>definition</td>
+ <td><a href="#string">string</a></td>
<td></td>
- <td><p> </p></td>
+ <td><p>The definition is the definition of a view. </p></td>
+ </tr>
+
+ <tr>
+ <td>comment</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The comment is the comment of a view. </p></td>
+ </tr>
+
+ <tr>
+ <td>dependent_columns</td>
+ <td><a href="#bytebase.store.DependentColumn">DependentColumn</a></td>
+ <td>repeated</td>
+ <td><p>The dependent_columns is the list of dependent columns of a view. </p></td>
</tr>
</tbody>
@@ -4130,7 +4246,7 @@ Example: projects/project-id/branches/branch-id. </p></td>
- <h3 id="bytebase.store.Engine">Engine</h3>
+ <h3 id="bytebase.store.StreamMetadata.Mode">StreamMetadata.Mode</h3>
<p></p>
<table class="enum-table">
<thead>
@@ -4139,154 +4255,57 @@ Example: projects/project-id/branches/branch-id. </p></td>
<tbody>
<tr>
- <td>ENGINE_UNSPECIFIED</td>
+ <td>MODE_UNSPECIFIED</td>
<td>0</td>
<td><p></p></td>
</tr>
<tr>
- <td>CLICKHOUSE</td>
+ <td>MODE_DEFAULT</td>
<td>1</td>
<td><p></p></td>
</tr>
<tr>
- <td>MYSQL</td>
- <td>2</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>POSTGRES</td>
- <td>3</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SNOWFLAKE</td>
- <td>4</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SQLITE</td>
- <td>5</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>TIDB</td>
- <td>6</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>MONGODB</td>
- <td>7</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>REDIS</td>
- <td>8</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>ORACLE</td>
- <td>9</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>SPANNER</td>
- <td>10</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>MSSQL</td>
- <td>11</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>REDSHIFT</td>
- <td>12</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>MARIADB</td>
- <td>13</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>OCEANBASE</td>
- <td>14</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DM</td>
- <td>15</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>RISINGWAVE</td>
- <td>16</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>OCEANBASE_ORACLE</td>
- <td>17</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>STARROCKS</td>
- <td>18</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>DORIS</td>
- <td>19</td>
- <td><p></p></td>
- </tr>
-
- <tr>
- <td>HIVE</td>
- <td>20</td>
+ <td>MODE_APPEND_ONLY</td>
+ <td>2</td>
<td><p></p></td>
</tr>
<tr>
- <td>ELASTICSEARCH</td>
- <td>21</td>
+ <td>MODE_INSERT_ONLY</td>
+ <td>3</td>
<td><p></p></td>
</tr>
+ </tbody>
+ </table>
+
+ <h3 id="bytebase.store.StreamMetadata.Type">StreamMetadata.Type</h3>
+ <p></p>
+ <table class="enum-table">
+ <thead>
+ <tr><td>Name</td><td>Number</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
<tr>
- <td>BIGQUERY</td>
- <td>22</td>
+ <td>TYPE_UNSPECIFIED</td>
+ <td>0</td>
<td><p></p></td>
</tr>
<tr>
- <td>DYNAMODB</td>
- <td>23</td>
+ <td>TYPE_DELTA</td>
+ <td>1</td>
<td><p></p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.store.ExportFormat">ExportFormat</h3>
- <p></p>
+ <h3 id="bytebase.store.TablePartitionMetadata.Type">TablePartitionMetadata.Type</h3>
+ <p>Type is the type of a table partition, some database engines may not support all types.</p><p>Only avilable for the following database engines now:</p><p>MySQL: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, LINEAR HASH, KEY, LINEAR_KEY (https://dev.mysql.com/doc/refman/8.0/en/partitioning-types.html)</p><p>TiDB: RANGE, RANGE COLUMNS, LIST, LIST COLUMNS, HASH, KEY</p><p>PostgreSQL: RANGE, LIST, HASH (https://www.postgresql.org/docs/current/ddl-partitioning.html)</p>
<table class="enum-table">
<thead>
<tr><td>Name</td><td>Number</td><td>Description</td></tr>
@@ -4294,74 +4313,63 @@ Example: projects/project-id/branches/branch-id. </p></td>
<tbody>
<tr>
- <td>FORMAT_UNSPECIFIED</td>
+ <td>TYPE_UNSPECIFIED</td>
<td>0</td>
<td><p></p></td>
</tr>
<tr>
- <td>CSV</td>
+ <td>RANGE</td>
<td>1</td>
<td><p></p></td>
</tr>
<tr>
- <td>JSON</td>
+ <td>RANGE_COLUMNS</td>
<td>2</td>
<td><p></p></td>
</tr>
<tr>
- <td>SQL</td>
+ <td>LIST</td>
<td>3</td>
<td><p></p></td>
</tr>
<tr>
- <td>XLSX</td>
+ <td>LIST_COLUMNS</td>
<td>4</td>
<td><p></p></td>
</tr>
- </tbody>
- </table>
-
- <h3 id="bytebase.store.MaskingLevel">MaskingLevel</h3>
- <p></p>
- <table class="enum-table">
- <thead>
- <tr><td>Name</td><td>Number</td><td>Description</td></tr>
- </thead>
- <tbody>
-
<tr>
- <td>MASKING_LEVEL_UNSPECIFIED</td>
- <td>0</td>
+ <td>HASH</td>
+ <td>5</td>
<td><p></p></td>
</tr>
<tr>
- <td>NONE</td>
- <td>1</td>
+ <td>LINEAR_HASH</td>
+ <td>6</td>
<td><p></p></td>
</tr>
<tr>
- <td>PARTIAL</td>
- <td>2</td>
+ <td>KEY</td>
+ <td>7</td>
<td><p></p></td>
</tr>
<tr>
- <td>FULL</td>
- <td>3</td>
+ <td>LINEAR_KEY</td>
+ <td>8</td>
<td><p></p></td>
</tr>
</tbody>
</table>
- <h3 id="bytebase.store.VCSType">VCSType</h3>
+ <h3 id="bytebase.store.TaskMetadata.State">TaskMetadata.State</h3>
<p></p>
<table class="enum-table">
<thead>
@@ -4370,33 +4378,21 @@ Example: projects/project-id/branches/branch-id. </p></td>
<tbody>
<tr>
- <td>VCS_TYPE_UNSPECIFIED</td>
+ <td>STATE_UNSPECIFIED</td>
<td>0</td>
<td><p></p></td>
</tr>
<tr>
- <td>GITHUB</td>
+ <td>STATE_STARTED</td>
<td>1</td>
- <td><p>GitHub type. Using for GitHub community edition(ce).</p></td>
+ <td><p></p></td>
</tr>
<tr>
- <td>GITLAB</td>
+ <td>STATE_SUSPENDED</td>
<td>2</td>
- <td><p>GitLab type. Using for GitLab community edition(ce) and enterprise edition(ee).</p></td>
- </tr>
-
- <tr>
- <td>BITBUCKET</td>
- <td>3</td>
- <td><p>BitBucket type. Using for BitBucket cloud or BitBucket server.</p></td>
- </tr>
-
- <tr>
- <td>AZURE_DEVOPS</td>
- <td>4</td>
- <td><p>Azure DevOps. Using for Azure DevOps GitOps workflow.</p></td>
+ <td><p></p></td>
</tr>
</tbody>
@@ -4408,6 +4404,172 @@ Example: projects/project-id/branches/branch-id. </p></td>
+ <div class="file-heading">
+ <h2 id="store/branch.proto">store/branch.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.store.BranchConfig">BranchConfig</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>source_database</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of source database.
+Optional.
+Example: instances/instance-id/databases/database-name. </p></td>
+ </tr>
+
+ <tr>
+ <td>source_branch</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of the source branch.
+Optional.
+Example: projects/project-id/branches/branch-id. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.BranchSnapshot">BranchSnapshot</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>metadata</td>
+ <td><a href="#bytebase.store.DatabaseSchemaMetadata">DatabaseSchemaMetadata</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>database_config</td>
+ <td><a href="#bytebase.store.DatabaseConfig">DatabaseConfig</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <div class="file-heading">
+ <h2 id="store/changelist.proto">store/changelist.proto</h2><a href="#title">Top</a>
+ </div>
+ <p></p>
+
+
+ <h3 id="bytebase.store.Changelist">Changelist</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>description</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p> </p></td>
+ </tr>
+
+ <tr>
+ <td>changes</td>
+ <td><a href="#bytebase.store.Changelist.Change">Changelist.Change</a></td>
+ <td>repeated</td>
+ <td><p> </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+ <h3 id="bytebase.store.Changelist.Change">Changelist.Change</h3>
+ <p></p>
+
+
+ <table class="field-table">
+ <thead>
+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td>sheet</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The name of a sheet. </p></td>
+ </tr>
+
+ <tr>
+ <td>source</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The source of origin.
+1) change history: instances/{instance}/databases/{database}/changeHistories/{changeHistory}.
+2) branch: projects/{project}/branches/{branch}.
+3) raw SQL if empty. </p></td>
+ </tr>
+
+ <tr>
+ <td>version</td>
+ <td><a href="#string">string</a></td>
+ <td></td>
+ <td><p>The migration version for a change. </p></td>
+ </tr>
+
+ </tbody>
+ </table>
+
+
+
+
+
+
+
+
+
+
+
+
+
<div class="file-heading">
<h2 id="store/data_source.proto">store/data_source.proto</h2><a href="#title">Top</a>
</div>
diff --git a/proto/generated-go/store/advice.pb.go b/proto/generated-go/store/advice.pb.go
new file mode 100644
index 0000000000..30aae7d51e
--- /dev/null
+++ b/proto/generated-go/store/advice.pb.go
@@ -0,0 +1,265 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.34.1
+// protoc (unknown)
+// source: store/advice.proto
+
+package store
+
+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 Advice_Status int32
+
+const (
+ // Unspecified.
+ Advice_STATUS_UNSPECIFIED Advice_Status = 0
+ Advice_SUCCESS Advice_Status = 1
+ Advice_WARNING Advice_Status = 2
+ Advice_ERROR Advice_Status = 3
+)
+
+// Enum value maps for Advice_Status.
+var (
+ Advice_Status_name = map[int32]string{
+ 0: "STATUS_UNSPECIFIED",
+ 1: "SUCCESS",
+ 2: "WARNING",
+ 3: "ERROR",
+ }
+ Advice_Status_value = map[string]int32{
+ "STATUS_UNSPECIFIED": 0,
+ "SUCCESS": 1,
+ "WARNING": 2,
+ "ERROR": 3,
+ }
+)
+
+func (x Advice_Status) Enum() *Advice_Status {
+ p := new(Advice_Status)
+ *p = x
+ return p
+}
+
+func (x Advice_Status) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Advice_Status) Descriptor() protoreflect.EnumDescriptor {
+ return file_store_advice_proto_enumTypes[0].Descriptor()
+}
+
+func (Advice_Status) Type() protoreflect.EnumType {
+ return &file_store_advice_proto_enumTypes[0]
+}
+
+func (x Advice_Status) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use Advice_Status.Descriptor instead.
+func (Advice_Status) EnumDescriptor() ([]byte, []int) {
+ return file_store_advice_proto_rawDescGZIP(), []int{0, 0}
+}
+
+type Advice struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The advice status.
+ Status Advice_Status `protobuf:"varint,1,opt,name=status,proto3,enum=bytebase.store.Advice_Status" json:"status,omitempty"`
+ // The advice code.
+ Code int32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
+ // The advice title.
+ Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
+ // The advice content.
+ Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
+ // The advice detail.
+ Detail string `protobuf:"bytes,5,opt,name=detail,proto3" json:"detail,omitempty"`
+ StartPosition *Position `protobuf:"bytes,6,opt,name=start_position,json=startPosition,proto3" json:"start_position,omitempty"`
+}
+
+func (x *Advice) Reset() {
+ *x = Advice{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_store_advice_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Advice) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Advice) ProtoMessage() {}
+
+func (x *Advice) ProtoReflect() protoreflect.Message {
+ mi := &file_store_advice_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 Advice.ProtoReflect.Descriptor instead.
+func (*Advice) Descriptor() ([]byte, []int) {
+ return file_store_advice_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Advice) GetStatus() Advice_Status {
+ if x != nil {
+ return x.Status
+ }
+ return Advice_STATUS_UNSPECIFIED
+}
+
+func (x *Advice) GetCode() int32 {
+ if x != nil {
+ return x.Code
+ }
+ return 0
+}
+
+func (x *Advice) GetTitle() string {
+ if x != nil {
+ return x.Title
+ }
+ return ""
+}
+
+func (x *Advice) GetContent() string {
+ if x != nil {
+ return x.Content
+ }
+ return ""
+}
+
+func (x *Advice) GetDetail() string {
+ if x != nil {
+ return x.Detail
+ }
+ return ""
+}
+
+func (x *Advice) GetStartPosition() *Position {
+ if x != nil {
+ return x.StartPosition
+ }
+ return nil
+}
+
+var File_store_advice_proto protoreflect.FileDescriptor
+
+var file_store_advice_proto_rawDesc = []byte{
+ 0x0a, 0x12, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x64, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73,
+ 0x74, 0x6f, 0x72, 0x65, 0x1a, 0x12, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d,
+ 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa3, 0x02, 0x0a, 0x06, 0x41, 0x64, 0x76,
+ 0x69, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73,
+ 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x64, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,
+ 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x14,
+ 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74,
+ 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x16,
+ 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06,
+ 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x3f, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18,
+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e,
+ 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50,
+ 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x45, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50,
+ 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43,
+ 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e,
+ 0x47, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x42, 0x14,
+ 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73,
+ 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_store_advice_proto_rawDescOnce sync.Once
+ file_store_advice_proto_rawDescData = file_store_advice_proto_rawDesc
+)
+
+func file_store_advice_proto_rawDescGZIP() []byte {
+ file_store_advice_proto_rawDescOnce.Do(func() {
+ file_store_advice_proto_rawDescData = protoimpl.X.CompressGZIP(file_store_advice_proto_rawDescData)
+ })
+ return file_store_advice_proto_rawDescData
+}
+
+var file_store_advice_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_store_advice_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_store_advice_proto_goTypes = []interface{}{
+ (Advice_Status)(0), // 0: bytebase.store.Advice.Status
+ (*Advice)(nil), // 1: bytebase.store.Advice
+ (*Position)(nil), // 2: bytebase.store.Position
+}
+var file_store_advice_proto_depIdxs = []int32{
+ 0, // 0: bytebase.store.Advice.status:type_name -> bytebase.store.Advice.Status
+ 2, // 1: bytebase.store.Advice.start_position:type_name -> bytebase.store.Position
+ 2, // [2:2] is the sub-list for method output_type
+ 2, // [2:2] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_store_advice_proto_init() }
+func file_store_advice_proto_init() {
+ if File_store_advice_proto != nil {
+ return
+ }
+ file_store_common_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_store_advice_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Advice); 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_store_advice_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_store_advice_proto_goTypes,
+ DependencyIndexes: file_store_advice_proto_depIdxs,
+ EnumInfos: file_store_advice_proto_enumTypes,
+ MessageInfos: file_store_advice_proto_msgTypes,
+ }.Build()
+ File_store_advice_proto = out.File
+ file_store_advice_proto_rawDesc = nil
+ file_store_advice_proto_goTypes = nil
+ file_store_advice_proto_depIdxs = nil
+}
diff --git a/proto/generated-go/store/common.pb.go b/proto/generated-go/store/common.pb.go
index 92ca28a213..24cc090ea7 100644
--- a/proto/generated-go/store/common.pb.go
+++ b/proto/generated-go/store/common.pb.go
@@ -354,6 +354,61 @@ func (x *PageToken) GetOffset() int32 {
return 0
}
+type Position struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Line int32 `protobuf:"varint,1,opt,name=line,proto3" json:"line,omitempty"`
+ Column int32 `protobuf:"varint,2,opt,name=column,proto3" json:"column,omitempty"`
+}
+
+func (x *Position) Reset() {
+ *x = Position{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_store_common_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Position) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Position) ProtoMessage() {}
+
+func (x *Position) ProtoReflect() protoreflect.Message {
+ mi := &file_store_common_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 Position.ProtoReflect.Descriptor instead.
+func (*Position) Descriptor() ([]byte, []int) {
+ return file_store_common_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *Position) GetLine() int32 {
+ if x != nil {
+ return x.Line
+ }
+ return 0
+}
+
+func (x *Position) GetColumn() int32 {
+ if x != nil {
+ return x.Column
+ }
+ return 0
+}
+
var File_store_common_proto protoreflect.FileDescriptor
var file_store_common_proto_rawDesc = []byte{
@@ -362,47 +417,50 @@ var file_store_common_proto_rawDesc = []byte{
0x74, 0x6f, 0x72, 0x65, 0x22, 0x39, 0x0a, 0x09, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65,
0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65,
- 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x2a,
- 0xd5, 0x02, 0x0a, 0x06, 0x45, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x4e,
- 0x47, 0x49, 0x4e, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
- 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4c, 0x49, 0x43, 0x4b, 0x48, 0x4f, 0x55, 0x53, 0x45,
- 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x59, 0x53, 0x51, 0x4c, 0x10, 0x02, 0x12, 0x0c, 0x0a,
- 0x08, 0x50, 0x4f, 0x53, 0x54, 0x47, 0x52, 0x45, 0x53, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x53,
- 0x4e, 0x4f, 0x57, 0x46, 0x4c, 0x41, 0x4b, 0x45, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x51,
- 0x4c, 0x49, 0x54, 0x45, 0x10, 0x05, 0x12, 0x08, 0x0a, 0x04, 0x54, 0x49, 0x44, 0x42, 0x10, 0x06,
- 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x4f, 0x4e, 0x47, 0x4f, 0x44, 0x42, 0x10, 0x07, 0x12, 0x09, 0x0a,
- 0x05, 0x52, 0x45, 0x44, 0x49, 0x53, 0x10, 0x08, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x52, 0x41, 0x43,
- 0x4c, 0x45, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x50, 0x41, 0x4e, 0x4e, 0x45, 0x52, 0x10,
- 0x0a, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x53, 0x53, 0x51, 0x4c, 0x10, 0x0b, 0x12, 0x0c, 0x0a, 0x08,
- 0x52, 0x45, 0x44, 0x53, 0x48, 0x49, 0x46, 0x54, 0x10, 0x0c, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x41,
- 0x52, 0x49, 0x41, 0x44, 0x42, 0x10, 0x0d, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x43, 0x45, 0x41, 0x4e,
- 0x42, 0x41, 0x53, 0x45, 0x10, 0x0e, 0x12, 0x06, 0x0a, 0x02, 0x44, 0x4d, 0x10, 0x0f, 0x12, 0x0e,
- 0x0a, 0x0a, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x57, 0x41, 0x56, 0x45, 0x10, 0x10, 0x12, 0x14,
- 0x0a, 0x10, 0x4f, 0x43, 0x45, 0x41, 0x4e, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x4f, 0x52, 0x41, 0x43,
- 0x4c, 0x45, 0x10, 0x11, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x54, 0x41, 0x52, 0x52, 0x4f, 0x43, 0x4b,
- 0x53, 0x10, 0x12, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x4f, 0x52, 0x49, 0x53, 0x10, 0x13, 0x12, 0x08,
- 0x0a, 0x04, 0x48, 0x49, 0x56, 0x45, 0x10, 0x14, 0x12, 0x11, 0x0a, 0x0d, 0x45, 0x4c, 0x41, 0x53,
- 0x54, 0x49, 0x43, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x10, 0x15, 0x12, 0x0c, 0x0a, 0x08, 0x42,
- 0x49, 0x47, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10, 0x16, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x59, 0x4e,
- 0x41, 0x4d, 0x4f, 0x44, 0x42, 0x10, 0x17, 0x2a, 0x5c, 0x0a, 0x07, 0x56, 0x43, 0x53, 0x54, 0x79,
- 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x43, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,
- 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06,
- 0x47, 0x49, 0x54, 0x48, 0x55, 0x42, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x4c,
- 0x41, 0x42, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x42, 0x49, 0x54, 0x42, 0x55, 0x43, 0x4b, 0x45,
- 0x54, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x41, 0x5a, 0x55, 0x52, 0x45, 0x5f, 0x44, 0x45, 0x56,
- 0x4f, 0x50, 0x53, 0x10, 0x04, 0x2a, 0x4e, 0x0a, 0x0c, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67,
- 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1d, 0x0a, 0x19, 0x4d, 0x41, 0x53, 0x4b, 0x49, 0x4e, 0x47,
- 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
- 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0b,
- 0x0a, 0x07, 0x50, 0x41, 0x52, 0x54, 0x49, 0x41, 0x4c, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x46,
- 0x55, 0x4c, 0x4c, 0x10, 0x03, 0x2a, 0x4c, 0x0a, 0x0c, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x46,
- 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x12, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f,
- 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a,
- 0x03, 0x43, 0x53, 0x56, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x02,
- 0x12, 0x07, 0x0a, 0x03, 0x53, 0x51, 0x4c, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x58, 0x4c, 0x53,
- 0x58, 0x10, 0x04, 0x42, 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64,
- 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x33,
+ 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22,
+ 0x36, 0x0a, 0x08, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6c,
+ 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x65, 0x12,
+ 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2a, 0xd5, 0x02, 0x0a, 0x06, 0x45, 0x6e, 0x67, 0x69,
+ 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x4e, 0x47, 0x49, 0x4e, 0x45, 0x5f, 0x55, 0x4e, 0x53,
+ 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x4c,
+ 0x49, 0x43, 0x4b, 0x48, 0x4f, 0x55, 0x53, 0x45, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x59,
+ 0x53, 0x51, 0x4c, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x4f, 0x53, 0x54, 0x47, 0x52, 0x45,
+ 0x53, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x4e, 0x4f, 0x57, 0x46, 0x4c, 0x41, 0x4b, 0x45,
+ 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x51, 0x4c, 0x49, 0x54, 0x45, 0x10, 0x05, 0x12, 0x08,
+ 0x0a, 0x04, 0x54, 0x49, 0x44, 0x42, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x4f, 0x4e, 0x47,
+ 0x4f, 0x44, 0x42, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x45, 0x44, 0x49, 0x53, 0x10, 0x08,
+ 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x52, 0x41, 0x43, 0x4c, 0x45, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07,
+ 0x53, 0x50, 0x41, 0x4e, 0x4e, 0x45, 0x52, 0x10, 0x0a, 0x12, 0x09, 0x0a, 0x05, 0x4d, 0x53, 0x53,
+ 0x51, 0x4c, 0x10, 0x0b, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x44, 0x53, 0x48, 0x49, 0x46, 0x54,
+ 0x10, 0x0c, 0x12, 0x0b, 0x0a, 0x07, 0x4d, 0x41, 0x52, 0x49, 0x41, 0x44, 0x42, 0x10, 0x0d, 0x12,
+ 0x0d, 0x0a, 0x09, 0x4f, 0x43, 0x45, 0x41, 0x4e, 0x42, 0x41, 0x53, 0x45, 0x10, 0x0e, 0x12, 0x06,
+ 0x0a, 0x02, 0x44, 0x4d, 0x10, 0x0f, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47,
+ 0x57, 0x41, 0x56, 0x45, 0x10, 0x10, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x43, 0x45, 0x41, 0x4e, 0x42,
+ 0x41, 0x53, 0x45, 0x5f, 0x4f, 0x52, 0x41, 0x43, 0x4c, 0x45, 0x10, 0x11, 0x12, 0x0d, 0x0a, 0x09,
+ 0x53, 0x54, 0x41, 0x52, 0x52, 0x4f, 0x43, 0x4b, 0x53, 0x10, 0x12, 0x12, 0x09, 0x0a, 0x05, 0x44,
+ 0x4f, 0x52, 0x49, 0x53, 0x10, 0x13, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x56, 0x45, 0x10, 0x14,
+ 0x12, 0x11, 0x0a, 0x0d, 0x45, 0x4c, 0x41, 0x53, 0x54, 0x49, 0x43, 0x53, 0x45, 0x41, 0x52, 0x43,
+ 0x48, 0x10, 0x15, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x49, 0x47, 0x51, 0x55, 0x45, 0x52, 0x59, 0x10,
+ 0x16, 0x12, 0x0c, 0x0a, 0x08, 0x44, 0x59, 0x4e, 0x41, 0x4d, 0x4f, 0x44, 0x42, 0x10, 0x17, 0x2a,
+ 0x5c, 0x0a, 0x07, 0x56, 0x43, 0x53, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x56, 0x43,
+ 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
+ 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x48, 0x55, 0x42, 0x10, 0x01,
+ 0x12, 0x0a, 0x0a, 0x06, 0x47, 0x49, 0x54, 0x4c, 0x41, 0x42, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09,
+ 0x42, 0x49, 0x54, 0x42, 0x55, 0x43, 0x4b, 0x45, 0x54, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x41,
+ 0x5a, 0x55, 0x52, 0x45, 0x5f, 0x44, 0x45, 0x56, 0x4f, 0x50, 0x53, 0x10, 0x04, 0x2a, 0x4e, 0x0a,
+ 0x0c, 0x4d, 0x61, 0x73, 0x6b, 0x69, 0x6e, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x1d, 0x0a,
+ 0x19, 0x4d, 0x41, 0x53, 0x4b, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x45, 0x56, 0x45, 0x4c, 0x5f, 0x55,
+ 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04,
+ 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x52, 0x54, 0x49, 0x41,
+ 0x4c, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x03, 0x2a, 0x4c, 0x0a,
+ 0x0c, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a,
+ 0x12, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
+ 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x43, 0x53, 0x56, 0x10, 0x01, 0x12, 0x08,
+ 0x0a, 0x04, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x51, 0x4c, 0x10,
+ 0x03, 0x12, 0x08, 0x0a, 0x04, 0x58, 0x4c, 0x53, 0x58, 0x10, 0x04, 0x42, 0x14, 0x5a, 0x12, 0x67,
+ 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72,
+ 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -418,13 +476,14 @@ func file_store_common_proto_rawDescGZIP() []byte {
}
var file_store_common_proto_enumTypes = make([]protoimpl.EnumInfo, 4)
-var file_store_common_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_store_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_store_common_proto_goTypes = []interface{}{
(Engine)(0), // 0: bytebase.store.Engine
(VCSType)(0), // 1: bytebase.store.VCSType
(MaskingLevel)(0), // 2: bytebase.store.MaskingLevel
(ExportFormat)(0), // 3: bytebase.store.ExportFormat
(*PageToken)(nil), // 4: bytebase.store.PageToken
+ (*Position)(nil), // 5: bytebase.store.Position
}
var file_store_common_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
@@ -452,6 +511,18 @@ func file_store_common_proto_init() {
return nil
}
}
+ file_store_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Position); 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{
@@ -459,7 +530,7 @@ func file_store_common_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_store_common_proto_rawDesc,
NumEnums: 4,
- NumMessages: 1,
+ NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
diff --git a/proto/store/advice.proto b/proto/store/advice.proto
new file mode 100644
index 0000000000..3fb08cd6d6
--- /dev/null
+++ b/proto/store/advice.proto
@@ -0,0 +1,33 @@
+syntax = "proto3";
+
+package bytebase.store;
+
+import "store/common.proto";
+
+option go_package = "generated-go/store";
+
+message Advice {
+ enum Status {
+ // Unspecified.
+ STATUS_UNSPECIFIED = 0;
+ SUCCESS = 1;
+ WARNING = 2;
+ ERROR = 3;
+ }
+ // The advice status.
+ Status status = 1;
+
+ // The advice code.
+ int32 code = 2;
+
+ // The advice title.
+ string title = 3;
+
+ // The advice content.
+ string content = 4;
+
+ // The advice detail.
+ string detail = 5;
+
+ Position start_position = 6;
+}
diff --git a/proto/store/common.proto b/proto/store/common.proto
index 18bf9d6a4a..daccc0d718 100644
--- a/proto/store/common.proto
+++ b/proto/store/common.proto
@@ -63,3 +63,8 @@ enum ExportFormat {
SQL = 3;
XLSX = 4;
}
+
+message Position {
+ int32 line = 1;
+ int32 column = 2;
+}