Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
asthamohta committed Dec 26, 2024
1 parent fea744d commit f6f128c
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 11 deletions.
6 changes: 0 additions & 6 deletions conversion/conversion_from_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ func (sads *SchemaFromSourceImpl) schemaFromDatabase(migrationProjectId string,
conv.SpProjectId = targetProfile.Conn.Sp.Project
conv.SpInstanceId = targetProfile.Conn.Sp.Instance
conv.Source = sourceProfile.Driver
fmt.Println("###2")
fmt.Println(conv.SpProjectId)
fmt.Println(conv.SpInstanceId)
//handle fetching schema differently for sharded migrations, we only connect to the primary shard to
//fetch the schema. We reuse the SourceProfileConnection object for this purpose.
var infoSchema common.InfoSchema
Expand Down Expand Up @@ -177,9 +174,6 @@ func (sads *DataFromSourceImpl) dataFromCSV(ctx context.Context, sourceProfile p
conv.SpProjectId = targetProfile.Conn.Sp.Project
conv.SpInstanceId = targetProfile.Conn.Sp.Instance
conv.Source = sourceProfile.Driver
fmt.Println("###3")
fmt.Println(conv.SpProjectId)
fmt.Println(conv.SpInstanceId)
dialect, err := targetProfile.FetchTargetDialect(ctx)
if err != nil {
return nil, fmt.Errorf("could not fetch dialect: %v", err)
Expand Down
1 change: 0 additions & 1 deletion expressions_api/expression_verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ func (ddlv *DDLVerifierImpl) VerifySpannerDDL(conv *internal.Conv, expressionDet
Source: conv.Source,
ExpressionDetailList: expressionDetails,
}
ddlv.Expressions.RefreshSpannerClient(context.Background(), conv.SpProjectId, conv.SpInstanceId)
verificationResults := ddlv.Expressions.VerifyExpressions(ctx, verifyExpressionsInput)

return verificationResults, verificationResults.Err
Expand Down
2 changes: 1 addition & 1 deletion sources/common/toddl.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (ss *SchemaToSpannerImpl) SchemaToSpannerDDL(conv *internal.Conv, toddl ToD
srcTable := conv.SrcSchema[tableId]
ss.SchemaToSpannerDDLHelper(conv, toddl, srcTable, false)
}
if conv.Source == constants.MYSQL {
if conv.Source == constants.MYSQL && conv.SpProjectId!="" && conv.SpInstanceId!=""{
expressionDetails := ss.DdlV.GetSourceExpressionDetails(conv, tableIds)
expressions, err := ss.DdlV.VerifySpannerDDL(conv, expressionDetails)
if err != nil && !strings.Contains(err.Error(), "expressions either failed verification") {
Expand Down
3 changes: 0 additions & 3 deletions webv2/api/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ func ConvertSchemaSQL(w http.ResponseWriter, r *http.Request) {
conv.SpProjectId = sessionState.SpannerProjectId
conv.SpInstanceId = sessionState.SpannerInstanceID
conv.Source = sessionState.Driver
fmt.Println("####4")
fmt.Println(conv.SpProjectId)
fmt.Println(conv.SpInstanceId)
conv.IsSharded = sessionState.IsSharded
var err error
additionalSchemaAttributes := internal.AdditionalSchemaAttributes{
Expand Down

0 comments on commit f6f128c

Please sign in to comment.