mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-23 00:56:22 +00:00
17 lines
428 B
Ruby
17 lines
428 B
Ruby
|
# 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
|