Skip to content
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

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from

Conversation

VivekY1098
Copy link
Collaborator

Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to README are included in PR

@@ -243,6 +243,10 @@ func ToSpannerIndexName(conv *Conv, srcIndexName string) string {
return getSpannerValidName(conv, srcIndexName)
}

func ToSpannerCheckConstraintName(conv *Conv, srcCheckConstraintName string) string {
Copy link
Collaborator

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
Copy link
Collaborator

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

Copy link
Collaborator

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)
Copy link
Collaborator

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
Copy link
Collaborator

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'
}

Copy link
Collaborator

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>
Copy link
Collaborator

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
Copy link
Collaborator

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. `,
Copy link
Collaborator

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.

webv2/config.json Outdated Show resolved Hide resolved
@taherkl taherkl changed the base branch from master to develop November 18, 2024 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants