Sha256: 1e7a002fbdefc602a5af8001b633cf6f2e5bf3925bc7d9ee779b6aeca11f67d3
Contents?: true
Size: 542 Bytes
Versions: 3
Compression:
Stored size: 542 Bytes
Contents
class CreateVersions < ActiveRecord::Migration def change create_table :versions, force: true do |t| t.string :item_type, null: false <% if use_string_ids? && (!connected? || (migrated? && !has_integer_column?)) %>t.string :item_id, null: false # item_type.id generally should be GUID<% else %>t.integer :item_id, null: false, limit: 8<% end %> t.string :event, null: false t.string :whodunnit t.text :object t.datetime :created_at end add_index :versions, [:item_type, :item_id] end end
Version data entries
3 entries across 3 versions & 1 rubygems