replace DB constant with actual method in generator.rb