fix the data types, fix tests

This commit is contained in:
Tyrel Souza 2014-04-21 11:54:28 -04:00
parent 420aec8363
commit b091ca412e
4 changed files with 23 additions and 12 deletions

View File

@ -19,7 +19,7 @@
<tr>
<td><%= link_to campaign.clientid, campaign_path(campaign.clientid) %></td>
<td><%= campaign.listingcode %></td>
<td><%= campaign.address1 %></td>
<td><%= campaign.address %></td>
<td><%= campaign.city %></td>
<td><%= campaign.state %></td>
<td><%= campaign.zip %></td>

View File

@ -27,12 +27,7 @@
<p>
<strong>Address1:</strong>
<%= @campaign.address1 %>
</p>
<p>
<strong>Address2:</strong>
<%= @campaign.address2 %>
<%= @campaign.address %>
</p>
<p>

View File

@ -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

View File

@ -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"