diff --git a/db/migrate/20240329164854_netherlands_municipalities_2019_update_step_5.rb b/db/migrate/20240507094837_smallingerland_2019_potentials_wind_solar.rb similarity index 85% rename from db/migrate/20240329164854_netherlands_municipalities_2019_update_step_5.rb rename to db/migrate/20240507094837_smallingerland_2019_potentials_wind_solar.rb index 8b5c1f68..cc6adc5d 100644 --- a/db/migrate/20240329164854_netherlands_municipalities_2019_update_step_5.rb +++ b/db/migrate/20240507094837_smallingerland_2019_potentials_wind_solar.rb @@ -1,6 +1,6 @@ -class NetherlandsMunicipalities2019UpdateStep5 < ActiveRecord::Migration[5.0] +class Smallingerland2019PotentialsWindSolar < ActiveRecord::Migration[5.0] def self.up - directory = Rails.root.join('db/migrate/20240329164854_netherlands_municipalities_2019_update_step_5') + directory = Rails.root.join('db/migrate/20240507094837_smallingerland_2019_potentials_wind_solar') data_path = directory.join('data.csv') commits_path = directory.join('commits.yml') datasets = [] @@ -13,7 +13,7 @@ def self.up # # ... # end # - CSVImporter.run(data_path, commits_path, create_missing_datasets: true) do |row, runner| + CSVImporter.run(data_path, commits_path) do |row, runner| print "Updating #{row['geo_id']}... " commits = runner.call diff --git a/db/migrate/20240507094837_smallingerland_2019_potentials_wind_solar/commits.yml b/db/migrate/20240507094837_smallingerland_2019_potentials_wind_solar/commits.yml new file mode 100644 index 00000000..62d7aab4 --- /dev/null +++ b/db/migrate/20240507094837_smallingerland_2019_potentials_wind_solar/commits.yml @@ -0,0 +1,5 @@ +--- +- fields: + - :all + message: + Aangeleverd door gemeente Smallingerland diff --git a/db/migrate/20240507094837_smallingerland_2019_potentials_wind_solar/data.csv b/db/migrate/20240507094837_smallingerland_2019_potentials_wind_solar/data.csv new file mode 100644 index 00000000..b868556d --- /dev/null +++ b/db/migrate/20240507094837_smallingerland_2019_potentials_wind_solar/data.csv @@ -0,0 +1,2 @@ +geo_id,areable_land,buildings_roof_surface_available_for_pv,residences_roof_surface_available_for_pv +GM0090,88.75,3.00,3.00 \ No newline at end of file