FEATURE: Custom orders for user fields

This commit is contained in:
Robin Ward
2015-07-30 14:52:53 -04:00
parent 8e603503e6
commit aa6f792ce1
16 changed files with 126 additions and 83 deletions

View File

@@ -0,0 +1,6 @@
class AddPositionToUserFields < ActiveRecord::Migration
def change
add_column :user_fields, :position, :integer, default: 0
execute "UPDATE user_fields SET position = (SELECT COUNT(*) from user_fields as uf2 where uf2.id < user_fields.id)"
end
end