hicheck_db_parts.sql 392 B

123456789101112131415161718192021
  1. DROP TABLE IF EXISTS hicheck.parts;
  2. DROP TABLE IF EXISTS parts;
  3. CREATE TABLE parts (
  4. id SERIAL,
  5. tstamp TIMESTAMP default CURRENT_TIMESTAMP,
  6. hi_user_id text NOT NULL,
  7. note text,
  8. type int,
  9. date varchar(10)
  10. );
  11. SELECT AddGeometryColumn('parts','geom',4326,'LINESTRING',2);
  12. ALTER TABLE ONLY parts ADD CONSTRAINT pk_parts PRIMARY KEY (id);
  13. ALTER TABLE parts SET SCHEMA hicheck;