Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

080_add_users_type.rb 203B

12345678910
  1. class AddUsersType < ActiveRecord::Migration[4.2]
  2. def self.up
  3. add_column :users, :type, :string
  4. User.update_all "type = 'User'"
  5. end
  6. def self.down
  7. remove_column :users, :type
  8. end
  9. end