Skip to content

Instantly share code, notes, and snippets.

@voxik
Created August 16, 2012 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voxik/3368203 to your computer and use it in GitHub Desktop.
Save voxik/3368203 to your computer and use it in GitHub Desktop.
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