OSDN Git Service

Revert "add vector column for textsearch"
authornomeu <nomeu@nomeu.org>
Sun, 13 Jun 2010 21:55:55 +0000 (06:55 +0900)
committernomeu <nomeu@nomeu.org>
Sun, 13 Jun 2010 21:55:55 +0000 (06:55 +0900)
This reverts commit 201bf1af2d044392bde81d53e81c604fff83d733.

db/migrate/20100613202235_add_vector_to_thumb.rb [deleted file]
db/migrate/20100613202356_create_trigger_tsvectorupdate.rb [deleted file]
db/migrate/20100613205243_create_index_vector_using_gin.rb [deleted file]
db/schema.rb

diff --git a/db/migrate/20100613202235_add_vector_to_thumb.rb b/db/migrate/20100613202235_add_vector_to_thumb.rb
deleted file mode 100644 (file)
index a0295e2..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-class AddVectorToThumb < ActiveRecord::Migration
-  def self.up
-    add_column :thumbs, :vector, :tsvector
-  end
-
-  def self.down
-    remove_column :thumbs, :vector
-  end
-end
diff --git a/db/migrate/20100613202356_create_trigger_tsvectorupdate.rb b/db/migrate/20100613202356_create_trigger_tsvectorupdate.rb
deleted file mode 100644 (file)
index e9858f1..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-class CreateTriggerTsvectorupdate < ActiveRecord::Migration
-  def self.up
-    execute <<-SQL
-      CREATE TRIGGER tsvectorupdate BEFORE INSERT OR UPDATE
-          ON thumbs FOR EACH ROW EXECUTE PROCEDURE
-          tsvector_update_trigger(vector, 'pg_catalog.japanese', description)
-    SQL
-  end
-
-  def self.down
-    execute "DROP TRIGGER tsvectorupdate ON thumbs"
-  end
-end
diff --git a/db/migrate/20100613205243_create_index_vector_using_gin.rb b/db/migrate/20100613205243_create_index_vector_using_gin.rb
deleted file mode 100644 (file)
index 18fe9bb..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-class CreateIndexVectorUsingGin < ActiveRecord::Migration
-  def self.up
-    execute "CREATE INDEX index_thumbs_on_vector ON thumbs USING gin(vector)"
-  end
-
-  def self.down
-    execute "DROP INDEX index_thumbs_on_vector"
-  end
-end
index 6514b41..69b38f8 100644 (file)
@@ -9,7 +9,7 @@
 #
 # It's strongly recommended to check this file into your version control system.
 
-ActiveRecord::Schema.define(:version => 20100613205243) do
+ActiveRecord::Schema.define(:version => 20100612234341) do
 
   create_table "arcs", :force => true do |t|
     t.string   "code",        :limit => 10, :null => false
@@ -36,8 +36,15 @@ ActiveRecord::Schema.define(:version => 20100613205243) do
     t.datetime "updated_at"
   end
 
-# Could not dump table "thumbs" because of following StandardError
-#   Unknown type 'tsvector' for column 'vector'
+  create_table "thumbs", :id => false, :force => true do |t|
+    t.string   "video_id",    :limit => 15, :null => false
+    t.string   "title"
+    t.text     "description"
+    t.datetime "created_at"
+    t.datetime "updated_at"
+  end
+
+  add_index "thumbs", ["video_id"], :name => "index_thumbs_on_video_id", :unique => true
 
   create_table "vmds", :force => true do |t|
     t.integer  "arc_id"