Skip to content

Commit

Permalink
Fix migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander committed Jan 20, 2024
1 parent b42704c commit c73e4ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/migrate/20180203063658_add_dates_to_chat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
class AddDatesToChat < ActiveRecord::Migration[5.1]
def up
change_table :chats, bulk: true do |t|
t.datetime :chats, :created_at, null: false, default: Time.current
t.datetime :chats, :active_at, null: true, default: nil
t.datetime :created_at, null: false, default: Time.current
t.datetime :active_at, null: true, default: nil
end

Chat.where(active: true).each { |c| c.update(active_at: Time.current) }
Expand Down

0 comments on commit c73e4ea

Please sign in to comment.