aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/server.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2012-01-30 12:27:05 +0000
committerPatrick J Cherry <patrick@bytemark.co.uk>2012-01-30 12:27:05 +0000
commitc34a4b2e54ad091e0e98d195c0a9bf70da47b91f (patch)
tree34a671b277a2d62195754d965c36f7e7fb80d60f /lib/mauve/server.rb
parent7b3587a985ff36392c06649cd84c81472f1209c5 (diff)
Added possibility of using postgres databases.
Diffstat (limited to 'lib/mauve/server.rb')
-rw-r--r--lib/mauve/server.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/mauve/server.rb b/lib/mauve/server.rb
index 233695d..f07b7ad 100644
--- a/lib/mauve/server.rb
+++ b/lib/mauve/server.rb
@@ -1,7 +1,7 @@
# encoding: UTF-8
require 'yaml'
require 'socket'
-# require 'mauve/datamapper'
+require 'mauve/datamapper'
require 'mauve/proto'
require 'mauve/alert'
require 'mauve/history'
@@ -118,7 +118,6 @@ module Mauve
#
# m.auto_migrate! if m.respond_to?("auto_migrate!")
#
- #
m.properties.each do |prop|
next unless prop.is_a?(DataMapper::Property::EpochTime)
logger.info("Updating #{c}.#{prop.name}")
@@ -126,7 +125,7 @@ module Mauve
DataMapper.repository(:default).adapter.execute("BEGIN TRANSACTION;")
DataMapper.repository(:default).adapter.execute(statement)
DataMapper.repository(:default).adapter.execute("COMMIT TRANSACTION;")
- end
+ end if DataMapper.repository(:default).adapter.class.to_s == "DataMapper::Adapters::SqliteAdapter"
end
AlertHistory.migrate!