Sha256: b3494377d7ff1aac8de624e8af94e68def3d542db709115680a3fce415bdd66b

Contents?: true

Size: 479 Bytes

Versions: 8

Compression:

Stored size: 479 Bytes

Contents

class CreateVersions < ActiveRecord::Migration[4.2]
  def self.up
    create_table :versions do |t|
      t.string   :item_type, :null => false
      t.integer  :item_id,   :null => false
      t.string   :event,     :null => false
      t.string   :whodunnit
      t.text     :object
      t.datetime :created_at
    end
    add_index :versions, [:item_type, :item_id]
  end

  def self.down
    remove_index :versions, [:item_type, :item_id]
    drop_table :versions
  end
end

Version data entries

8 entries across 8 versions & 4 rubygems

Version Path
enju_purchase_request-0.3.2 spec/dummy/db/migrate/20091202124834_create_versions.rb
enju_loc-0.3.1 spec/dummy/db/migrate/20091202124834_create_versions.rb
enju_purchase_request-0.3.1 spec/dummy/db/migrate/20091202124834_create_versions.rb
enju_loc-0.3.0 spec/dummy/db/migrate/20091202124834_create_versions.rb
enju_search_log-0.3.0.beta.1 spec/dummy/db/migrate/20091202124834_create_versions.rb
enju_purchase_request-0.3.0.beta.1 spec/dummy/db/migrate/20091202124834_create_versions.rb
enju_loc-0.3.0.beta.1 spec/dummy/db/migrate/20091202124834_create_versions.rb
enju_manifestation_viewer-0.3.0.beta.1 spec/dummy/db/migrate/20091202124834_create_versions.rb