Class: CacheVersionMigration

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

Class Method Summary collapse

Class Method Details

.downObject



78
79
80
# File 'lib/cache_version.rb', line 78

def self.down
  drop_table :cache_versions
end

.upObject



69
70
71
72
73
74
75
76
# File 'lib/cache_version.rb', line 69

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