Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 15 lines (13 sloc) 0.423 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14
class AddDataToDocuments < ActiveRecord::Migration
  def self.up
    create_table :docdata do |t|
      t.integer :document_id, :null => false
      t.column :data, :hstore
    end
    ActiveRecord::Base.connection.execute "create index index_docdata_on_data on docdata using gin(data);"
  end

  def self.down
    ActiveRecord::Base.connection.execute "drop index index_docdata_on_data;"
    drop_table :docdata
  end
end
Something went wrong with that request. Please try again.