5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-24 11:36:23 +00:00
panel/db/migrate/20231101200026_add_default_to_distributed_press_publisher.rb

14 lines
384 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