Sha256: fe4cbf2e59e4505cccfebb3eeaa5738f2f8e29a5b202940c87385171dbfb8458
Contents?: true
Size: 517 Bytes
Versions: 30
Compression:
Stored size: 517 Bytes
Contents
require 'fileutils' class AddCacheTable < ActiveRecord::Migration def self.up FileUtils.rm_rf("public/articles") FileUtils.rm_rf("public/xml") FileUtils.rm_rf("public/index.html") create_table :page_caches do |t| t.column :name, :string end add_index :page_caches, :name end def self.down # TODO: how can this script sweep the page cache? # Like PageCache.sweep('/') but without calling a model? remove_index :page_caches, :name drop_table :page_caches end end
Version data entries
30 entries across 30 versions & 1 rubygems