Sha256: a691c29f08095a5a0121b5e22983323007a01f9fcec609c3547bcd5286f11732

Contents?: true

Size: 501 Bytes

Versions: 2

Compression:

Stored size: 501 Bytes

Contents

module DbMemoize
  class Migrations
    class << self
      def create_tables(migration)
        migration.create_table :memoized_values, id: false do |t|
          t.string :entity_table_name
          t.integer :entity_id
          t.string :method_name
          t.string :arguments_hash
          t.string :custom_key
          t.binary :value
          t.datetime :created_at
        end

        migration.add_index :memoized_values, [:entity_table_name, :entity_id]
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
db_memoize-0.1.3 lib/db_memoize/migrations.rb
db_memoize-0.1.2 lib/db_memoize/migrations.rb