forked from solidusio/solidus
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Spree::Adjustment#promotion_code_id from core
This moves the column into solidus_legacy_promotions, which is the only place it's used at.
- Loading branch information
Showing
3 changed files
with
11 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
legacy_promotions/db/migrate/20240621100123_add_promotion_code_id_to_spree_adjustments.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class AddPromotionCodeIdToSpreeAdjustments < ActiveRecord::Migration[5.0] | ||
def up | ||
unless column_exists?(:spree_adjustments, :promotion_code_id) | ||
add_column :spree_adjustments, :promotion_code_id, :integer | ||
end | ||
unless index_exists?(:spree_adjustments, :promotion_code_id) | ||
add_index :spree_adjustments, :promotion_code_id, name: "index_spree_adjustments_on_promotion_code_id" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters