]>
gitweb.michael.orlitzky.com - mailshears.git/blob - lib/mv/plugins/agendav.rb
3 require 'common/agendav_plugin'
12 def mv_domain(from
, to
)
13 # AgenDAV doesn't have a concept of domains.
17 sql_queries
= ['UPDATE prefs SET username = $1 WHERE username = $2;']
18 sql_queries
<< 'UPDATE shared SET user_from = $1 WHERE user_from = $2;'
19 sql_queries
<< 'UPDATE shared SET user_which = $1 WHERE user_which = $2;'
22 connection
= PGconn
.connect(@db_host,
30 sql_queries
.each
do |sql_query
|
31 connection
.query(sql_query
, [to
, from
])
37 # Pretend like we're database-agnostic in case we ever are.
38 raise DatabaseError
.new(e
)