Maikel Linke
a6dee77071
Style
2022-02-16 10:33:49 +11:00
Matt-Yorkley
4c50ca69ea
Improve data migration logic and add test coverage
2022-02-16 10:23:24 +11:00
Matt-Yorkley
feaa92406a
Split migration into two parts for easier testing
2022-02-16 10:23:24 +11:00
Maikel Linke
68193efcf6
Keep old customers.name column for compatibilty
...
Our app code will try to access the old attribute while the migration is
running. That would lead to errors during checkout.
2022-02-16 10:23:24 +11:00
François Turbelin
9a12957e27
Handle the empty-space name on customers
2022-02-16 10:23:23 +11:00
François Turbelin
de4d074cb3
Remove bill_address fetching logic
2022-02-16 10:23:23 +11:00
François Turbelin
5c9dd81595
Deal with nil attirubtes on bill_address
2022-02-16 10:23:23 +11:00
François Turbelin
50302163c0
Update migration with better logic and cosmetics
2022-02-16 10:23:23 +11:00
François Turbelin
9682b9256b
Arrange classes loading for good migration
2022-02-16 10:23:23 +11:00
François Turbelin
d016c47789
Refactor data migration to use data sets
2022-02-16 10:23:23 +11:00
François Turbelin
b8afb7ec4d
Add default values for new fields
2022-02-16 10:23:23 +11:00
François Turbelin
7c25127ab6
Improve first_name and last_name setup
2022-02-16 10:23:22 +11:00
Adrien Chauve
d0f347efaa
Add migration to split Customers.name into first and last names
2022-02-16 10:23:22 +11:00
Maikel Linke
9abacf9047
Upgrade old StripeConnect payment methods to SCA
...
StripeConnect has been replaced by StripeSCA. But we still have some
StripeConnect payment methods in our production databases. We need to
convert them to StripeSCA methods before we can remove the related
code and clean up. Otherwise our code would raise errors when
encountering an old StripeConnect method, not knowing what that is.
2022-01-24 12:35:45 +11:00
Matt-Yorkley
534354a177
Add data migration
2022-01-14 11:23:41 +00:00
Matt-Yorkley
8f825a709c
Add mails_sent column to order cycles
2022-01-12 10:34:47 +00:00
Matt-Yorkley
492325b74a
Add automatic_notifications column to order_cycles table
2021-12-23 20:41:49 +01:00
Matt-Yorkley
17a112907c
Add processed_at column to order_cycles table
2021-12-23 20:41:42 +01:00
Cillian O'Ruanaidh
84eaafb822
Add a :captured_at column on payments to store when they are captured
...
Fixes #8611 .
2021-12-17 14:45:47 +00:00
Matt-Yorkley
21bf5797ac
Improve data migration
2021-11-04 11:48:30 +00:00
Matt-Yorkley
4f5c266356
Add migration unit test
2021-11-04 11:48:30 +00:00
Matt-Yorkley
6f5cd98b1b
Migrate preference to enterprises table
2021-11-04 11:48:30 +00:00
Matt-Yorkley
cf64128d54
Update db/migrate/20211029174211_drop_source_columns.rb
...
Co-authored-by: Maikel <maikel@email.org.au >
2021-11-03 09:26:47 +00:00
Matt-Yorkley
1007d7afdf
Drop source_id and source_type columns from spree_adjustments
...
These are no longer used
2021-10-29 18:46:53 +01:00
Nihal Mohammed
e3307fd341
Migration to add business_address_id to enterpries
2021-10-06 15:06:50 +05:30
Nihal
2ad234d5aa
Migrate Migs to Check
2021-09-27 21:10:57 +05:30
Nihal M. Kelanthodika
f170b4241d
Merge pull request #8168 from apricot12/7799-Enterprise-Fee-Report
2021-09-22 20:39:06 +05:30
Maikel
a3c31f7d86
Revert "Kill stripe connect"
2021-09-20 08:39:34 +10:00
Nihal
757b7513ef
Migrate Pin gateway peyments to check
2021-09-11 16:52:32 +05:30
Nihal Mohammed
98ff3980f8
Migration of StripeConnect to StripeSCA
2021-09-10 14:43:34 +05:30
Matt-Yorkley
886e03af2f
Merge pull request #7805 from Matt-Yorkley/adjustments-admin
...
[Adjustments] Admin adjustments
2021-07-27 12:23:29 +02:00
Matt-Yorkley
ca6979e394
Extract call to Spree::TaxRate.match to a separate method and update tests
2021-07-25 22:47:40 +01:00
Matt-Yorkley
8f62ccb9b7
Match tax rates using rates applicable to the order
2021-07-25 22:47:40 +01:00
Mathieu Lovato Stumpf Guntz
89f97ba0ec
integrate db/schema.rb changes
2021-07-13 16:43:55 +02:00
Matt-Yorkley
77e4a6c465
Migrate admin adjustment tax amounts
2021-07-09 21:50:12 +01:00
Mathieu Lovato Stumpf Guntz
9670ca0fbb
Update schema after recent migrations
...
Add table `terms_of_service_files` and a `tax_category_id` field
2021-07-08 19:10:53 +02:00
Andy Brett
a3d9f1f3cc
create requires_authorization payment state and migration
2021-06-17 14:23:58 -07:00
Pau Pérez Fabregat
a8efbffca6
Merge pull request #7429 from Matt-Yorkley/adjustments-taxrate
...
[Adjustments] TaxRate changes
2021-06-17 11:51:01 +02:00
Matt-Yorkley
690cbe3ad3
Merge pull request #7468 from mkllnk/6328-tos-tracking
...
6328 tos tracking
2021-06-10 19:48:13 +02:00
Maikel Linke
fc8e22b82e
Update schema file description
...
I ran `rake db:migrate` and Rails updated this section. Let's use or we
have to constantly checkout the schema after migrations or we'll have
unrelated changes in future pull requests.
2021-06-09 16:02:05 +10:00
Maikel Linke
9027f8b604
Add attachment to TOS record
2021-06-09 14:06:53 +10:00
Maikel Linke
c4317c5707
Add model TermsOfServiceFile
...
We want to enable instance managers to upload TOS files.
I also added the rails_helper which is a new convention. It can contain
more Rails specific configuration we currently have in the spec_helper.
2021-06-09 14:06:09 +10:00
Matt-Yorkley
7bcb0bcaa8
Eager-load the adjustment's adjustable
...
Reduces the total migration time by ~15%. Requires including some more models, as order objects are now being eager-loaded as part of the polymorphic associations.
2021-06-06 20:20:41 +01:00
Matt-Yorkley
7ecd67a3fe
Skip orphaned adjustments
...
There are a handful of enterprise fee adjustments on line items in production data where the line item has actually been deleted and no longer exists, but the fee adjustment is still in the database.
2021-06-06 20:20:41 +01:00
Matt-Yorkley
d9f459d94a
Update db/migrate/20210406161242_migrate_enterprise_fee_tax_amounts.rb
...
Co-authored-by: Maikel <maikel@email.org.au >
2021-06-06 20:20:41 +01:00
Matt-Yorkley
832fbb7d5d
Update data migration model definitions
...
The good_migrations gem was not working with polymorphic associations.
2021-06-06 20:18:05 +01:00
Matt-Yorkley
dc7c674a0e
Switch to ApplicationRecord in migation spec
...
Fixes:
An error occurred while loading ./spec/migrations/migrate_enterprise_fee_tax_amounts_spec.rb.
Failure/Error: require_relative '../../db/migrate/20210406161242_migrate_enterprise_fee_tax_amounts'
TypeError:
superclass mismatch for class Adjustment
# ./db/migrate/20210406161242_migrate_enterprise_fee_tax_amounts.rb:2:in `<class:MigrateEnterpriseFeeTaxAmounts>'
# ./db/migrate/20210406161242_migrate_enterprise_fee_tax_amounts.rb:1:in `<top (required)>'
# ./spec/migrations/migrate_enterprise_fee_tax_amounts_spec.rb:4:in `require_relative'
# ./spec/migrations/migrate_enterprise_fee_tax_amounts_spec.rb:4:in `<top (required)>'
# -e:1:in `<main>'
2021-06-06 20:18:05 +01:00
Matt-Yorkley
b427fd6876
Add data migration for enterprise fee tax amounts
2021-06-06 20:16:03 +01:00
Matt-Yorkley
b3240f859a
Add tax category id to adjustments
2021-06-06 20:16:03 +01:00
jibees
088ae496cc
Merge pull request #7664 from shen-sat/7626-fix-unknown-currency-error
...
7626 fix unknown currency error
2021-05-28 16:18:04 +02:00