summaryrefslogtreecommitdiff
path: root/db/migrate/20130813051500_add_polycom_phone.rb
blob: a560fee6bcd63fa0ffeaa6820ae30abe4e43c6ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class AddPolycomPhone < ActiveRecord::Migration
  def up
    Manufacturer.create(:name => 'Polycom', :ieee_name => 'Polycom', :homepage_url => 'http://www.polycom.com')
    polycom = Manufacturer.where(:name => 'Polycom').first
    if polycom
        polycom.phone_models.create(:name => 'Polycom SoundPoint IP 670', :product_manual_homepage_url => 'http://www.polycom.com/global/documents/support/user/products/voice/SoundPoint_IP_670_User_Guide_SIP_v3_2.pdf', :product_homepage_url => 'http://www.polycom.com/products-services/voice/desktop-solutions/soundpont-ip-series/soundpoint-ip-670.html')
    end
  end

  def down
    Manufacturer.where(:name => 'Polycom').destroy_all
    PhoneModel.where(:name => 'Polycom SoundPoint IP 670').destroy_all
  end
end