-
-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove columns 'for_banks' and 'for_partners' from Questions table
- Loading branch information
Showing
5 changed files
with
29 additions
and
21 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
16 changes: 16 additions & 0 deletions
16
db/migrate/20250104193318_remove_for_banks_and_for_partners_from_questions.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,16 @@ | ||
class RemoveForBanksAndForPartnersFromQuestions < ActiveRecord::Migration[7.2] | ||
def up | ||
puts "Removing partner only FAQs..." | ||
Question.where(for_partners: true, for_banks: false).delete_all | ||
puts "Partner only FAQs removed" | ||
safety_assured do | ||
remove_column :questions, :for_banks | ||
remove_column :questions, :for_partners | ||
end | ||
end | ||
|
||
def down | ||
add_column :questions, :for_banks, :boolean, null: false, default: true | ||
add_column :questions, :for_partners, :boolean, null: false, default: false | ||
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
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
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