2020-08-07 01:14:14 +02:00
|
|
|
class AddMissingIndexes < ActiveRecord::Migration[4.2]
|
2009-09-07 15:35:19 +02:00
|
|
|
def self.up
|
2023-05-12 13:01:12 +02:00
|
|
|
add_index 'article_prices', ['article_id']
|
2021-03-01 15:27:26 +01:00
|
|
|
|
2023-05-12 13:01:12 +02:00
|
|
|
add_index 'articles', ['supplier_id']
|
|
|
|
add_index 'articles', ['article_category_id']
|
|
|
|
add_index 'articles', ['type']
|
2021-03-01 15:27:26 +01:00
|
|
|
|
2023-05-12 13:01:12 +02:00
|
|
|
add_index 'deliveries', ['supplier_id']
|
2009-09-07 15:35:19 +02:00
|
|
|
|
2023-05-12 13:01:12 +02:00
|
|
|
add_index 'financial_transactions', ['ordergroup_id']
|
2009-09-07 15:35:19 +02:00
|
|
|
|
2023-05-12 13:01:12 +02:00
|
|
|
add_index 'group_order_article_quantities', ['group_order_article_id']
|
|
|
|
add_index 'group_orders', ['order_id']
|
|
|
|
add_index 'group_orders', ['ordergroup_id']
|
2009-09-07 15:35:19 +02:00
|
|
|
|
2023-05-12 13:01:12 +02:00
|
|
|
add_index 'invoices', ['supplier_id']
|
|
|
|
add_index 'invoices', ['delivery_id']
|
2009-09-07 15:35:19 +02:00
|
|
|
|
2023-05-12 13:01:12 +02:00
|
|
|
add_index 'order_articles', ['order_id']
|
2021-03-01 15:27:26 +01:00
|
|
|
|
2023-05-12 13:01:12 +02:00
|
|
|
add_index 'order_comments', ['order_id']
|
2021-03-01 15:27:26 +01:00
|
|
|
|
2023-05-12 13:01:12 +02:00
|
|
|
add_index 'orders', ['state']
|
2009-09-07 15:35:19 +02:00
|
|
|
|
2023-05-12 13:01:12 +02:00
|
|
|
add_index 'stock_changes', ['delivery_id']
|
|
|
|
add_index 'stock_changes', ['stock_article_id']
|
|
|
|
add_index 'stock_changes', ['stock_taking_id']
|
2009-09-07 15:35:19 +02:00
|
|
|
|
2023-05-12 13:01:12 +02:00
|
|
|
add_index 'tasks', ['workgroup_id']
|
2009-09-07 15:35:19 +02:00
|
|
|
end
|
|
|
|
|
2023-05-12 13:01:12 +02:00
|
|
|
def self.down; end
|
2009-09-07 15:35:19 +02:00
|
|
|
end
|