From: Ira W. Snyder Date: Thu, 22 Nov 2007 07:46:49 +0000 (-0800) Subject: Change video's director column to a string X-Git-Tag: turned-in~67 X-Git-Url: https://www.irasnyder.com/gitweb/?p=cs356-p2-videostore.git;a=commitdiff_plain;h=4ab6702d5ac0ec4541e8a724ab5e4409630b5546 Change video's director column to a string It was an int, which was stupid of me Signed-off-by: Ira W. Snyder --- diff --git a/db/development.sqlite3 b/db/development.sqlite3 index f020ede..50680b2 100644 Binary files a/db/development.sqlite3 and b/db/development.sqlite3 differ diff --git a/db/migrate/012_rentables_director_int_to_str.rb b/db/migrate/012_rentables_director_int_to_str.rb new file mode 100644 index 0000000..9498c14 --- /dev/null +++ b/db/migrate/012_rentables_director_int_to_str.rb @@ -0,0 +1,9 @@ +class RentablesDirectorIntToStr < ActiveRecord::Migration + def self.up + change_column :rentables, :director, :string + end + + def self.down + change_column :rentables, :director, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index f099861..f0435a6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2,7 +2,7 @@ # migrations feature of ActiveRecord to incrementally modify your database, and # then regenerate this schema definition. -ActiveRecord::Schema.define(:version => 11) do +ActiveRecord::Schema.define(:version => 12) do create_table "coitems", :force => true do |t| t.column "customer_id", :integer @@ -24,7 +24,7 @@ ActiveRecord::Schema.define(:version => 11) do t.column "title", :string t.column "newrelease", :boolean, :default => false t.column "video_genre", :integer - t.column "director", :integer + t.column "director", :string t.column "media", :integer t.column "game_genre", :integer t.column "platform", :integer