Commit
fe196cc352bb19b4b21429cf516c6335d3ddac5c
Exists in
master
and in
55 other branches
add_sisp_to_chef, add_super_archives_plugin, api_for_colab, automates_core_packing, backup_not_prod, changes_in_buttons_on_content_panel, colab_automated_login, colab_spb_plugin_recipe, colab_widgets_settings, disable_email_dev, fix_breadcrumbs_position, fix_categories_software_link, fix_edit_institution, fix_edit_software_with_another_license, fix_get_license_info, fix_gitlab_assets_permission, fix_list_style_inside_article, fix_list_style_on_folder_elements, fix_members_pagination, fix_merge_request_url, fix_models_translations, fix_no_license, fix_software_block_migration, fix_software_communities_translations, fix_software_communities_unit_test, fix_style_create_institution_admin_panel, fix_superarchives_imports, fix_sym_links_noosfero, gov-user-refactoring-rails4, header_fix, kalibro-processor-package, lxc_settings, margin_fix, mezuro_cookbook, refactor_download_block, refactor_software_for_sisp, remove_broken_theme, remove_secondary_email_from_user, remove_sisp_buttons, review_message, signals_user_noosfero, sisp_catalog_header, sisp_dev_master, software_as_organization, software_catalog_style_fix, software_communities_html_refactor, software_infos_api, spb_to_rails4, stable-4.1, stable-4.2, theme_header, theme_javascript_refactory, thread_dropdown, update_search_by_categories, update_softwares_boxes
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>
| @@ -0,0 +1,9 @@ |
| @@ -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 |