spree_promotion_rules | A collection of spree promotion rules | Awesome List library
kandi X-RAY | spree_promotion_rules Summary
kandi X-RAY | spree_promotion_rules Summary
Spree Promotion Rules is a collection of spree promotion rules. Currently the only rule included is support for Roles. This allows you to only apply promotions to designated roles.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of spree_promotion_rules
spree_promotion_rules Key Features
spree_promotion_rules Examples and Code Snippets
Community Discussions
Trending Discussions on spree_promotion_rules
QUESTION
I've updated Rails, Spree (e-commerce framework) and added some new gems. These all needed to be migrated after update and installation. On the development app, I ran into a problem. Whenever I tried to migrate I would get the error
Problem
ActiveRecord::StatementInvalid: PG::DuplicateTable: ERROR: relation "index_products_promotion_rules_on_product_id" already exists : CREATE INDEX "index_products_promotion_rules_on_product_id" ON "spree_products_promotion_rules" ("product_id")
I solved this by dropping my database (DB) and making a new one. Since it's development mode It's not a problem losing some data kept on the DB.
Now I'm using postgreSQL as my DB and Capistrano to deploy my app.
When I try to deploy my website to the live server the error/problem returns, but on the live server I've actually got customer data stored and orders coming in. So I can't drop the DB.
I've tried to remove the line from the migration file
and schema.rb
, but it hasn't helped.
Questions:
Now I was wondering can I override the current tables on the live server?
Is it save to remove the lines from the migration file
and schema.rb
?
Or is there another way to solve this?
...schema.rb
ANSWER
Answered 2018-Jun-18 at 09:25Ultimately I downloaded the database, so I could try to migrate locally. I changed the files removing the already existing lines and executing the rails db:migrate until I no longer got the error message.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install spree_promotion_rules
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page