diff --git a/src/noosfero-spb/software_communities/db/migrate/20160112191716_add_license_to_softwares_with_none.rb b/src/noosfero-spb/software_communities/db/migrate/20160112191716_add_license_to_softwares_with_none.rb new file mode 100644 index 0000000..da37d38 --- /dev/null +++ b/src/noosfero-spb/software_communities/db/migrate/20160112191716_add_license_to_softwares_with_none.rb @@ -0,0 +1,9 @@ +class AddLicenseToSoftwaresWithNone < ActiveRecord::Migration + def up + execute("UPDATE software_infos SET license_info_id=(SELECT id FROM license_infos WHERE version='Another') WHERE license_info_id IS NULL;") + end + + def down + say "This migration can't be reverted" + end +end -- libgit2 0.21.2