Resolve database cluster---- from enum removal
This commit is contained in:
parent
73e6db58ce
commit
d1ebae58b1
4 changed files with 47 additions and 3 deletions
9
db/migrate/20130531033207_temp_drop_alerts.rb
Normal file
9
db/migrate/20130531033207_temp_drop_alerts.rb
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
class TempDropAlerts < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
drop_table :alerts
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
#nope
|
||||||
|
end
|
||||||
|
end
|
18
db/migrate/20130531033439_recreate_alerts.rb
Normal file
18
db/migrate/20130531033439_recreate_alerts.rb
Normal 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
|
9
db/migrate/20130531033938_readd_default_alerted_value.rb
Normal file
9
db/migrate/20130531033938_readd_default_alerted_value.rb
Normal 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
|
14
db/schema.rb
14
db/schema.rb
|
@ -11,10 +11,18 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# 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
|
create_table "alerts", :force => true do |t|
|
||||||
# Unknown type 'enum' for column 'semester'
|
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|
|
create_table "roles", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
|
|
Loading…
Reference in a new issue