Add rake task to load sdg

This task should be useful for existing installations that are going
to upgrade the app and want to load SDG data into an already
existing database.
This commit is contained in:
Senén Rodero Rodríguez
2020-11-11 17:12:06 +01:00
committed by Javi Martín
parent cbe84450ac
commit c7c8309ad1
3 changed files with 41 additions and 1 deletions

View File

@@ -4,4 +4,10 @@ namespace :db do
@avoid_log = args[:print_log] == "avoid_log"
load(Rails.root.join("db", "dev_seeds.rb"))
end
desc "Load SDG content into database"
task load_sdg: :environment do
ApplicationLogger.new.info "Adding Sustainable Development Goals content"
load(Rails.root.join("db", "sdg.rb"))
end
end