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

Missing indexes on associations #7905

Merged
merged 16 commits into from Apr 11, 2017

Conversation

Projects
None yet
4 participants
@mauazua
Contributor

mauazua commented Apr 3, 2017

This PR introduces missing indexes for associations in Spree.

@@ -0,0 +1,5 @@
class AddIndexToSpreeStockMovement < ActiveRecord::Migration[5.0]
def change
add_index :spree_stock_movements, [:originator_id, :originator_type], name: 'index_stock_movements_on_originator_id_and_originator_type'

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Line is too long. [140/120]

@houndci-bot

houndci-bot Apr 3, 2017

Line is too long. [140/120]

@@ -0,0 +1,5 @@
class AddIndexToSpreeStockMovement < ActiveRecord::Migration[5.0]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@@ -0,0 +1,5 @@
class AddIndexToSpreeStockItems < ActiveRecord::Migration[5.0]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@@ -0,0 +1,6 @@
class AddIndexToSpreeShippingRates < ActiveRecord::Migration[5.0]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@@ -0,0 +1,20 @@
class AddIndexToShippingMethodZones < ActiveRecord::Migration[5.0]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

class AddIndexesToReimbursementCredits < ActiveRecord::Migration[5.0]
def change
add_index :spree_reimbursement_credits, :reimbursement_id
add_index :spree_reimbursement_credits, [:creditable_id, :creditable_type], name: 'index_reimbursement_credits_on_creditable_id_and_type'

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Line is too long. [141/120]

@houndci-bot

houndci-bot Apr 3, 2017

Line is too long. [141/120]

@@ -0,0 +1,6 @@
class AddIndexesToReimbursementCredits < ActiveRecord::Migration[5.0]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@@ -0,0 +1,6 @@
class AddIndexesToRefunds < ActiveRecord::Migration[5.0]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@@ -0,0 +1,5 @@
class AddIndexForPrototypeIdToPrototypeTaxons < ActiveRecord::Migration[5.0]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

if index_exists? :spree_property_prototypes, [:prototype_id, :property_id]
remove_index :spree_property_prototypes, [:prototype_id, :property_id]
add_index :spree_property_prototypes, [:prototype_id, :property_id], unique: true, name: 'index_property_prototypes_on_prototype_id_and_property_id'

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Line is too long. [154/120]

@houndci-bot

houndci-bot Apr 3, 2017

Line is too long. [154/120]

@@ -0,0 +1,5 @@
class AddIndexToSpreeStockMovement < ActiveRecord::Migration[5.0]
def change
add_index :spree_stock_movements, [:originator_id, :originator_type], name: 'index_stock_movements_on_originator_id_and_originator_type'

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Line is too long. [140/120]

@houndci-bot

houndci-bot Apr 3, 2017

Line is too long. [140/120]

@@ -0,0 +1,5 @@
class AddIndexToSpreeStockMovement < ActiveRecord::Migration[5.0]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@@ -0,0 +1,5 @@
class AddIndexToSpreeStockItems < ActiveRecord::Migration[5.0]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@@ -0,0 +1,6 @@
class AddIndexToSpreeShippingRates < ActiveRecord::Migration[5.0]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@@ -0,0 +1,20 @@
class AddIndexToShippingMethodZones < ActiveRecord::Migration[5.0]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

class AddIndexesToReimbursementCredits < ActiveRecord::Migration[5.0]
def change
add_index :spree_reimbursement_credits, :reimbursement_id
add_index :spree_reimbursement_credits, [:creditable_id, :creditable_type], name: 'index_reimbursement_credits_on_creditable_id_and_type'

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Line is too long. [141/120]

@houndci-bot

houndci-bot Apr 3, 2017

Line is too long. [141/120]

@@ -0,0 +1,6 @@
class AddIndexesToReimbursementCredits < ActiveRecord::Migration[5.0]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@@ -0,0 +1,6 @@
class AddIndexesToRefunds < ActiveRecord::Migration[5.0]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@@ -0,0 +1,5 @@
class AddIndexForPrototypeIdToPrototypeTaxons < ActiveRecord::Migration[5.0]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

@houndci-bot

houndci-bot Apr 3, 2017

Missing frozen string literal comment.

if index_exists? :spree_property_prototypes, [:prototype_id, :property_id]
remove_index :spree_property_prototypes, [:prototype_id, :property_id]
add_index :spree_property_prototypes, [:prototype_id, :property_id], unique: true, name: 'index_property_prototypes_on_prototype_id_and_property_id'

This comment has been minimized.

@houndci-bot

houndci-bot Apr 3, 2017

Line is too long. [154/120]

@houndci-bot

houndci-bot Apr 3, 2017

Line is too long. [154/120]

@symarys symarys self-requested a review Apr 6, 2017

@symarys

symarys approved these changes Apr 6, 2017

@damianlegawiec damianlegawiec merged commit 018c12c into spree:master Apr 11, 2017

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
hound 24 violations found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment