Matt-Yorkley
9dd02044a5
Fix "can't modify frozen string" error in validation callbacks
2019-08-14 10:24:30 +01:00
Matt-Yorkley
d8a7190f43
Adjust user creation syntax
...
#skip_confirmation! can't be chained...
2019-08-14 09:22:11 +01:00
Matt-Yorkley
8c95399292
Don't prompt if admin user already exists
2019-08-13 21:02:12 +01:00
Matt-Yorkley
14c1abb861
Skip confirmation email on initial admin user creation
2019-08-13 21:00:30 +01:00
Maikel Linke
cbaedcec92
Fix seeding of default user without asking
2019-08-13 09:47:54 +10:00
Maikel Linke
e4ba515109
Seed admin user without asking by default
2019-08-09 14:16:01 +10:00
Maikel Linke
af1f6f6c6d
Skip confirmation when creating first admin user
2019-08-09 14:16:01 +10:00
Maikel Linke
b0e8ee42c1
Restore spree_auth_devise user seeding
2019-08-09 13:48:50 +10:00
luisramos0
6d7c41c04b
Bring db/default/users from spree_auth_devise, this is necessary to create the first user in the DB
2019-07-20 20:48:49 +01:00
Matt-Yorkley
24f8e6d2ec
Fix failing migration by clearing schema cache
2019-07-03 12:59:10 +01:00
luisramos0
ffbd79d3dd
Change all model scopes without a callable object to use a proc
2019-05-28 15:55:13 +01:00
luisramos0
189865fd80
Make stock locations backorderable_default false.
...
This is required because when the default stock location is created, the backorderable_default column doesnt exist and when this column is created, the initial default is true. This is why we need to force it to false here. This column is the default value for on_demand which must be false.
2019-05-10 22:00:24 +01:00
Michael Hughes
9e56198092
references to payment_enterprise_id removed, new migration created
2019-05-04 16:32:48 +01:00
luisramos0
42d1d3eff6
Migrate spree_variants.on_demand to spree_stock_items.backorderable
2019-05-02 10:59:27 +01:00
Luis Ramos
449e58723d
Merge pull request #3591 from luisramos0/2-0-fix-migrations
...
[Spree Upgrade] Fix Migrations to 2.0
2019-04-09 13:16:34 +01:00
luisramos0
112a57d330
Remove association between adjustments and shipments that are going to be deleted in AddUniquenessOfOrderIdToSpreeShipments
2019-04-02 12:31:39 +01:00
Kristina Lim
3035d14369
Use bang version of create! in DB migration script
2019-04-02 15:21:58 +08:00
luisramos0
3742c70910
Add backup process to AddUniquenessOfOrderIdToSpreeShipments so that the deleted duplicated shipments can be recovered if something goes wrong
2019-03-28 18:49:38 +00:00
Maikel
74aea76c4c
Merge pull request #3609 from luisramos0/2-0-delete-acct-invoices-last-bit
...
[Spree Upgrade] Finish up deleting account invoices
2019-03-28 13:42:01 +11:00
luisramos0
c1d14686a6
Merge branch 'master' into 2-0-stable-Mar22
2019-03-22 10:55:17 +00:00
Luis Ramos
8d2d5a8708
Merge pull request #3579 from luisramos0/sanitize_data
...
Add sanitize and truncate data tasks
2019-03-22 10:29:57 +00:00
luisramos0
804375d1aa
Delete obsolete pending delayed jobs related to the deleted account invoices feature
2019-03-20 11:24:57 +00:00
luisramos0
78d7222364
Drop account invoices and billable periods tables, the feature has been deleted
2019-03-20 11:19:48 +00:00
luisramos0
8965dedfd7
Add sanitize and truncate tasks to support loading live data into other environments safely
2019-03-13 16:08:07 +00:00
luisramos0
0bfeabbb3e
Add migration to create default shipping category and set it in shipping methods and products that do not have a shipping category yet
...
This is a modified version of this spree migration: af16cf1d74
2019-03-13 15:36:21 +00:00
luisramos0
f914a6d869
Add migration to set default stock location on all shipments without stock location
...
This is a modified version of this spree migration: https://github.com/spree/spree/commit/219e09b
2019-03-13 14:38:56 +00:00
luisramos0
86f9b3d663
Delete product_distributions: drop table and remove models, controllers and BO edit page
2019-03-13 11:47:50 +00:00
luisramos0
bd9eba9ef8
Fix add_uniqueness_of_order_id_to_spree_shipments by first removing shipments from orders with more than one shipment
2019-03-12 18:00:06 +00:00
luisramos0
0c8c4be2ee
Fix migrate tax categories to line items migration
...
This is bringing 67186f8ca7 from spree v2.2
2019-03-12 17:59:55 +00:00
Luis Ramos
72e9c1d002
Merge pull request #3321 from luisramos0/2-0-delete-acct-invoices
...
[Spree Upgrade] Delete Accounts and Billing dead feature code until we decide we want to start using it again
2019-03-04 15:54:09 +00:00
luisramos0
4411e1ed43
Fix create default stock migration by adding a version of the code that works with the DB at that point in time, i.e., stock_locations without active column
2019-02-26 16:05:33 +00:00
luisramos0
7b05eebc5b
Fix rubocop issue in db migration
2019-02-26 14:54:24 +00:00
luisramos0
0501db1782
Remove changes related to enterprise trials as they dont make sense without business models and account invoices
2019-02-25 14:37:16 +00:00
luisramos0
a870299ced
Delete preferences and adjustments related to account invoices
2019-02-25 14:37:16 +00:00
luisramos0
3595abc08a
Fix seeds script for cases where default stock location already exists in the DB
2019-01-30 15:08:37 +00:00
Pau Perez
817bf4caa1
Explain why a index forbids more than a location
2019-01-11 16:39:06 +01:00
Pau Perez
730d5ff7d6
Include the default location in seed data
...
This ensures that new OFN instances will have the proper stock location
set up.
2019-01-11 15:52:25 +01:00
luisramos0
e28f9a7c84
Merge branch 'master' into 2-0-stable-jan-8th
2019-01-08 14:29:50 +00:00
albarnaz
5d515712ed
Fix for instagram links ( #2849 )
...
* Add new attribute instagram_placeholder to local yml
* Add placeholder to instagram link input
* Add migration to fix wrong instagram links
* Add new attribute facebook_placeholder to local yml
* Add placeholder to facebook link input
* Add new attribute linkedin_placeholder to local yml
* Add placeholder to linkedin link input
* Change each for find_each in migration
* Add new attribute instagram_placeholder to local yml
* Add migration to fix wrong instagram links
* Add new attribute linkedin_placeholder to local yml
* Add placeholder to linkedin link input
2018-12-21 14:42:28 +11:00
Kristina Lim
77a6562762
Make DB migration generate summary by distributor
2018-12-14 13:02:43 +08:00
Kristina Lim
a6664d0ac6
Move report generated by migration to subdirectory
...
This is in preparation of an upcoming change to split the main CSV file
by distributor.
2018-12-14 13:00:42 +08:00
Kristina Lim
6458127892
Add undo logic for DB migration script
2018-12-14 10:09:09 +08:00
Kristina Lim
5a98acd101
Log changes from DB migration to CSV file
2018-12-14 10:09:09 +08:00
Kristina Lim
842a11b564
Refactor DB migration script
2018-12-14 10:09:08 +08:00
Kristina Lim
aa92dd8771
Declare VariantOverride in migration for safe use
2018-12-13 23:29:05 +08:00
Kristina Lim
9e3332ba2a
Rename DB migration file
2018-12-13 23:25:48 +08:00
Kristina Lim
4c0c0bbfd0
Simplify stock configuration in existing variant overrides
2018-12-07 14:40:15 +08:00
luisramos0
3776b891ce
Merge branch 'master' into 2-0-stable-dec-3rd
2018-12-03 15:30:16 +00:00
Maikel Linke
285346fcda
Update schema for latest migration
...
I feel embarrased that this is the second follow up of my last
migration: https://github.com/openfoodfoundation/openfoodnetwork/pull/3126
The last migration didn't change any database structure, but the schema
still needs the latest migration version. Otherwise it will display
pending migrations when setting up the database.
This commit allows to run `bundle exec rake db:reset` in development
without the following message:
Run `rake db:migrate` to update your database then try again.
You have 1 pending migrations:
20181123012635 AssociateCustomersToUsers
The next pull request with a migration would have solved this problem as
well.
2018-11-29 10:29:56 +11:00
Maikel Linke
9efa45663c
Encode records with special chars as well
...
Using Marshal.dump on the French production database raised an error:
Encoding::UndefinedConversionError: "\xC3" from ASCII-8BIT to UTF-8
Replacing Marshal with YAML solves the problem. It is also more reliable
and human readable.
This code was run against the French, Australian and UK production
data successfully.
2018-11-27 14:34:03 +11:00