-- data_preparation.osm_user_contributions_per_country_per_month definition

-- Drop table

-- DROP TABLE data_preparation.osm_user_contributions_per_country_per_month;

CREATE TABLE data_preparation.osm_user_contributions_per_country_per_month (
	ne_id int4 NOT NULL,
	"month" timestamp NOT NULL,
	userid int4 NOT NULL,
	building_change float8 NULL,
	highway_change float8 NULL,
	landuse_change float8 NULL,
	remainder_change float8 NULL,
	healthcare_change float8 NULL,
	places_change float8 NULL,
	amenities_change float8 NULL,
	building_creation float8 NULL,
	highway_creation float8 NULL,
	landuse_creation float8 NULL,
	remainder_creation float8 NULL,
	healthcare_creation float8 NULL,
	places_creation float8 NULL,
	amenities_creation float8 NULL,
	building_deletion float8 NULL,
	highway_deletion float8 NULL,
	landuse_deletion float8 NULL,
	remainder_deletion float8 NULL,
	healthcare_deletion float8 NULL,
	places_deletion float8 NULL,
	amenities_deletion float8 NULL,
	total_count int4 NULL,
	CONSTRAINT osm_user_contributions_per_country_per_month_pkey3 PRIMARY KEY (ne_id, month, userid)
);

-- data_preparation.osm_user_contributions_per_project_per_day definition

-- Drop table

-- DROP TABLE data_preparation.osm_user_contributions_per_project_per_day;

CREATE TABLE data_preparation.osm_user_contributions_per_project_per_day (
	project_id int4 NOT NULL,
	"day" timestamp NOT NULL,
	userid int4 NOT NULL,
	building_change float8 NULL,
	highway_change float8 NULL,
	landuse_change float8 NULL,
	remainder_change float8 NULL,
	healthcare_change float8 NULL,
	places_change float8 NULL,
	amenities_change float8 NULL,
	building_creation float8 NULL,
	highway_creation float8 NULL,
	landuse_creation float8 NULL,
	remainder_creation float8 NULL,
	healthcare_creation float8 NULL,
	places_creation float8 NULL,
	amenities_creation float8 NULL,
	building_deletion float8 NULL,
	highway_deletion float8 NULL,
	landuse_deletion float8 NULL,
	remainder_deletion float8 NULL,
	healthcare_deletion float8 NULL,
	places_deletion float8 NULL,
	amenities_deletion float8 NULL,
	total_count int4 NULL,
	CONSTRAINT osm_user_contributions_per_project_per_day_pkey1 PRIMARY KEY (project_id, day, userid)
);