Commit fe196cc352bb19b4b21429cf516c6335d3ddac5c

Authored by Tallys Martins
1 parent 1a927cde

Created migration to remove softwares without community

- For some reason, there are still softwares without relation with community.
The quick solution was to delete this softwares, since they are test softwares.

Signed-off-by Gabriel Silva <gabriel93.silva@gmail.com>
Signed-off-by Gustavo Coelho <gust.rod.coelho@gmail.com>
Signed-off-by: Arthur Del Esposte <arthurmde@gmail.com>
src/noosfero-spb/spb_migrations/db/migrate/20151106172419_remove_softwares_without_community.rb 0 → 100644
... ... @@ -0,0 +1,9 @@
  1 +class RemoveSoftwaresWithoutCommunity < ActiveRecord::Migration
  2 + def up
  3 + execute('DELETE FROM software_infos where community_id NOT IN (SELECT id FROM profiles)')
  4 + end
  5 +
  6 + def down
  7 + say "This migration can't be reverted!"
  8 + end
  9 +end
... ...