Skip to content

Commit

Permalink
feat: debugging index
Browse files Browse the repository at this point in the history
  • Loading branch information
toopay committed Oct 25, 2024
1 parent 3e9f8c3 commit 23d6e87
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions pkg/resource/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ func Import(flags *Flags, config *raiden.Config) error {
if err != nil {
return err
}
ImportLogger.Trace("indexes", spResource.Indexes)
spResource.Tables = tables.AttachIndexAndAction(spResource.Tables, spResource.Indexes, spResource.RelationActions)

// create import state
Expand Down
10 changes: 7 additions & 3 deletions pkg/resource/tables/compare.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,17 @@ func compareRelations(table *objects.Table, source, target []objects.TablesRelat
continue
}

// if t.Index == nil && sc.Index == nil {
if t.Index == nil && sc.Index == nil {
// updateItems = append(updateItems, objects.UpdateRelationItem{
// Data: sc,
// Type: objects.UpdateRelationCreateIndex,
// })
// Logger.Debug("create new index", "constrain-name", sc.ConstraintName)
// }
Logger.Debug("create new index", "constrain-name", sc.ConstraintName)
} else {
Logger.Debug("check-index", "t-index", t.Index)
Logger.Debug("check-index", "sc-index", sc.Index)
Logger.Debug("updating index", "constrain-name", sc.ConstraintName)
}

if t.Action != nil && sc.Action != nil {
if t.Action.UpdateAction != sc.Action.UpdateAction {
Expand Down

0 comments on commit 23d6e87

Please sign in to comment.