Created
August 16, 2012 07:59
-
-
Save voxik/3368203 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/archivist/base/db.rb b/lib/archivist/base/db.rb | |
index c4c0c1f..2bf4750 100644 | |
--- a/lib/archivist/base/db.rb | |
+++ b/lib/archivist/base/db.rb | |
@@ -11,6 +11,8 @@ module Archivist | |
base.send(:extend, MySQL) | |
elsif connection_class.include?("postgresql") | |
base.send(:extend, PostgreSQL) | |
+ elsif connection_class.include?("sqlite3") | |
+ base.send(:extend, Sqlite3) | |
else | |
raise "DB type not supported by Archivist!" | |
end | |
@@ -56,6 +58,13 @@ module Archivist | |
@indexes ||= connection.indexes("archived_#{table_name}").map{|i| i.column_names} | |
end | |
end | |
+ | |
+ module Sqlite3 | |
+ private | |
+ def archived_table_indexed_columns | |
+ @indexes ||= connection.indexes("archived_#{table_name}").map{|i| i.column_names} | |
+ end | |
+ end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment