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.
14 lines
449 B
Ruby
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
|