Commit Graph

690 Commits

Author SHA1 Message Date
Maikel Linke
4364b1283b Enable pg_stat_statements in development like prod
We activated this database extension in production via ofn-install. But
this had not been reflected in Rails' schema.rb.

This change avoids inconsistent db/schema.rb files on production servers
and makes development more similar to production.
2023-01-17 15:41:35 +11:00
Maikel Linke
446fa2ddab Remove confusing and unused db table
This table came from Spree but has never been used. We soon want to use
the term Product Group and having this table would be confusing.
2023-01-05 15:04:52 +11:00
Maikel Linke
59a565c446 Remove confusing and unused db table
This table came from Spree but has never been used.
2023-01-05 15:04:01 +11:00
Maikel Linke
cdd39f526d Remove unused Spree database table
I randomly stumbled across this one and couldn't find any use of it. I
think that it refers to an old payment gateway that may have been used
by Spree once upon a time.
2023-01-05 11:05:15 +11:00
Laurel16
bfd396e644 Add instagram handler validator
update entreprise model to match the correct pattern for instagram attribute & add migration to correct wrong links in db + test
2022-12-08 15:22:05 +01:00
Konrad
6ac21eaab4 Merge pull request #9999 from abdellani/add-ability-to-save-rendering-options-per-report
Add ability to save rendering options per report
2022-12-02 14:33:37 +01:00
Mohamed ABDELLANI
b6a7ca3047 create ReportRenderingOptions model 2022-11-24 10:25:59 +01:00
Pipo Bimbo
099f75befb pg_stat_statement extension already installed with ofn-install -> https://github.com/openfoodfoundation/ofn-install/blob/master/roles/datadog/tasks/pg_stats.yml#L2 2022-11-18 10:44:02 +01:00
Filipe
a7353eb69f Merge pull request #9575 from apricot12/9487-Dimensions-Packing-Reports
Added HEIGHT, WEIGHT, WIDTH, DEPTH columns to packing reports by customer.
2022-11-10 09:55:26 +00:00
Rachel Arnould
2652bc086a Merge pull request #9755 from cillian/order-cycle-payment-methods
Let people choose which payment methods are available to customers on order cycles
2022-10-26 20:10:34 +02:00
Nihal Mohammed
f38661cdf1 Add weight, height, width, depth fields to line items 2022-10-25 10:09:26 +02:00
Rachel Arnould
3c9b7a10f4 Merge pull request #9058 from Matt-Yorkley/oidc-redux
Add OIDC authentication for Les Communs
2022-10-24 13:18:36 +02:00
Cillian O'Ruanaidh
5718f9f00c Create :order_cycles_distributor_payment_methods HABTM join table 2022-10-21 17:21:31 +01:00
Cillian O'Ruanaidh
5423c1c02e Resolve conflict in db/schema.rb 2022-10-21 17:21:24 +01:00
Matt-Yorkley
b36fae1bbb Add migration for omniauth attributes 2022-10-18 11:31:35 +11:00
AthiraKadampatta
e5a136801d 9726 Remove attachment_width and attachment_height from spree_asset 2022-10-11 10:26:32 +05:30
AthiraKadampatta
addd2ea9ac #9726 Add migration to remove unused paperclip columns 2022-10-11 10:26:32 +05:30
Cillian O'Ruanaidh
8c483f2eab Change join table in migration from order cycles to distributor shipping methods instead of order cycles to shipping methods 2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
ad51b41bb3 Use :belongs_to instead of :references in :order_cycles_shipping_methods
Also fix migration class name.
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
80b7a5d39a Remove OrderCycleShippingMethod model and use a :has_and_belongs_to_many association instead
Before the OrderCycleShippingMethod had a validation which checked the shipping method belonged to the order cycle distributor. Instead of this validation this just ignores shipping methods which don't belong to one of the order cycle's distributors when they are being attached in the OrderCycleForm service. This pattern is already being used in the OrderCycleForm service for ignoring Schedules that the person doesn't own.

Co-authored-by: Maikel <maikel@email.org.au>
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
fc4f951a1a Only require OrderCycleShippingMethod records if people want to override the default shipping methods
It makes things much simpler if we return all shipping methods by default without needing OrderCycleShippingMethod records to be added to the database.

Co-authored-by: Maikel <maikel@email.org.au>
2022-09-30 13:13:39 +01:00
Cillian O'Ruanaidh
9a6e8a1113 Add an OrderCycleShippingMethod model to handle attaching shipping methods to order cycles 2022-09-30 13:13:39 +01:00
Maikel Linke
4e33bd2713 Avoid trying to delete address referenced elsewhere 2022-09-27 13:14:51 +10:00
Maikel Linke
591f901935 Delete duplicate customer entries 2022-09-27 13:14:49 +10:00
Maikel Linke
4ba008f31b Synchronise db schema with production
Rails seems to have changed the options in schema.rb at some point to
include more specifics but we didn't record this in our tracked
schema.rb. As a result, production shows changes in that file after
running migrations.

Sometimes I also use production dumps in development, for example to
test migrations. Then the schema is changed for the migration and for
these syntax changes. Synching the schema with migration should
standardise all our setups and and make git diffs clearer.
2022-09-07 16:02:51 +10:00
Philipp Winkler
bf53a02270 Add api key toggle view checkbox 2022-08-07 09:48:49 +02:00
Filipe
2f550725e3 Merge pull request #9368 from jibees/9178-add-note-on-order
Admin, Edit order: Can add note on order
2022-07-08 12:13:18 +01:00
Jean-Baptiste Bellet
7fbe893927 Add note to spree_orders object 2022-07-05 10:09:20 +02:00
Arthur Vieira
a2bc61475b Add whatsapp_phone column to enterprises 2022-06-30 19:19:06 -03:00
Maikel
8d1e1e6e04 Merge pull request #9322 from mkllnk/fix-schema
Remove accidental modification of the db schema
2022-06-22 11:23:54 +10:00
François Turbelin
76ea7089d9 Implement suggestions 2022-06-21 10:08:12 +02:00
François Turbelin
39a6b5d20f Add disabled_at logic on spree users 2022-06-21 10:08:12 +02:00
Maikel Linke
d78cbce4f3 Remove accidental modification of the db schema
fa74dae99c changed the schema file even
though the migration doesn't touch the database structure. A previous
development version of the migration did this but the finally merged
version didn't. So this schema is not valid. Let's hope that nobody set
up a new instance with the changed schema and we just fix it to what it
was before.
2022-06-20 14:47:29 +10:00
Maikel Linke
d27d98419f Fix typo in address migration 2022-06-09 20:54:46 +05:30
Nihal Mohammed
870eb8961e Update migration 2022-06-09 20:54:46 +05:30
Nihal Mohammed
b6b81a38d9 Migration to nullify spree_users_bill_address_id_fk foreign key on delete and remove addresses with empty phone. 2022-06-09 20:54:34 +05:30
Maikel Linke
076efd653d Correct checksum of big files stored on AWS S3 2022-06-02 12:28:52 +10:00
Maikel Linke
ce0e33fffa Install Active Storage database tables 2022-04-25 13:00:30 +10:00
GeorgeThoppil
898c470c00 Change enterprise visibility scope 2022-04-21 20:27:28 -04:00
Maikel Linke
2e989083bd Remove unused icons from Spree:Taxon
The icons are not used any more and the default icon file never existed
in our code base (only in Spree when we depended on that).

And it's better to remove this clutter before migrating those files to
Active Storage.

We are keeping the icon files in storage as a backup. The whole folder
`/spree/taxons` can be deleted when desired. But storage is cheap.
2022-04-15 16:50:28 +10:00
Nihal Mohammed
b0fd333126 Added migration to update display_on column in spree_payment_methods table where string is 'front_end' to NULL 2022-03-07 17:32:23 +05:30
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