temporal_tables 0.6.1 → 0.6.2
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a4f6546810d969fb905818b357aff6f3130a85e80cc1bc3037f5fb885660856e
|
|
4
|
+
data.tar.gz: e3e2167bdb2104ef7f2a56f9381e16b7648dc800b25785094a5ca3825277d980
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fa67585d54cbfa598729a139b36b788f0f0cf7ca5e7bccdd6ac82a660f000467b56f8ac97c07fa967028a4f501397fa0901af9de309eb03f184afd029c0dbed7
|
|
7
|
+
data.tar.gz: 719e681acf4ae6f07a3de41fc7c7cbb3b7296e18d821a88bef7b82f62b618e0e4e64059672e20a2b60a60c834db69f45afec9df239b97d4068c7ded887a685bc
|
data/lib/temporal_tables.rb
CHANGED
|
@@ -22,7 +22,7 @@ module TemporalTables
|
|
|
22
22
|
subclass.send :prepend, TemporalTables::ConnectionAdapters.const_get(module_name) if TemporalTables::ConnectionAdapters.const_defined?(module_name)
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
-
ActiveRecord::Base.send :
|
|
25
|
+
ActiveRecord::Base.send :include, TemporalTables::Whodunnit
|
|
26
26
|
end
|
|
27
27
|
end
|
|
28
28
|
|
|
@@ -30,6 +30,13 @@ module TemporalTables
|
|
|
30
30
|
t.send c.type, c.name, :limit => c.limit
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
|
+
|
|
34
|
+
if TemporalTables.add_updated_by_field && !column_exists?(table_name, :updated_by)
|
|
35
|
+
change_table table_name do |t|
|
|
36
|
+
t.column :updated_by, TemporalTables.updated_by_type
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
33
40
|
add_index temporal_name(table_name), [:id, :eff_to]
|
|
34
41
|
create_temporal_triggers table_name
|
|
35
42
|
create_temporal_indexes table_name
|