Skip to content

Commit

Permalink
Add some missing indices
Browse files Browse the repository at this point in the history
  • Loading branch information
jweiss committed May 12, 2011
1 parent eaa71f6 commit 8718754
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

edge

* Add some missing indices

* Allow to prefill the deployment descirption, see https://github.com/peritor/webistrano/issues/12 [tomfotherby]

* Update to Rails 2.3.5
Expand Down
17 changes: 17 additions & 0 deletions db/migrate/20110512144542_add_indices.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class AddIndices < ActiveRecord::Migration
def self.up
add_index :deployments, :stage_id
add_index :deployments, :user_id
add_index :stages, :project_id
add_index :roles, :stage_id
add_index :roles, :host_id
end

def self.down
remove_index :deployments, :stage_id
remove_index :deployments, :user_id
remove_index :stages, :project_id
remove_index :roles, :stage_id
remove_index :roles, :host_id
end
end
10 changes: 9 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 20090319185505) do
ActiveRecord::Schema.define(:version => 20110512144542) do

create_table "configuration_parameters", :force => true do |t|
t.string "name"
Expand Down Expand Up @@ -37,6 +37,9 @@
t.string "status", :default => "running"
end

add_index "deployments", ["stage_id"], :name => "index_deployments_on_stage_id"
add_index "deployments", ["user_id"], :name => "index_deployments_on_user_id"

create_table "deployments_roles", :id => false, :force => true do |t|
t.integer "deployment_id"
t.integer "role_id"
Expand Down Expand Up @@ -95,6 +98,9 @@
t.integer "no_symlink", :default => 0
end

add_index "roles", ["host_id"], :name => "index_roles_on_host_id"
add_index "roles", ["stage_id"], :name => "index_roles_on_stage_id"

create_table "stage_configurations", :force => true do |t|
end

Expand All @@ -108,6 +114,8 @@
t.integer "locked", :default => 0
end

add_index "stages", ["project_id"], :name => "index_stages_on_project_id"

create_table "users", :force => true do |t|
t.string "login"
t.string "email"
Expand Down

0 comments on commit 8718754

Please sign in to comment.