Skip to content

Commit e9360f8

Browse files
authored
Remove partner FAQs - Part 2 (#4913)
* Remove columns 'for_banks' and 'for_partners' from Questions table * Remove puts from migration
1 parent cd80ed5 commit e9360f8

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
class RemoveForBanksAndForPartnersFromQuestions < ActiveRecord::Migration[7.2]
2+
def up
3+
Question.where(for_partners: true, for_banks: false).delete_all
4+
safety_assured do
5+
remove_column :questions, :for_banks
6+
remove_column :questions, :for_partners
7+
end
8+
end
9+
10+
def down
11+
add_column :questions, :for_banks, :boolean, null: false, default: true
12+
add_column :questions, :for_partners, :boolean, null: false, default: false
13+
end
14+
end

db/schema.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema[7.2].define(version: 2024_12_20_020009) do
13+
ActiveRecord::Schema[7.2].define(version: 2025_01_04_193318) do
1414
# These are extensions that must be enabled in order to support this database
1515
enable_extension "plpgsql"
1616

@@ -692,8 +692,6 @@
692692

693693
create_table "questions", force: :cascade do |t|
694694
t.string "title", null: false
695-
t.boolean "for_partners", default: true, null: false
696-
t.boolean "for_banks", default: true, null: false
697695
t.datetime "created_at", null: false
698696
t.datetime "updated_at", null: false
699697
end

0 commit comments

Comments
 (0)