Project

General

Profile

« Previous | Next » 

Revision 5863

schemas/vegbien.sql: Removed no longer used locationcoords

View differences:

schemas/vegbien.my.sql
1757 1757

  
1758 1758

  
1759 1759
--
1760
-- Name: locationcoords; Type: TABLE; Schema: public; Owner: -; Tablespace: 
1761
--
1762

  
1763
CREATE TABLE locationcoords (
1764
    locationcoords_id int(11) NOT NULL,
1765
    location_id int(11) NOT NULL,
1766
    latitude_deg double precision,
1767
    longitude_deg double precision,
1768
    verbatimlatitude text,
1769
    verbatimlongitude text,
1770
    verbatimcoordinates text,
1771
    footprintgeometry_dwc text,
1772
    coordsaccuracy_deg double precision,
1773
    identifier_id int(11),
1774
    determinationdate date,
1775
    isoriginal int(1) DEFAULT false NOT NULL,
1776
    iscurrent int(1) DEFAULT false NOT NULL,
1777
    calculated int(1)
1778
);
1779

  
1780

  
1781
--
1782
-- Name: COLUMN locationcoords.footprintgeometry_dwc; Type: COMMENT; Schema: public; Owner: -
1783
--
1784

  
1785

  
1786

  
1787

  
1788
--
1789
-- Name: COLUMN locationcoords.coordsaccuracy_deg; Type: COMMENT; Schema: public; Owner: -
1790
--
1791

  
1792

  
1793

  
1794

  
1795
--
1796
-- Name: locationcoords_locationcoords_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1797
--
1798

  
1799

  
1800

  
1801

  
1802
--
1803
-- Name: locationcoords_locationcoords_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1804
--
1805

  
1806

  
1807

  
1808

  
1809
--
1810 1760
-- Name: locationevent_locationevent_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1811 1761
--
1812 1762

  
......
3068 3018

  
3069 3019

  
3070 3020
--
3071
-- Name: locationcoords_id; Type: DEFAULT; Schema: public; Owner: -
3072
--
3073

  
3074

  
3075

  
3076

  
3077
--
3078 3021
-- Name: locationevent_id; Type: DEFAULT; Schema: public; Owner: -
3079 3022
--
3080 3023

  
......
3538 3481

  
3539 3482

  
3540 3483
--
3541
-- Name: locationcoords_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3542
--
3543

  
3544
ALTER TABLE locationcoords
3545
    ADD CONSTRAINT locationcoords_pkey PRIMARY KEY (locationcoords_id);
3546

  
3547

  
3548
--
3549 3484
-- Name: locationevent_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3550 3485
--
3551 3486

  
......
4074 4009

  
4075 4010

  
4076 4011
--
4077
-- Name: locationcoords_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4078
--
4079

  
4080

  
4081

  
4082

  
4083
--
4084 4012
-- Name: locationevent_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4085 4013
--
4086 4014

  
......
4789 4717

  
4790 4718

  
4791 4719
--
4792
-- Name: locationcoords_identifier_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4793
--
4794

  
4795

  
4796

  
4797

  
4798
--
4799
-- Name: locationcoords_location_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4800
--
4801

  
4802
ALTER TABLE locationcoords
4803
    ADD CONSTRAINT locationcoords_location_id_fkey FOREIGN KEY (location_id) REFERENCES location(location_id) ON UPDATE CASCADE ON DELETE CASCADE;
4804

  
4805

  
4806
--
4807 4720
-- Name: locationevent_creator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
4808 4721
--
4809 4722

  
schemas/vegbien.sql
2386 2386

  
2387 2387

  
2388 2388
--
2389
-- Name: locationcoords; Type: TABLE; Schema: public; Owner: -; Tablespace: 
2390
--
2391

  
2392
CREATE TABLE locationcoords (
2393
    locationcoords_id integer NOT NULL,
2394
    location_id integer NOT NULL,
2395
    latitude_deg double precision,
2396
    longitude_deg double precision,
2397
    verbatimlatitude text,
2398
    verbatimlongitude text,
2399
    verbatimcoordinates text,
2400
    footprintgeometry_dwc text,
2401
    coordsaccuracy_deg double precision,
2402
    identifier_id integer,
2403
    determinationdate date,
2404
    isoriginal boolean DEFAULT false NOT NULL,
2405
    iscurrent boolean DEFAULT false NOT NULL,
2406
    calculated boolean
2407
);
2408

  
2409

  
2410
--
2411
-- Name: COLUMN locationcoords.footprintgeometry_dwc; Type: COMMENT; Schema: public; Owner: -
2412
--
2413

  
2414
COMMENT ON COLUMN locationcoords.footprintgeometry_dwc IS 'DwC''s footprintWKT field. "A Well-Known Text (WKT) representation of the shape (footprint, geometry) that defines the Location" (http://rs.tdwg.org/dwc/terms/#footprintWKT).';
2415

  
2416

  
2417
--
2418
-- Name: COLUMN locationcoords.coordsaccuracy_deg; Type: COMMENT; Schema: public; Owner: -
2419
--
2420

  
2421
COMMENT ON COLUMN locationcoords.coordsaccuracy_deg IS 'Accuracy of latitude/longitude or footprint geometry, in meters. This should generally be at least 1 m, which is the accuracy of the best GPSes.';
2422

  
2423

  
2424
--
2425
-- Name: locationcoords_locationcoords_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2426
--
2427

  
2428
CREATE SEQUENCE locationcoords_locationcoords_id_seq
2429
    START WITH 1
2430
    INCREMENT BY 1
2431
    NO MINVALUE
2432
    NO MAXVALUE
2433
    CACHE 1;
2434

  
2435

  
2436
--
2437
-- Name: locationcoords_locationcoords_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
2438
--
2439

  
2440
ALTER SEQUENCE locationcoords_locationcoords_id_seq OWNED BY locationcoords.locationcoords_id;
2441

  
2442

  
2443
--
2444 2389
-- Name: locationevent_locationevent_id_seq; Type: SEQUENCE; Schema: public; Owner: -
2445 2390
--
2446 2391

  
......
3919 3864

  
3920 3865

  
3921 3866
--
3922
-- Name: locationcoords_id; Type: DEFAULT; Schema: public; Owner: -
3923
--
3924

  
3925
ALTER TABLE locationcoords ALTER COLUMN locationcoords_id SET DEFAULT nextval('locationcoords_locationcoords_id_seq'::regclass);
3926

  
3927

  
3928
--
3929 3867
-- Name: locationevent_id; Type: DEFAULT; Schema: public; Owner: -
3930 3868
--
3931 3869

  
......
4389 4327

  
4390 4328

  
4391 4329
--
4392
-- Name: locationcoords_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4393
--
4394

  
4395
ALTER TABLE ONLY locationcoords
4396
    ADD CONSTRAINT locationcoords_pkey PRIMARY KEY (locationcoords_id);
4397

  
4398

  
4399
--
4400 4330
-- Name: locationevent_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
4401 4331
--
4402 4332

  
......
4925 4855

  
4926 4856

  
4927 4857
--
4928
-- Name: locationcoords_unique; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4929
--
4930

  
4931
CREATE UNIQUE INDEX locationcoords_unique ON locationcoords USING btree (location_id, (COALESCE(identifier_id, 2147483647)));
4932

  
4933

  
4934
--
4935 4858
-- Name: locationevent_accessioncode_index; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4936 4859
--
4937 4860

  
......
5655 5578

  
5656 5579

  
5657 5580
--
5658
-- Name: locationcoords_identifier_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5659
--
5660

  
5661
ALTER TABLE ONLY locationcoords
5662
    ADD CONSTRAINT locationcoords_identifier_id_fkey FOREIGN KEY (identifier_id) REFERENCES party(party_id) ON UPDATE CASCADE ON DELETE CASCADE;
5663

  
5664

  
5665
--
5666
-- Name: locationcoords_location_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5667
--
5668

  
5669
ALTER TABLE ONLY locationcoords
5670
    ADD CONSTRAINT locationcoords_location_id_fkey FOREIGN KEY (location_id) REFERENCES location(location_id) ON UPDATE CASCADE ON DELETE CASCADE;
5671

  
5672

  
5673
--
5674 5581
-- Name: locationevent_creator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
5675 5582
--
5676 5583

  

Also available in: Unified diff