dirty_history 0.6.3 → 0.6.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.3
1
+ 0.6.4
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "dirty_history"
8
- s.version = "0.6.3"
8
+ s.version = "0.6.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Gavin Todes"]
12
- s.date = "2012-08-09"
12
+ s.date = "2012-08-24"
13
13
  s.description = "Dirty History is a simple gem that allows you to keep track of changes to specific fields in your Rails models using the ActiveRecord::Dirty module."
14
14
  s.email = "gavin.todes@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -1,12 +1,14 @@
1
1
  class CreateDirtyHistoryRecords < ActiveRecord::Migration
2
2
  def self.up
3
3
  create_table :dirty_history_records do |t|
4
- t.references :creator, :polymorphic => true # creates creator_type and creator_id field
5
- t.references :object, :polymorphic => true # creates object_type and object_id field
6
- t.string :column_name, :length => 64
7
- t.string :column_type, :length => 16 # :string, :text, :integer, :decimal, :float, :datetime, :boolean
8
- t.text :old_value
9
- t.text :new_value
4
+ t.integer :creator_id
5
+ t.string :creator_type, :limit => 64
6
+ t.integer :object_id
7
+ t.string :object_type, :limit => 64
8
+ t.string :column_name, :limit => 64
9
+ t.string :column_type, :limit => 16 # :string, :text, :integer, :decimal, :float, :datetime, :boolean
10
+ t.string :old_value, :limit => 128
11
+ t.string :new_value, :limit => 128
10
12
 
11
13
  t.datetime :created_at
12
14
  t.datetime :revised_created_at
@@ -15,6 +17,14 @@ class CreateDirtyHistoryRecords < ActiveRecord::Migration
15
17
  end
16
18
  add_index :dirty_history_records, [:creator_id, :creator_type]
17
19
  add_index :dirty_history_records, [:object_id, :object_type]
20
+ add_index :dirty_history_records, [:created_at, :revised_created_at], :name => "index_created_at"
21
+ add_index :dirty_history_records, [:deleted_at, :created_at, :revised_created_at], :name => "index_deleted_at_created_at"
22
+ add_index :dirty_history_records, [:object_type, :column_name, :deleted_at], :name => "index_obj_type_column_deleted_at"
23
+ add_index :dirty_history_records, [:object_type, :column_name, :deleted_at, :created_at, :revised_created_at], :name => "index_obj_type_column_deleted_at_created_at"
24
+
25
+ add_index :dirty_history_records, :old_value, :name => "index_old_value"
26
+ add_index :dirty_history_records, :new_value, :name => "index_new_value"
27
+ add_index :dirty_history_records, [:old_value, :new_value], :name => "index_old_value_new_value"
18
28
  end
19
29
 
20
30
  def self.down
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dirty_history
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.6.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-09 00:00:00.000000000 Z
12
+ date: 2012-08-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: shoulda
@@ -2345,7 +2345,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
2345
2345
  version: '0'
2346
2346
  segments:
2347
2347
  - 0
2348
- hash: 2572923506048010382
2348
+ hash: 3201480380497211516
2349
2349
  required_rubygems_version: !ruby/object:Gem::Requirement
2350
2350
  none: false
2351
2351
  requirements: