dawarich/db/migrate/20250910224538_add_sharing_fields_to_stats.rb

18 lines
427 B
Ruby
Raw Normal View History

2025-09-11 14:41:43 -04:00
# frozen_string_literal: true
class AddSharingFieldsToStats < ActiveRecord::Migration[8.0]
2025-09-13 15:26:55 -04:00
def up
add_column :stats, :sharing_settings, :jsonb
2025-09-11 14:41:43 -04:00
add_column :stats, :sharing_uuid, :uuid
2025-09-13 15:26:55 -04:00
change_column_default :stats, :sharing_settings, {}
2025-09-29 16:27:07 -04:00
BulkStatsCalculatingJob.set(wait: 5.minutes).perform_later
2025-09-13 15:26:55 -04:00
end
def down
remove_column :stats, :sharing_settings
remove_column :stats, :sharing_uuid
2025-09-11 14:41:43 -04:00
end
end