Files
grecia/lib/tasks/db.rake
Senén Rodero Rodríguez c7c8309ad1 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.
2020-12-02 12:38:03 +01:00

14 lines
449 B
Ruby

namespace :db do
desc "Resets the database and loads it from db/dev_seeds.rb"
task :dev_seed, [:print_log] => [:environment] do |t, args|
@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