Synchronise migrations to 15fc8592d#55
Synchronise migrations to 15fc8592d#55matelakat wants to merge 2 commits intosap-oc:stable/sap/3.0from matelakat:sync-migrations
Conversation
This change picks only the added databag items. This way the data bag migrations will not cause an issue if people want to update the package from released 3.0 to the SAP version.
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| unless ta.key? "migration" |
There was a problem hiding this comment.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| @@ -0,0 +1,13 @@ | |||
| def upgrade(ta, td, a, d) | |||
| unless a.key? "migration" | |||
There was a problem hiding this comment.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| unless ta.key? "cross_az_attach" |
There was a problem hiding this comment.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| @@ -0,0 +1,13 @@ | |||
| def upgrade(ta, td, a, d) | |||
| unless a.key? "cross_az_attach" | |||
There was a problem hiding this comment.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| unless ta["zvm"].key? "zvm_xcat_network" |
There was a problem hiding this comment.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| @@ -0,0 +1,15 @@ | |||
| def upgrade(ta, td, a, d) | |||
| unless a["zvm"].key? "zvm_xcat_network" | |||
There was a problem hiding this comment.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| if a.key?("ovs") |
There was a problem hiding this comment.
Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| end | ||
|
|
||
| def downgrade(ta, td, a, d) | ||
| unless ta.key? "use_multipath" |
There was a problem hiding this comment.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| @@ -0,0 +1,13 @@ | |||
| def upgrade(ta, td, a, d) | |||
| unless a.key? "use_multipath" | |||
There was a problem hiding this comment.
Style/IfUnlessModifier: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
We had multiple 55 migrations in the code. As a fix the newer 55 migration 055_add_tunnel_csum has been merged to 56, so it will be executed.
| a.delete("rpc_workers") | ||
|
|
||
| # From 055_add_tunnel_csum | ||
| if a.key?("ovs") |
There was a problem hiding this comment.
Style/IfUnlessModifier: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||. (https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier)
| a["ovs"] ||= {} | ||
| a["ovs"]["tunnel_csum"] = ta["ovs"]["tunnel_csum"] | ||
|
|
||
|
|
There was a problem hiding this comment.
Layout/EmptyLines: Extra blank line detected. (https://github.com/bbatsov/ruby-style-guide#two-or-more-empty-lines)
This change picks only the added databag items. This way the data bag
migrations will not cause an issue if people want to update the package
from released 3.0 to the SAP version.