Class: EntityStorage::AddEntitiesTable

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/entity_storage.rb

Overview

This migration is required for EntityStorage to work correctly

Class Method Summary collapse

Class Method Details

.downObject



75
76
77
# File 'lib/entity_storage.rb', line 75

def self.down
  drop_table :entities
end

.upObject



62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/entity_storage.rb', line 62

def self.up
  create_table "entity_storage", :force => true do |t|
	t.string   "key",        :limit => 512, :null => false
	t.text     "value"
	t.datetime "created_at"
	t.datetime "updated_at"
  end

  add_index "entity_storage", ["created_at"], :name => "created_at"
  add_index "entity_storage", ["key"], :name => "key"
  add_index "entity_storage", ["updated_at"], :name => "updated_at"
end