01_setupNSBaseTable.sql
CREATE TABLE app_ldd.ns_base(
permission_id bigint,
source character varying(50),
borough_ref character varying(50),
borough_name character varying(50),
the_geom_poly public.geometry(Polygon,4326),
the_geom_pt public.geometry(Point,4326),
lat double precision,
lon double precision,
descr character varying(4000),
completed_date date,
permission_date date,
ns_type character varying(50),
status_rc character varying(10),
sitearea_total Numeric(11,3),
existing_socialhousing integer DEFAULT 0,
proposed_socialhousing integer DEFAULT 0,
existing_councilhousing integer DEFAULT 0,
proposed_councilhousing integer DEFAULT 0,
comments_total integer DEFAULT 0,
comments_objecting integer DEFAULT 0,
comments_supporting integer DEFAULT 0,
is_in_conservationarea boolean DEFAULT FALSE,
is_in_archeologyarea boolean DEFAULT FALSE,
involves_demolition boolean DEFAULT FALSE,
involves_construction boolean DEFAULT FALSE,
shift_towards_residential Numeric(11,3),
change_to_housing boolean DEFAULT FALSE,
change_to_openspace boolean DEFAULT FALSE,
change_to_floorspace boolean DEFAULT FALSE,
change_to_nonresaccom boolean DEFAULT FALSE,
known_bat_mitigation boolean DEFAULT FALSE
);