symbols should really never be allowed in migrations, just raw sql

This commit is contained in:
Sam 2013-03-19 21:31:35 -07:00
parent bfeb75a60f
commit f3f751ddd2
1 changed files with 1 additions and 2 deletions

View File

@ -4,8 +4,7 @@ class RemoveTrustLevels < ActiveRecord::Migration
change_column_default :users, :trust_level_id, TrustLevel.levels[:new]
rename_column :users, :trust_level_id, :trust_level
update "UPDATE users set trust_level = #{TrustLevel.levels[:regular]}"
update "UPDATE users set trust_level = #{TrustLevel.levels[:moderator]} where moderator = true"
update "UPDATE users set trust_level = 1"
remove_column :users, :moderator
add_column :users, :flag_level, :integer, null: false, default: 0