Permalink
Browse files

Add some missing indices

  • Loading branch information...
jweiss committed May 12, 2011
1 parent eaa71f6 commit 87187542bd725ab32d1d063753bf1bab9d27ecea
Showing with 28 additions and 1 deletion.
  1. +2 −0 CHANGELOG.txt
  2. +17 −0 db/migrate/20110512144542_add_indices.rb
  3. +9 −1 db/schema.rb
View
@@ -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
@@ -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
View
@@ -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"
@@ -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"
@@ -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
@@ -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"

0 comments on commit 8718754

Please sign in to comment.