Create schema and tables
--Drop existing codepointpolygons schema if it exists in the database
DROP SCHEMA IF EXISTS codepointpolygons CASCADE;
COMMIT;
--Create new codepointpolygons schema
CREATE SCHEMA codepointpolygons;
COMMIT;
--SQL commands for creating tables
CREATE TABLE codepointpolygons.discards_polys
(
gid bigint,
postcode character varying(8),
upp character varying(20),
pc_area text,
geom geometry(MultiPolygon,27700),
discard boolean,
vstreet boolean,
vstreet_and_std boolean
)
WITH (
OIDS=FALSE
);
CREATE TABLE codepointpolygons.verticalstreets_polys
(
gid bigint,
postcode text,
upp character varying(20),
pc_area text,
geom geometry(MultiPolygon,27700),
discard boolean,
vstreet boolean,
vstreet_and_std boolean
)
WITH (
OIDS=FALSE
);
CREATE TABLE codepointpolygons.verticalstreets_and_std_polys
(
gid bigint,
postcode character varying(8),
upp character varying(20),
pc_area character varying(2),
geom geometry(MultiPolygon,27700),
discard boolean,
vstreet boolean,
vstreet_and_std boolean
)
WITH (
OIDS=FALSE
);
Updated less than a minute ago