diff --git a/app/views/campaigns/index.html.erb b/app/views/campaigns/index.html.erb index 550b663..f74e779 100644 --- a/app/views/campaigns/index.html.erb +++ b/app/views/campaigns/index.html.erb @@ -19,7 +19,7 @@ <%= link_to campaign.clientid, campaign_path(campaign.clientid) %> <%= campaign.listingcode %> - <%= campaign.address1 %> + <%= campaign.address %> <%= campaign.city %> <%= campaign.state %> <%= campaign.zip %> diff --git a/app/views/campaigns/show.html.erb b/app/views/campaigns/show.html.erb index 06b23a3..474d175 100644 --- a/app/views/campaigns/show.html.erb +++ b/app/views/campaigns/show.html.erb @@ -27,12 +27,7 @@

Address1: - <%= @campaign.address1 %> -

- -

- Address2: - <%= @campaign.address2 %> + <%= @campaign.address %>

diff --git a/db/migrate/20140421154050_change_column_types.rb b/db/migrate/20140421154050_change_column_types.rb new file mode 100644 index 0000000..d63630c --- /dev/null +++ b/db/migrate/20140421154050_change_column_types.rb @@ -0,0 +1,16 @@ +class ChangeColumnTypes < ActiveRecord::Migration + def up + change_column :campaigns, :clientid, 'integer USING CAST(clientid AS integer)' + change_column :videolistings, :musicselection, 'integer USING CAST(musicselection AS integer)' + change_column :videolistings, :producttypeid, 'integer USING CAST(producttypeid AS integer)' + change_column :videolistings, :voiceoverselection, 'integer USING CAST(voiceoverselection AS integer)' + + end + + def down + change_column :campaigns, :clientid, :string + change_column :videolistings, :musicselection, :string + change_column :videolistings, :producttypeid, :string + change_column :videolistings, :voiceoverselection, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index 31ac811..0b5e2b9 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20140421150203) do +ActiveRecord::Schema.define(version: 20140421154050) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -35,7 +35,7 @@ ActiveRecord::Schema.define(version: 20140421150203) do add_index "admins", ["reset_password_token"], name: "index_admins_on_reset_password_token", unique: true, using: :btree create_table "campaigns", force: true do |t| - t.string "clientid" + t.integer "clientid" t.string "listingcode" t.string "billingcode" t.string "advertisername" @@ -104,10 +104,10 @@ ActiveRecord::Schema.define(version: 20140421150203) do create_table "videolistings", force: true do |t| t.string "videocode" - t.string "producttypeid" + t.integer "producttypeid" t.string "remoteassetsarchive" - t.string "voiceoverselection" - t.string "musicselection" + t.integer "voiceoverselection" + t.integer "musicselection" t.string "clientprovidedscript" t.string "keywords" t.string "focus"