Class: CacheVersionMigration

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

Class Method Summary collapse

Class Method Details

.downObject



108
109
110
# File 'lib/cache_version.rb', line 108

def self.down
  drop_table :cache_versions
end

.upObject



99
100
101
102
103
104
105
106
# File 'lib/cache_version.rb', line 99

def self.up
  create_table :cache_versions, :id => false do |t|
    t.column :key, :string
    t.column :version, :integer, :default => 0
  end

  add_index :cache_versions, :key, :unique => true
end