From 4febc283c1e9aafdcc755454c1acbad38475daf6 Mon Sep 17 00:00:00 2001 From: Thiago Ribeiro Date: Tue, 5 Jan 2016 11:03:34 -0200 Subject: [PATCH] Remove softwre with nil community. --- src/noosfero-spb/spb_migrations/db/migrate/20160104182236_remove_softwares_with_nil_community.rb | 9 +++++++++ 1 file changed, 9 insertions(+), 0 deletions(-) create mode 100644 src/noosfero-spb/spb_migrations/db/migrate/20160104182236_remove_softwares_with_nil_community.rb diff --git a/src/noosfero-spb/spb_migrations/db/migrate/20160104182236_remove_softwares_with_nil_community.rb b/src/noosfero-spb/spb_migrations/db/migrate/20160104182236_remove_softwares_with_nil_community.rb new file mode 100644 index 0000000..0c2dbfb --- /dev/null +++ b/src/noosfero-spb/spb_migrations/db/migrate/20160104182236_remove_softwares_with_nil_community.rb @@ -0,0 +1,9 @@ +class RemoveSoftwareWithoutCommunity < ActiveRecord::Migration + def up + execute('DELETE FROM software_infos where community_id IS NULL;') + end + + def down + say"This migration can't be reverted" + end +end -- libgit2 0.21.2