Files
fizzy/db/migrate/20250604071718_create_entropy_configurations.rb
T
Jorge Manrubia 91787a3523 Revamp entropy configuraiton
- Move both settings to its dedicated model entropy configuration
- A collection can have an entropy configuration, or will default to the account if not
2025-06-04 10:41:08 +02:00

16 lines
535 B
Ruby

class CreateEntropyConfigurations < ActiveRecord::Migration[8.1]
def change
create_table :entropy_configurations do |t|
t.references :container, polymorphic: true, null: false, index: { unique: true }
t.bigint :auto_close_period, null: false, default: 30.days.to_i
t.bigint :auto_reconsider_period, null: false, default: 30.days.to_i
t.timestamps
t.index %i[ container_type container_id auto_close_period ]
t.index %i[ container_type container_id auto_reconsider_period ]
end
end
end