text: /* ---------------------------------------------------- */
  /*  Generated by Enterprise Architect Version 12.1 		*/
  /*  Created On : 17-Dec-2019 17:12:52 				*/
  /*  DBMS       : PostgreSQL 						*/
  /* ---------------------------------------------------- */
  
  /* Drop Tables */
  
  DROP TABLE IF EXISTS i4ldata.t_SpatialUnit CASCADE
  ;
  
  /* Create Tables */
  
  CREATE TABLE i4ldata.t_SpatialUnit
  (
  	UID uuid NOT NULL,
  	Name varchar(255) NOT NULL,
  	Description varchar(255) NULL,
  	LongDescription text NULL,
  	ExtDescriptionURL varchar(255) NULL,
  	ConceptUUID uuid NULL,
  	Level varchar(50) NULL,
  	area numeric(14,4) NULL,
  	dimension varchar(50) NULL   DEFAULT '2D',
  	extAddressID uuid NULL,
  	referencePoint geometry(POINT,SRID) NULL,
  	geometry geometry(POLYGON,SRID) NULL
  )
  ;
  
  /* Create Primary Keys, Indexes, Uniques, Checks */
  
  ALTER TABLE i4ldata.t_SpatialUnit ADD CONSTRAINT PK_t_SpatialUnit
  	PRIMARY KEY (UID)
  ;
  
  CREATE INDEX spx_t_spatialunit ON i4ldata.t_SpatialUnit (using GIST(mbr))
  ;