View definition comparison reports a false positive for Oracle 12C
Description
diffToChangelog comparison for views results in false positive when the view definition has newline characters and spacing.
Scenario: 1. On Oracle DB when a view creation script is executed manually, the view definition is stored retaining the actual new line chars \n in the query. 2. Same definition executed as a script removes the newline chars and formats the SQL into a single line. 3. When these definitions are compared they are reported as different.
refer to the screenshot attached
Suggested Solution: compare the formatted SQL instead of a String.equals() in ObjectDifferences.StandardCompareFunction.areEqual()
Environment
This was tested on a Linux vagrant box running Oracle 12C.
diffToChangelog comparison for views results in false positive when the view definition has newline characters and spacing.
Scenario:
1. On Oracle DB when a view creation script is executed manually, the view definition is stored retaining the actual new line chars \n in the query.
2. Same definition executed as a script removes the newline chars and formats the SQL into a single line.
3. When these definitions are compared they are reported as different.
refer to the screenshot attached
Suggested Solution:
compare the formatted SQL instead of a String.equals() in ObjectDifferences.StandardCompareFunction.areEqual()