Fix application_type detection logic in init-db.rb