5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-28 17:56:21 +00:00
panel/db/migrate/20230325163802_add_short_description_to_licencias.rb

17 lines
428 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
# Agrega descripciones cortas a las licencias
class AddShortDescriptionToLicencias < ActiveRecord::Migration[6.1]
def up
add_column :licencias, :short_description, :string
YAML.safe_load_file('db/seeds/licencias.yml').each do |licencia|
Licencia.find_by_icons(licencia['icons']).update licencia
end
end
def down
remove_column :licencias, :short_description
end
end