From bf322c1bc2aa84ede363951b031d8767ed939ea4 Mon Sep 17 00:00:00 2001 From: Jeffrey Chupp Date: Fri, 30 Mar 2012 09:03:41 -0400 Subject: [PATCH] new statuses --- db/migrate/20120329225208_update_new_statuses.rb | 15 +++++++++++++++ db/schema.rb | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20120329225208_update_new_statuses.rb diff --git a/db/migrate/20120329225208_update_new_statuses.rb b/db/migrate/20120329225208_update_new_statuses.rb new file mode 100644 index 0000000..171ff42 --- /dev/null +++ b/db/migrate/20120329225208_update_new_statuses.rb @@ -0,0 +1,15 @@ +class UpdateNewStatuses < ActiveRecord::Migration + def up + "Curt Schilling, Marty Barrett, Joe Dobson, Dutch Leonard, Ellis Burks".split(', ').each do |name| + Player.where(full_name: name).first.update_attributes!(hof_status: 'hof', induction_year: 2012) + end + + "Curt Schilling, Ellis Burks, Jim Piersall, Wally Schang, Jesse Tannehill".split(', ').each do |name| + Player.where(full_name: name).first.update_attributes!(wwar_status: true, future_wwar: false) + end + end + + def down + raise "oh no" + end +end diff --git a/db/schema.rb b/db/schema.rb index 9bbe1ec..0254f82 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,3 +1,4 @@ +# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. @@ -10,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20120324171439) do +ActiveRecord::Schema.define(:version => 20120329225208) do create_table "players", :force => true do |t| t.string "first_name"