gravis-acts_as_archive 0.2.9 → 0.2.10
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/lib/acts_as_archive/base/table.rb +1 -17
- data/require.rb +1 -1
- metadata +3 -3
|
@@ -66,24 +66,8 @@ module ActsAsArchive
|
|
|
66
66
|
|
|
67
67
|
private
|
|
68
68
|
|
|
69
|
-
# def archive_table_indexed_columns
|
|
70
|
-
# case connection.class.to_s
|
|
71
|
-
# when "ActiveRecord::ConnectionAdapters::MysqlAdapter"
|
|
72
|
-
# index_query = "SHOW INDEX FROM archived_#{table_name}"
|
|
73
|
-
# indexes = connection.select_all(index_query).collect do |r|
|
|
74
|
-
# r["Column_name"]
|
|
75
|
-
# end
|
|
76
|
-
# when "ActiveRecord::ConnectionAdapters::PostgreSQLAdapter"
|
|
77
|
-
# index_query = "SELECT indexname FROM pg_indexes WHERE tablename = '#{table_name}'"
|
|
78
|
-
# indexes = connection.select_all(index_query).collect do |r|
|
|
79
|
-
# r["indexname"].split("_on_").last.split("_and_")
|
|
80
|
-
# end
|
|
81
|
-
# else
|
|
82
|
-
# raise "Unsupported Database"
|
|
83
|
-
# end
|
|
84
|
-
# end
|
|
85
|
-
|
|
86
69
|
def table_has_columns(columns)
|
|
70
|
+
self::Archive.reset_column_information
|
|
87
71
|
!Array(columns).select {|current_column| self::Archive.column_names.include?(current_column.to_s)}.empty?
|
|
88
72
|
end
|
|
89
73
|
|
data/require.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gravis-acts_as_archive
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 3
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 2
|
|
9
|
-
-
|
|
10
|
-
version: 0.2.
|
|
9
|
+
- 10
|
|
10
|
+
version: 0.2.10
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Winton Welsh
|