decisiv-acts_as_versioned 0.6.1 → 0.6.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +10 -1
- data/lib/acts_as_versioned.rb +1 -9
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,7 +1,16 @@
|
|
1
1
|
|
2
2
|
[master]
|
3
3
|
|
4
|
-
*
|
4
|
+
*
|
5
|
+
|
6
|
+
|
7
|
+
[0.6.2]
|
8
|
+
|
9
|
+
* (08 Feb 2009) Avoid error with model preload by removing create_versioned_table call in AAV call. [Ngoc Dao]
|
10
|
+
* (08 Feb 2009) Do not force updated_at [Ngoc Dao]
|
11
|
+
* (08 Feb 2009) Change the create_versioned_table class method to ask the connection if table_exists?. Fixes
|
12
|
+
a bug that allows adapters that allow user owned prefixes for table names. [Ken Collins]
|
13
|
+
|
5
14
|
|
6
15
|
[0.6.1]
|
7
16
|
|
data/lib/acts_as_versioned.rb
CHANGED
@@ -257,8 +257,6 @@ module ActiveRecord #:nodoc:
|
|
257
257
|
:foreign_key => versioned_foreign_key
|
258
258
|
versioned_class.send :include, options[:extend] if options[:extend].is_a?(Module)
|
259
259
|
versioned_class.set_sequence_name version_sequence_name if version_sequence_name
|
260
|
-
|
261
|
-
create_versioned_table
|
262
260
|
end
|
263
261
|
end
|
264
262
|
|
@@ -411,16 +409,14 @@ module ActiveRecord #:nodoc:
|
|
411
409
|
self.reset_column_information
|
412
410
|
end
|
413
411
|
|
414
|
-
return if connection.
|
412
|
+
return if connection.table_exists?(versioned_table_name)
|
415
413
|
|
416
414
|
self.connection.create_table(versioned_table_name, create_table_options) do |t|
|
417
415
|
t.column versioned_foreign_key, :integer
|
418
416
|
t.column version_column, :integer
|
419
417
|
end
|
420
418
|
|
421
|
-
updated_col = nil
|
422
419
|
self.versioned_columns.each do |col|
|
423
|
-
updated_col = col if !updated_col && %(updated_at updated_on).include?(col.name)
|
424
420
|
self.connection.add_column versioned_table_name, col.name, col.type,
|
425
421
|
:limit => col.limit,
|
426
422
|
:default => col.default,
|
@@ -435,10 +431,6 @@ module ActiveRecord #:nodoc:
|
|
435
431
|
:scale => type_col.scale,
|
436
432
|
:precision => type_col.precision
|
437
433
|
end
|
438
|
-
|
439
|
-
if updated_col.nil?
|
440
|
-
self.connection.add_column versioned_table_name, :updated_at, :timestamp
|
441
|
-
end
|
442
434
|
|
443
435
|
self.connection.add_index versioned_table_name, versioned_foreign_key
|
444
436
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: decisiv-acts_as_versioned
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.1
|
4
|
+
version: 0.6.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rick Olson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-02-08 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|