-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ed87e5e
commit 6466140
Showing
15 changed files
with
235 additions
and
132 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
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
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
13 changes: 0 additions & 13 deletions
13
db/migrate/20241213203203_add_unique_index_on_pending_payments.rb
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
db/migrate/20241216110525_add_payable_payment_status_to_payment.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,27 @@ | ||
# frozen_string_literal: true | ||
|
||
class AddPayablePaymentStatusToPayment < ActiveRecord::Migration[7.1] | ||
disable_ddl_transaction! | ||
|
||
def change | ||
create_enum :payment_payable_payment_status, | ||
%w[ | ||
pending | ||
processing | ||
succeeded | ||
failed | ||
] | ||
|
||
add_column :payments, | ||
:payable_payment_status, | ||
:enum, | ||
enum_type: 'payment_payable_payment_status', | ||
null: true | ||
|
||
add_index :payments, | ||
%i[payable_id payable_type], | ||
where: "payable_payment_status in ('pending', 'processing')", | ||
unique: true, | ||
algorithm: :concurrently | ||
end | ||
end |
Oops, something went wrong.