OSDN Git Service

add indices of seiga
authornomeu <nomeu@users.sourceforge.jp>
Sun, 3 Feb 2013 03:35:29 +0000 (12:35 +0900)
committernomeu <nomeu@users.sourceforge.jp>
Sun, 3 Feb 2013 03:35:29 +0000 (12:35 +0900)
db/groonga/migrate/20130203033331_add_indices_of_seiga.rb [new file with mode: 0644]
db/groonga/schema.rb

diff --git a/db/groonga/migrate/20130203033331_add_indices_of_seiga.rb b/db/groonga/migrate/20130203033331_add_indices_of_seiga.rb
new file mode 100644 (file)
index 0000000..64dce02
--- /dev/null
@@ -0,0 +1,15 @@
+class AddIndicesOfSeiga < ActiveGroonga::Migration
+  def up
+    change_table("terms") do |table|
+      table.index("seigas.title")
+      table.index("seigas.description")
+    end
+  end
+
+  def down
+    change_table("terms") do |table|
+      table.remove_index("seigas.description")
+      table.remove_index("seigas.title")
+    end
+  end
+end
index d74ba31..be09987 100644 (file)
@@ -1,4 +1,4 @@
-ActiveGroonga::Schema.define(:version => 20130203025712) do |schema|
+ActiveGroonga::Schema.define(:version => 20130203033331) do |schema|
   schema.instance_eval do
     create_table("arcs",
                  :type => :hash,
@@ -103,6 +103,8 @@ ActiveGroonga::Schema.define(:version => 20130203025712) do |schema|
       table.index("arcs", "origname", :name => "arcs_origname")
       table.index("arcs", "summary", :name => "arcs_summary")
       table.index("pmds", "path", :name => "pmds_path")
+      table.index("seigas", "description", :name => "seigas_description")
+      table.index("seigas", "title", :name => "seigas_title")
       table.index("thumbs", "description", :name => "thumbs_description")
       table.index("thumbs", "title", :name => "thumbs_title")
       table.index("vmds", "path", :name => "vmds_path")