-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/mig mysql spanner check gcpps09 37 #4
base: develop
Are you sure you want to change the base?
Conversation
@@ -243,6 +243,10 @@ func ToSpannerIndexName(conv *Conv, srcIndexName string) string { | |||
return getSpannerValidName(conv, srcIndexName) | |||
} | |||
|
|||
func ToSpannerCheckConstraintName(conv *Conv, srcCheckConstraintName string) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comments
AutoGen ddl.AutoGenCol | ||
Name string | ||
Type Type | ||
NotNull bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the need for removing these spaces?
@@ -115,6 +115,7 @@ func (is *InfoSchemaImpl) GenerateSrcSchema(conv *internal.Conv, infoSchema Info | |||
table, e := is.processTable(conv, t, infoSchema) | |||
mutex.Lock() | |||
conv.SrcSchema[table.Id] = table | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra line
@@ -185,7 +186,7 @@ func (is *InfoSchemaImpl) processTable(conv *internal.Conv, table SchemaAndName, | |||
var t schema.Table | |||
fmt.Println("processing schema for table", table) | |||
tblId := internal.GenerateTableId() | |||
primaryKeys, constraints, err := infoSchema.GetConstraints(conv, table) | |||
primaryKeys, checkConstrainst, constraints, err := infoSchema.GetConstraints(conv, table) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkConstrainst -> checkConstraints
@@ -104,6 +104,7 @@ func (ss *SchemaToSpannerImpl) SchemaToSpannerDDLHelper(conv *internal.Conv, tod | |||
ty, issues := toddl.ToSpannerType(conv, "", srcCol.Type, isPk) | |||
|
|||
// TODO(hengfeng): add issues for all elements of srcCol.Ignored. | |||
// if sr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecessary comment
droppedColumnSpMaxLength = 'MAX' | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove extra line
@@ -390,7 +453,7 @@ export class ObjectDetailComponent implements OnInit { | |||
saveColumnTable() { | |||
this.isEditMode = false | |||
let updateData: IUpdateTable = { UpdateCols: {} } | |||
let pgSQLToStandardTypeTypemap: Map<String, String>; | |||
let pgSQLToStandardTypeTypemap: Map<String, String> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for lint changes if the code is not modified
ToType: (this.conv.SpDialect === Dialect.PostgreSQLDialect) ? (standardDataType === undefined ? col.spDataType : standardDataType) : col.spDataType, | ||
ToType: | ||
this.conv.SpDialect === Dialect.PostgreSQLDialect | ||
? standardDataType === undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert all the lint changes. Only show code changes done for the Check constraint feature
} | ||
this.dialog.open(InfodialogComponent, { | ||
data: { | ||
message: `Column ${spColName} is a part of${pkWarning}${commnaString}${indexWaring}${connectingString} check constrainst. Remove the dependencies from respective tabs before dropping the Column. `, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constrainst - constraints
Please perform a spell check on all the sentences/variables you have added.
Fixes #<issue_number_goes_here>