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ů.

20180501132547_add_author_id_to_time_entries.rb 323B

1234567891011
  1. class AddAuthorIdToTimeEntries < ActiveRecord::Migration[5.1]
  2. def up
  3. add_column :time_entries, :author_id, :integer, :default => nil, :after => :project_id
  4. # Copy existing user_id to author_id
  5. TimeEntry.update_all('author_id = user_id')
  6. end
  7. def down
  8. remove_column :time_entries, :author_id
  9. end
  10. end