# of the user's email address in the "calendar" field happens when
# he is also the owner, so the calendar does get deleted in the
# normal situation.
- sql_queries << "DELETE FROM shares WHERE REPLACE(owner, '%40', '@') ~ $1;"
- sql_queries << "DELETE FROM shares WHERE REPLACE(with, '%40', '@') ~ $1;"
+ sql_queries << "DELETE FROM shares WHERE REPLACE(owner,'%40','@') ~ $1;"
+ sql_queries << "DELETE FROM shares WHERE REPLACE(\"with\",'%40','@') ~ $1;"
connection = PG::Connection.new(@db_hash)
begin