Project

General

Profile

« Previous | Next » 

Revision 3163

schemas/vegbien.sql: location: Dropped unique constraint on lat/long because it covered only some rows, which interfered with column-based import's selection of different insert methods based on the presence or absence of duplicate keys. (With the constraint, locations with coordinates would have duplicates eliminated, but locations without coordinates would not be able to find which row was added for a particular location because there was no lookup key to join on, and would all just use the first inserted row.) The previous behavior didn't make much sense anyway, because it would assert that two locationevents occurred in the same place just because they had the same coordinates, which may not have been precise enough to make this determination. Asserting that two locationevents occurred in the same place is really part of the secondary validation, not the import process.

View differences:

vegbien.my.sql
3119 3119

  
3120 3120

  
3121 3121
--
3122
-- Name: location_unique_coords; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3123
--
3124

  
3125
ALTER TABLE location
3126
    ADD CONSTRAINT location_unique_coords UNIQUE (centerlatitude, centerlongitude);
3127

  
3128

  
3129
--
3130 3122
-- Name: location_unique_subplot_coords; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 
3131 3123
--
3132 3124

  
......
4149 4141

  
4150 4142

  
4151 4143
--
4152
-- Name: location_coords; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4153
--
4154

  
4155

  
4156

  
4157

  
4158
--
4159 4144
-- Name: location_parent_id_x; Type: INDEX; Schema: public; Owner: -; Tablespace: 
4160 4145
--
4161 4146

  

Also available in: Unified diff