incubator-olio-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r1148179 - /incubator/olio/webapp/rails/trunk/db/migrate/201105200500908_more_indexes.rb
Date Tue, 19 Jul 2011 05:35:00 GMT
Author: shanti
Date: Tue Jul 19 05:34:59 2011
New Revision: 1148179

URL: http://svn.apache.org/viewvc?rev=1148179&view=rev
Log:
Fix for OLIO-153. Adding indexes for improving AddEvent performance

Added:
    incubator/olio/webapp/rails/trunk/db/migrate/201105200500908_more_indexes.rb

Added: incubator/olio/webapp/rails/trunk/db/migrate/201105200500908_more_indexes.rb
URL: http://svn.apache.org/viewvc/incubator/olio/webapp/rails/trunk/db/migrate/201105200500908_more_indexes.rb?rev=1148179&view=auto
==============================================================================
--- incubator/olio/webapp/rails/trunk/db/migrate/201105200500908_more_indexes.rb (added)
+++ incubator/olio/webapp/rails/trunk/db/migrate/201105200500908_more_indexes.rb Tue Jul 19
05:34:59 2011
@@ -0,0 +1,30 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# 
+class MoreIndexes < ActiveRecord::Migration
+  def self.up
+    add_index :taggings, :tag_id
+    add_index :taggings, :taggable_id
+    add_index :taggings, :taggable_type
+  end
+
+  def self.down
+    remove_index :taggings, :tag_id
+    remove_index :taggings, :taggable_id
+    remove_index :taggings, :taggable_type
+  end
+end



Mime
View raw message