Create tables for OSMM Sites Layer

CREATE TABLE sites.accesspoint
(
  ogc_fid serial NOT NULL,
  wkb_geometry geometry(Point,27700),
  toid character varying,
  version integer,
  versiondate character varying,
  reasonforchange character varying,
  reftofunctionalsite character varying,
  accesstype character varying,
  accessmechanism character varying,
  accessdirection character varying,
  accessuserestriction character varying,
  reftoroutingpoint character varying,
  reftoitnroadnode character varying,
  itnroadnodeversiondate character varying,
  datetimequalifier character varying,
  heightqualifier character varying,
  widthqualifier character varying,
  weightqualifier character varying,
  lengthqualifier character varying,
  natureofaccess character varying,
  CONSTRAINT accesspoint_pkey PRIMARY KEY (ogc_fid)
)
WITH (
  OIDS=FALSE
);
COMMIT;
 
CREATE TABLE sites.functionalsite
(
  ogc_fid serial NOT NULL,
  wkb_geometry geometry(MultiPolygon,27700),
  toid character varying,
  version integer,
  versiondate character varying,
  reasonforchange character varying,
  functionstatus character varying,
  functiontheme character varying,
  function character varying,
  perimeter double precision,
  area double precision,
  distinctivename1 character varying,
  distinctivename2 character varying,
  distinctivename3 character varying,
  distinctivename4 character varying,
  stakeholder1 character varying,
  stakeholder2 character varying,
  stakeholder1role character varying,
  stakeholder2role character varying,
  primaryaddressbaseuprn double precision,
  extentdefinition character varying,
  CONSTRAINT functionalsite_pkey PRIMARY KEY (ogc_fid)
)
WITH (
  OIDS=FALSE
);
COMMIT;
 
CREATE TABLE sites.routingpoint
(
  ogc_fid serial NOT NULL,
  wkb_geometry geometry(Point,27700),
  toid character varying,
  version integer,
  versiondate character varying,
  reasonforchange character varying,
  reftoitnroadlink character varying,
  itnroadlinkversiondate character varying,
  startdistance double precision,
  CONSTRAINT routingpoint_pkey PRIMARY KEY (ogc_fid)
)
WITH (
  OIDS=FALSE
);
COMMIT;