activerecord_worm_table 0.5.0 → 0.6.0
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/VERSION +1 -1
- data/lib/activerecord_worm_table.rb +3 -1
- metadata +2 -2
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.6.0
|
|
@@ -75,7 +75,8 @@ module ActiveRecord
|
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
def ensure_version_table(name)
|
|
78
|
-
if !connection.table_exists?(name)
|
|
78
|
+
if !connection.table_exists?(name) &&
|
|
79
|
+
base_table_name!=name # don't execute ddl unless necessary
|
|
79
80
|
dup_table_schema(base_table_name, name)
|
|
80
81
|
end
|
|
81
82
|
end
|
|
@@ -196,6 +197,7 @@ module ActiveRecord
|
|
|
196
197
|
def new_version(&block)
|
|
197
198
|
begin
|
|
198
199
|
self.active_working_table_name = working_table_name
|
|
200
|
+
ensure_version_table(working_table_name)
|
|
199
201
|
r = block.call
|
|
200
202
|
advance_version
|
|
201
203
|
r
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activerecord_worm_table
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- mccraig mccraig of the clan mccraig
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-
|
|
12
|
+
date: 2009-12-15 00:00:00 +01:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|