1
0
Fork 0

Resolve database cluster---- from enum removal

This commit is contained in:
Andrew Tomaka 2013-05-30 23:41:31 -04:00
parent 73e6db58ce
commit d1ebae58b1
4 changed files with 47 additions and 3 deletions

View file

@ -0,0 +1,9 @@
class TempDropAlerts < ActiveRecord::Migration
def up
drop_table :alerts
end
def down
#nope
end
end

View file

@ -0,0 +1,18 @@
class RecreateAlerts < ActiveRecord::Migration
def up
create_table :alerts do |t|
t.integer :user_id
t.string :department
t.string :course
t.string :semester
t.text :sections
t.boolean :alerted
t.timestamps
end
end
def down
drop_table :alerts
end
end

View file

@ -0,0 +1,9 @@
class ReaddDefaultAlertedValue < ActiveRecord::Migration
def up
change_column :alerts, :alerted, :boolean, :default => false
end
def down
change_column :alerts, :alerted, :boolean, :default => nil
end
end

View file

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