+++ /dev/null
-class AddVectorToThumb < ActiveRecord::Migration
- def self.up
- add_column :thumbs, :vector, :tsvector
- end
-
- def self.down
- remove_column :thumbs, :vector
- end
-end
+++ /dev/null
-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
+++ /dev/null
-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
#
# 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
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"