-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add hidden seeds from migrations #1962
Add hidden seeds from migrations #1962
Conversation
When would these files be run? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work and great report in your comment
A couple of things, you wrote:
# THIS DIFFERS
Spree::Store.create!([
{name: "Sample Store", url: "example.com", meta_description: nil, meta_keywords: nil, seo_title: nil, mail_from_address: "store@example.com", default_currency: nil, code: "spree", default: true, cart_tax_country_iso: nil}
])
# IN THIS WAY
Spree::Store.create!([
{name: "Spree Demo Site", url: "demo.spreecommerce.com", meta_description: nil, meta_keywords: nil, seo_title: nil, mail_from_address: "spree@example.com", default_currency: nil, code: "spree", default: true, cart_tax_country_iso: "US"}
])
why not changing this seed as well?
I'm just not sure how to set cart_tax_country_iso
field. Migrations bootstraps data with that field nil
and seeds with that fields to US
, I'd keep both to nil
for consistency but maybe it's better to wait for @mamhoff feedback on this.
Also, be sure to change url: "demo.spreecommerce.com"
and other references to spree 😄
@@ -0,0 +1 @@ | |||
Spree::RefundReason.find_or_create_by(name: "Return processing") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be added here instead
The |
bdf9503
to
41ad1d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
As requested in issue #1502 I'm adding seeds for data previously created only in migrations.
I've added only what I thought would be necessary, see the comment for the complete list