Class: Memcache::Migration
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- Memcache::Migration
- Defined in:
- lib/memcache/migration.rb
Class Attribute Summary collapse
-
.table ⇒ Object
Returns the value of attribute table.
Class Method Summary collapse
Class Attribute Details
.table ⇒ Object
Returns the value of attribute table.
4 5 6 |
# File 'lib/memcache/migration.rb', line 4 def table @table end |
Class Method Details
.down ⇒ Object
21 22 23 |
# File 'lib/memcache/migration.rb', line 21 def self.down drop_table table end |
.up ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# 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. :expires_at t. :updated_at end add_index table, [:prefix, :key], :unique => true add_index table, [:expires_at] end |