Class: DepositMigration

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/deposit_migration/templates/migration.rb

Instance Method Summary collapse

Instance Method Details

#changeObject


2
3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/generators/deposit_migration/templates/migration.rb', line 2

def change
  create_table :deposit_slots do |t|
    t.integer :item_id
    t.string :item_type

    t.string :key
    t.text :data

    t.timestamps
  end

  add_index :deposit_slots, [:item_id, :item_type, :key]
end