class Memcache::Migration
Attributes
table[RW]
Public Class Methods
down()
click to toggle source
# File lib/memcache/migration.rb, line 21 def self.down drop_table table end
up()
click to toggle source
# File lib/memcache/migration.rb, line 7 def self.up create_table table, :id => false do |t| t.string :prefix, :null => false t.string :key, :null => false t.text :value, :null => false t.integer :flags t.timestamp :expires_at t.timestamp :updated_at end add_index table, [:prefix, :key], :unique => true add_index table, [:expires_at] end