Add Sync options to ignore constrains and indices #2320
No reviewers
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#2320
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "6543/xorm:SyncOptions_add_IgnoreConstrains"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
needed for https://github.com/woodpecker-ci/woodpecker/pull/2117
@ -221,24 +235,22 @@ func (session *Session) SyncWithOptions(opts SyncOptions, beans ...interface{})
}
}
if oriIndex != nil {
So why remove these lines?
see
93b9dc3fd9
:because you can merge the two if statements to
oriIndex != nil && oriIndex.Type != index.Type
witch is always false as it is checked 7 lines aboth( -> it check if index2 is equal index and if true oriIndex is not nill
so if origIndex != index -> origIndey = nil ->
false && true
so if origIndex == index -> origIndex != nil ->
true && false
)
@lunny added tests to cover the new cases ... this implied that I have to add the SyncWithOptions had to be added to EngineInterface
I would say it's ready?
CI failed unrelated :/
@ -221,24 +235,22 @@ func (session *Session) SyncWithOptions(opts SyncOptions, beans ...interface{})
}
}
if oriIndex != nil {
I still cannot understand why this lines should be removed.
I have added it back and we can move this into another pull / discussion
CI passed 🚀
@lunny do i have to do something else?