Set member status to sustainer upon payment
Introduces a state machine for the payment status as well. refs #213
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
class UpdatePaymentStatusToPending < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
Donation.where(payment_status: nil).update_all(payment_status: "pending")
|
||||
Donation.where.not(payment_status: %w[pending processing settled]).update_all(payment_status: "pending")
|
||||
end
|
||||
end
|
||||
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_05_17_105755) do
|
||||
ActiveRecord::Schema[8.0].define(version: 2025_05_27_113805) do
|
||||
create_table "active_storage_attachments", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "record_type", null: false
|
||||
|
||||
Reference in New Issue
Block a user