1
0
Fork 0

Update semester field type to enum

This commit is contained in:
Andrew Tomaka 2013-04-24 19:10:45 -04:00
parent 35aebc3311
commit 2936abbc91
2 changed files with 16 additions and 11 deletions

View file

@ -0,0 +1,13 @@
class ChangeAlertsSemesterType < ActiveRecord::Migration
def up
change_table :alerts do |t|
t.change :semester, :enum
end
end
def down
change_table :alerts do |t|
t.change :semester, :string
end
end
end

View file

@ -11,18 +11,10 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20130413054153) do
ActiveRecord::Schema.define(:version => 20130424230817) do
create_table "alerts", :force => true do |t|
t.integer "user_id"
t.string "department"
t.string "course"
t.boolean "alerted", :default => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "semester"
t.text "sections"
end
# Could not dump table "alerts" because of following StandardError
# Unknown type 'enum' for column 'semester'
create_table "roles", :force => true do |t|
t.string "name"