mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
fix #1274 by adding indeces for dependency and project tables
This commit is contained in:
parent
033afda0e1
commit
98bb405f69
1 changed files with 15 additions and 0 deletions
15
db/migrate/20120409105058_add_indices_to_dependency_table.rb
Normal file
15
db/migrate/20120409105058_add_indices_to_dependency_table.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
class AddIndicesToDependencyTable < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :dependencies, :successor_id
|
||||
add_index :dependencies, :predecessor_id
|
||||
add_index :projects, :state
|
||||
add_index :projects, [:user_id, :state]
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :dependencies, :successor_id
|
||||
remove_index :dependencies, :predecessor_id
|
||||
remove_index :projects, :state
|
||||
remove_index :projects, [:user_id, :state]
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue