Sha256: 79bfab2ed481ab40e4420e6a2ab7e9d373931c0bc3c101eee77f71bd22553cca
Contents?: true
Size: 724 Bytes
Versions: 4
Compression:
Stored size: 724 Bytes
Contents
class <%= migration_name %> < ActiveRecord::Migration::Current def change create_table :snapshots<%= table_options %> do |t| t.belongs_to :item, polymorphic: true, null: false, index: true t.string :identifier, null: false, unique: true, index: true t.belongs_to :user, polymorphic: true t.text :metadata t.datetime :created_at, null: false end create_table :snapshot_items<%= table_options %> do |t| t.belongs_to :snapshot, null: false, index: true t.belongs_to :item, polymorphic: true, null: false, unique: [:snapshot_id], index: true t.text :object, null: false t.datetime :created_at, null: false t.string :child_group_name end end end
Version data entries
4 entries across 4 versions & 1 rubygems