Sha256: 3a120c7d68d200a215ebefc6ff1042183bccaea9a079a82c72018c031d99157a

Contents?: true

Size: 570 Bytes

Versions: 5

Compression:

Stored size: 570 Bytes

Contents

class Memcache
  class Migration < ActiveRecord::Migration
    class << self
      attr_accessor :table
    end

    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

    def self.down
      drop_table table
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
memcache-1.5.1 lib/memcache/migration.rb
memcache-1.5.0 lib/memcache/migration.rb
memcache-1.4.2 lib/memcache/migration.rb
memcache-1.4.1 lib/memcache/migration.rb
memcache-1.4.0 lib/memcache/migration.rb