Files
archived-hc-harbor/db/migrate/20250305194250_add_source_to_heartbeats.rb
2025-03-05 14:58:24 -05:00

14 lines
332 B
Ruby

class Heartbeat < ApplicationRecord
end
class AddSourceToHeartbeats < ActiveRecord::Migration[8.0]
def change
add_column :heartbeats, :source_type, :integer
Heartbeat.update_all(source_type: 1)
change_column_null :heartbeats, :source_type, false
change_column_default :heartbeats, :source_type, to: 0
end
end