5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 00:06:21 +00:00
panel/db/migrate/20231101200026_add_default_to_distributed_press_publisher.rb
2024-03-26 15:48:30 -03:00

14 lines
385 B
Ruby

# frozen_string_literal: true
# Una instancia es la instancia por defecto
class AddDefaultToDistributedPressPublisher < ActiveRecord::Migration[6.1]
def up
add_column :distributed_press_publishers, :default, :boolean, default: false
DistributedPressPublisher.last&.update(default: true)
end
def down
remove_column :distributed_press_publishers, :default
end
end