lib/og/store/psql.rb in og-0.28.0 vs lib/og/store/psql.rb in og-0.29.0
- old
+ new
@@ -514,10 +514,11 @@
raise unless ex.message =~ /does not exist/
end
deleted += 1
end
+ nullified_relations = 0
sql_hash[:create].each do |sql|
con_retry = true
begin
@conn.exec(sql)
created += 1
@@ -570,10 +571,10 @@
else
text << "#{created} constraints were added, " if created != 0
text << "#{deleted} constraints were deleted, " if deleted != 0
if broken_relations != 0
text.gsub!(/,([^,]+)$/,' and \1')
- text << "#{broken_relations} relations were broken, causing "
+ text << "#{broken_relations} relations were broken causing "
if nullified_relations != 0
text << "#{nullified_relations} relations to have non-existant foreign keys set to null"
text << (deleted_relations == 0 ? ", " : " and ")
end
text << "#{nullified_relations} relations to have rows with non-existant foreign keys deleted, " if deleted_relations != 0