 ------------
 
 model_draft.ego_grid_mv_griddistrict  # no changes
-model_draft.ego_supply_rea -> model_draft.ego_supply_rea_2050
-supply.ego_res_powerplant
-
+model_draft.ego_supply_rea    -> model_draft.ego_supply_rea_2050
+supply.ego_res_powerplant     -> model_draft.ego_supply_res_powerplant_2050
 
 
 Index names:
 ------------
-ego_supply_rea_geom_idx       -> 
-ego_supply_rea_geom_line_idx  -> 
-ego_supply_rea_geom_new_idx   ->
-
-ego_supply_rea_out_mview_geom_new_idx
+ego_supply_rea_geom_idx       -> ego_supply_rea_2050_geom_idx 
+ego_supply_rea_geom_line_idx  -> ego_supply_rea_2050_geom_line_idx
+ego_supply_rea_geom_new_idx   -> ego_supply_rea_2050_geom_new_idx
+ego_supply_rea_out_mview_geom_new_idx -> ego_supply_rea_2050_out_mview_geom_new_idx
 
 
 Pkeys: 
 ------
-ego_supply_rea_pkey 	      -> ego_supply_rea_2050_pkey 
-
+ego_supply_rea_pkey -> ego_supply_rea_2050_pkey 
 
 
 
 Views:
 ------
-model_draft.ego_supply_rea_out_mview -> 
+model_draft.ego_supply_rea_out_mview ->  model_draft.ego_supply_rea_2050_out_mview 
+
 
 
 Changes to original script:
 --------------------------
 
-
+replace: rea_ -> rea_2050
+set comments
+delete column postcode 
 
 ToDos:
 ------


-- Check for sources
	SELECT	dea.source
	FROM 	supply.ego_res_powerplant AS dea
	GROUP BY dea.source

-- Flag BNetzA

﻿/*
Skript to allocate decentralized renewable power plants (dea)
Methods base on technology and voltage level
Uses different lattice from setup_ego_wpa_per_grid_district.sql
