Update semester field type to enum
This commit is contained in:
parent
35aebc3311
commit
2936abbc91
2 changed files with 16 additions and 11 deletions
13
db/migrate/20130424230817_change_alerts_semester_type.rb
Normal file
13
db/migrate/20130424230817_change_alerts_semester_type.rb
Normal 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
|
14
db/schema.rb
14
db/schema.rb
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue