Project

General

Profile

1
SET standard_conforming_strings = off;
2
SET escape_string_warning = off;
3
-- MySQL dump 10.13  Distrib 5.5.28, for debian-linux-gnu (x86_64)
4
--
5
-- Host: localhost    Database: salvias_plots
6
-- ------------------------------------------------------
7
-- Server version	5.5.28-0ubuntu0.12.04.2
8

    
9
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
10
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
11
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
12
SET NAMES 'latin1';
13
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
14
/*!40103 SET TIME_ZONE='+00:00' */;
15
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
16
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
17
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,POSTGRESQL' */;
18
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
19

    
20
--
21
-- Table structure for table "PlotMetadata"
22
--
23

    
24
DROP TABLE IF EXISTS "PlotMetadata";
25
/*!40101 SET @saved_cs_client     = @@character_set_client */;
26
/*!40101 SET character_set_client = utf8 */;
27
CREATE TABLE "PlotMetadata" (
28
  "PlotID" integer NOT NULL,
29
  "orig_filename" text,
30
  "AccessCode" integer DEFAULT NULL,
31
  "project_id" integer DEFAULT NULL,
32
  "PrimOwnerID" varchar(30) DEFAULT NULL,
33
  "SiteCode" varchar(100) DEFAULT NULL,
34
  "SiteName" varchar(150) DEFAULT NULL,
35
  "new_world" char(3) DEFAULT NULL,
36
  "MajorGeo" varchar(255) DEFAULT NULL,
37
  "Country" varchar(80) DEFAULT NULL,
38
  "PolDiv1" varchar(50) DEFAULT NULL,
39
  "pol1_type" varchar(25) DEFAULT NULL,
40
  "pol2" varchar(50) DEFAULT NULL,
41
  "pol2_type" varchar(25) DEFAULT NULL,
42
  "lat_string" varchar(100) DEFAULT NULL,
43
  "long_string" varchar(100) DEFAULT NULL,
44
  "LatDec" float DEFAULT NULL,
45
  "LongDec" float DEFAULT NULL,
46
  "lat_long_accuracy" varchar(255) DEFAULT NULL,
47
  "Elev" float DEFAULT NULL,
48
  "elev_max_m" float DEFAULT NULL,
49
  "elev_min_m" float DEFAULT NULL,
50
  "Precip" float DEFAULT NULL,
51
  "ElevSource" float DEFAULT NULL,
52
  "Temp" float DEFAULT NULL,
53
  "PrecipSource" float DEFAULT NULL,
54
  "TempSource" varchar(255) DEFAULT NULL,
55
  "bearing" double precision DEFAULT NULL,
56
  "slope_aspect" varchar(10) DEFAULT NULL,
57
  "slope_gradient" integer DEFAULT NULL,
58
  "clay_percent" float DEFAULT NULL,
59
  "silt_percent" float DEFAULT NULL,
60
  "sand_percent" float DEFAULT NULL,
61
  "pH" float DEFAULT NULL,
62
  "soil_N" varchar(20) DEFAULT NULL,
63
  "soil_P" varchar(20) DEFAULT NULL,
64
  "soil_C" varchar(20) DEFAULT NULL,
65
  "soil_K" varchar(20) DEFAULT NULL,
66
  "soil_Mg" varchar(20) DEFAULT NULL,
67
  "soil_Ca" varchar(20) DEFAULT NULL,
68
  "soil_Na" varchar(20) DEFAULT NULL,
69
  "soil_acidity" varchar(20) DEFAULT NULL,
70
  "soil_base" varchar(20) DEFAULT NULL,
71
  "soil_cation_cap" varchar(20) DEFAULT NULL,
72
  "soil_conductivity" varchar(20) DEFAULT NULL,
73
  "organic_percent" float DEFAULT NULL,
74
  "soil_texture" varchar(20) DEFAULT NULL,
75
  "RevisionComments" varchar(255) DEFAULT NULL,
76
  "Locality_Description" varchar(250) DEFAULT NULL,
77
  "topography_desc" varchar(250) DEFAULT NULL,
78
  "vegetation_1" varchar(255) DEFAULT NULL,
79
  "vegetation_2" varchar(255) DEFAULT NULL,
80
  "Habitat" varchar(250) DEFAULT NULL,
81
  "life_zone_code" varchar(10) DEFAULT NULL,
82
  "life_zone" varchar(150) DEFAULT NULL,
83
  "PlotMethod" varchar(250) DEFAULT NULL,
84
  "MethodCode" integer DEFAULT NULL,
85
  "plot_area_ha" float DEFAULT NULL,
86
  "recensused" char(3) DEFAULT NULL,
87
  "date_start" varchar(20) DEFAULT NULL,
88
  "date_finish" varchar(20) DEFAULT NULL,
89
  "plot_administrator" varchar(30) DEFAULT NULL,
90
  "plot_notes" text,
91
  "tmp_del" char(3) DEFAULT NULL,
92
  PRIMARY KEY ("PlotID"),
93
  /*KEY "Country" ("Country")*/CHECK (true),
94
  /*KEY "PrimOwnerID" ("PrimOwnerID")*/CHECK (true),
95
  /*KEY "plot_administrator" ("plot_administrator")*/CHECK (true),
96
  /*KEY "project_id" ("project_id")*/CHECK (true),
97
  /*KEY "tmp_del" ("tmp_del")*/CHECK (true)
98
);
99
/*!40101 SET character_set_client = @saved_cs_client */;
100

    
101
--
102
-- Table structure for table "PlotObservations"
103
--
104

    
105
DROP TABLE IF EXISTS "PlotObservations";
106
/*!40101 SET @saved_cs_client     = @@character_set_client */;
107
/*!40101 SET character_set_client = utf8 */;
108
CREATE TABLE "PlotObservations" (
109
  "PlotObsID" integer NOT NULL,
110
  "PlotID" integer DEFAULT NULL,
111
  "PlotCode" varchar(50) DEFAULT NULL,
112
  "census_no" integer DEFAULT NULL,
113
  "census_date" varchar(20) DEFAULT NULL,
114
  "OrigRecordID" integer DEFAULT NULL,
115
  "Line" varchar(50) DEFAULT NULL,
116
  "Ind" integer DEFAULT NULL,
117
  "ind_id" varchar(11) DEFAULT NULL,
118
  "tag1" varchar(10) DEFAULT NULL,
119
  "tag2" varchar(10) DEFAULT NULL,
120
  "x_position" integer DEFAULT NULL,
121
  "y_position" integer DEFAULT NULL,
122
  "dist" double precision DEFAULT NULL,
123
  "perp_dist" varchar(5) DEFAULT NULL,
124
  "SourceVoucher" varchar(100) DEFAULT NULL,
125
  "coll_number" varchar(50) DEFAULT NULL,
126
  "collector_code" varchar(20) DEFAULT NULL,
127
  "coll_inits" varchar(8) DEFAULT NULL,
128
  "coll_lastname" varchar(50) DEFAULT NULL,
129
  "coll_firstname" varchar(50) DEFAULT NULL,
130
  "DetType" varchar(255) DEFAULT NULL,
131
  "det_by" varchar(250) DEFAULT NULL,
132
  "fam_status" integer DEFAULT NULL,
133
  "gen_status" integer DEFAULT NULL,
134
  "name_status" integer DEFAULT NULL,
135
  "SpAuthStatus" integer DEFAULT NULL,
136
  "Family" varchar(255) DEFAULT NULL,
137
  "Genus" varchar(255) DEFAULT NULL,
138
  "GenAuth" varchar(255) DEFAULT NULL,
139
  "Species" varchar(255) DEFAULT NULL,
140
  "auth" varchar(255) DEFAULT NULL,
141
  "infra_rank_1" varchar(6) DEFAULT NULL,
142
  "infra_ep_1" varchar(150) DEFAULT NULL,
143
  "infra_auth_1" varchar(150) DEFAULT NULL,
144
  "common_name" varchar(100) DEFAULT NULL,
145
  "morphoname" varchar(200) DEFAULT NULL,
146
  "species_code" varchar(50) DEFAULT NULL,
147
  "Habit" varchar(50) DEFAULT NULL,
148
  "height_class" varchar(20) DEFAULT NULL,
149
  "height_m" float DEFAULT NULL,
150
  "height_m_commercial" float DEFAULT NULL,
151
  "ht_first_branch_m" double precision DEFAULT NULL,
152
  "NoInd" integer DEFAULT NULL,
153
  "cover_percent" decimal(7,2) DEFAULT NULL,
154
  "intercept_cm" double precision DEFAULT NULL,
155
  "cfaff" varchar(10) DEFAULT NULL,
156
  "other_annotations" varchar(250) DEFAULT NULL,
157
  "morphocf" varchar(10) DEFAULT NULL,
158
  "IsMorpho" integer DEFAULT NULL,
159
  "OrigFamily" varchar(100) DEFAULT NULL,
160
  "OrigGenus" varchar(100) DEFAULT NULL,
161
  "OrigSpecies" varchar(255) DEFAULT NULL,
162
  "OrigAuth" varchar(250) DEFAULT NULL,
163
  "phenology" varchar(250) DEFAULT NULL,
164
  "canopy_position" varchar(50) DEFAULT NULL,
165
  "canopy_form" varchar(50) DEFAULT NULL,
166
  "liana_infestation" varchar(50) DEFAULT NULL,
167
  "Notes" text,
168
  "tmp_PlotObsID" integer DEFAULT NULL,
169
  "temp_dbh" double precision DEFAULT NULL,
170
  "temp_liandbh" double precision DEFAULT NULL,
171
  "tmp_del" char(3) DEFAULT NULL,
172
  PRIMARY KEY ("PlotObsID"),
173
  /*KEY "PlotID" ("PlotID")*/CHECK (true),
174
  /*KEY "tmp_del" ("tmp_del")*/CHECK (true),
175
  /*KEY "tmp_PlotObsID" ("tmp_PlotObsID")*/CHECK (true)
176
);
177
/*!40101 SET character_set_client = @saved_cs_client */;
178

    
179
--
180
-- Table structure for table "log_plot_download"
181
--
182

    
183
DROP TABLE IF EXISTS "log_plot_download";
184
/*!40101 SET @saved_cs_client     = @@character_set_client */;
185
/*!40101 SET character_set_client = utf8 */;
186
CREATE TABLE "log_plot_download" (
187
  "EnteredBy" varchar(14) NOT NULL DEFAULT '',
188
  "download_timestamp" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
189
  "ip" varchar(21) NOT NULL DEFAULT '',
190
  "plot_id" integer DEFAULT NULL,
191
  "plot_administrator" varchar(30) NOT NULL DEFAULT '',
192
  "project_id" integer NOT NULL DEFAULT '0',
193
  PRIMARY KEY ("EnteredBy","download_timestamp"),
194
  /*KEY "plot_administrator" ("plot_administrator","project_id")*/CHECK (true)
195
);
196
/*!40101 SET character_set_client = @saved_cs_client */;
197

    
198
--
199
-- Table structure for table "lookup_MethodCode"
200
--
201

    
202
DROP TABLE IF EXISTS "lookup_MethodCode";
203
/*!40101 SET @saved_cs_client     = @@character_set_client */;
204
/*!40101 SET character_set_client = utf8 */;
205
CREATE TABLE "lookup_MethodCode" (
206
  "MethodCode" integer NOT NULL DEFAULT '0',
207
  "Description" varchar(80) NOT NULL DEFAULT '',
208
  PRIMARY KEY ("MethodCode")
209
);
210
/*!40101 SET character_set_client = @saved_cs_client */;
211

    
212
--
213
-- Table structure for table "lookup_plot_security_levels"
214
--
215

    
216
DROP TABLE IF EXISTS "lookup_plot_security_levels";
217
/*!40101 SET @saved_cs_client     = @@character_set_client */;
218
/*!40101 SET character_set_client = utf8 */;
219
CREATE TABLE "lookup_plot_security_levels" (
220
  "level" integer NOT NULL DEFAULT '0',
221
  "description" varchar(30) NOT NULL DEFAULT '',
222
  PRIMARY KEY ("level")
223
);
224
/*!40101 SET character_set_client = @saved_cs_client */;
225

    
226
--
227
-- Table structure for table "permissions_plot_user"
228
--
229

    
230
DROP TABLE IF EXISTS "permissions_plot_user";
231
/*!40101 SET @saved_cs_client     = @@character_set_client */;
232
/*!40101 SET character_set_client = utf8 */;
233
CREATE TABLE "permissions_plot_user" (
234
  "plot_id" integer NOT NULL DEFAULT '0',
235
  "username" varchar(50) NOT NULL DEFAULT '',
236
  "access_level" integer NOT NULL DEFAULT '0',
237
  PRIMARY KEY ("plot_id","username"),
238
  /*KEY "access_level" ("access_level")*/CHECK (true)
239
);
240
/*!40101 SET character_set_client = @saved_cs_client */;
241

    
242
--
243
-- Table structure for table "plotMetadata"
244
--
245

    
246
DROP TABLE IF EXISTS "plotMetadata";
247
/*!40101 SET @saved_cs_client     = @@character_set_client */;
248
/*!40101 SET character_set_client = utf8 */;
249
CREATE TABLE "plotMetadata" (
250
  "PlotID" integer NOT NULL,
251
  "orig_filename" text,
252
  "AccessCode" integer DEFAULT NULL,
253
  "project_id" integer DEFAULT NULL,
254
  "PrimOwnerID" varchar(30) DEFAULT NULL,
255
  "SiteCode" varchar(100) DEFAULT NULL,
256
  "SiteName" varchar(150) DEFAULT NULL,
257
  "new_world" char(3) DEFAULT NULL,
258
  "MajorGeo" varchar(255) DEFAULT NULL,
259
  "Country" varchar(80) DEFAULT NULL,
260
  "PolDiv1" varchar(50) DEFAULT NULL,
261
  "pol1_type" varchar(25) DEFAULT NULL,
262
  "pol2" varchar(50) DEFAULT NULL,
263
  "pol2_type" varchar(25) DEFAULT NULL,
264
  "lat_string" varchar(20) DEFAULT NULL,
265
  "long_string" varchar(20) DEFAULT NULL,
266
  "LatDec" float DEFAULT NULL,
267
  "LongDec" float DEFAULT NULL,
268
  "lat_long_accuracy" varchar(255) DEFAULT NULL,
269
  "Elev" float DEFAULT NULL,
270
  "elev_max_m" float DEFAULT NULL,
271
  "elev_min_m" float DEFAULT NULL,
272
  "Precip" float DEFAULT NULL,
273
  "ElevSource" float DEFAULT NULL,
274
  "Temp" float DEFAULT NULL,
275
  "PrecipSource" float DEFAULT NULL,
276
  "TempSource" varchar(255) DEFAULT NULL,
277
  "bearing" double precision DEFAULT NULL,
278
  "slope_aspect" varchar(10) DEFAULT NULL,
279
  "slope_gradient" integer DEFAULT NULL,
280
  "clay_percent" float DEFAULT NULL,
281
  "silt_percent" float DEFAULT NULL,
282
  "sand_percent" float DEFAULT NULL,
283
  "pH" float DEFAULT NULL,
284
  "soil_N" varchar(20) DEFAULT NULL,
285
  "soil_P" varchar(20) DEFAULT NULL,
286
  "soil_C" varchar(20) DEFAULT NULL,
287
  "soil_K" varchar(20) DEFAULT NULL,
288
  "soil_Mg" varchar(20) DEFAULT NULL,
289
  "soil_Ca" varchar(20) DEFAULT NULL,
290
  "soil_Na" varchar(20) DEFAULT NULL,
291
  "soil_acidity" varchar(20) DEFAULT NULL,
292
  "soil_base" varchar(20) DEFAULT NULL,
293
  "soil_cation_cap" varchar(20) DEFAULT NULL,
294
  "soil_conductivity" varchar(20) DEFAULT NULL,
295
  "organic_percent" float DEFAULT NULL,
296
  "soil_texture" varchar(20) DEFAULT NULL,
297
  "RevisionComments" varchar(255) DEFAULT NULL,
298
  "Locality_Description" varchar(250) DEFAULT NULL,
299
  "topography_desc" varchar(250) DEFAULT NULL,
300
  "vegetation_1" varchar(255) DEFAULT NULL,
301
  "vegetation_2" varchar(255) DEFAULT NULL,
302
  "Habitat" varchar(250) DEFAULT NULL,
303
  "life_zone_code" varchar(10) DEFAULT NULL,
304
  "life_zone" varchar(150) DEFAULT NULL,
305
  "PlotMethod" varchar(250) DEFAULT NULL,
306
  "MethodCode" integer DEFAULT NULL,
307
  "plot_area_ha" float DEFAULT NULL,
308
  "recensused" char(3) DEFAULT NULL,
309
  "date_start" varchar(20) DEFAULT NULL,
310
  "date_finish" varchar(20) DEFAULT NULL,
311
  "plot_administrator" varchar(30) DEFAULT NULL,
312
  "plot_notes" text,
313
  "tmp_del" char(3) DEFAULT NULL,
314
  PRIMARY KEY ("PlotID"),
315
  /*KEY "Country" ("Country")*/CHECK (true),
316
  /*KEY "PrimOwnerID" ("PrimOwnerID")*/CHECK (true),
317
  /*KEY "plot_administrator" ("plot_administrator")*/CHECK (true),
318
  /*KEY "project_id" ("project_id")*/CHECK (true)
319
);
320
/*!40101 SET character_set_client = @saved_cs_client */;
321

    
322
--
323
-- Table structure for table "projects"
324
--
325

    
326
DROP TABLE IF EXISTS "projects";
327
/*!40101 SET @saved_cs_client     = @@character_set_client */;
328
/*!40101 SET character_set_client = utf8 */;
329
CREATE TABLE "projects" (
330
  "project_id" integer NOT NULL,
331
  "project_name" varchar(255) NOT NULL DEFAULT '',
332
  "project_pi" varchar(30) NOT NULL DEFAULT '',
333
  "allow_download_all" integer NOT NULL DEFAULT '0',
334
  "ipr_specific" text,
335
  "ipr_specific_updated" date DEFAULT NULL,
336
  PRIMARY KEY ("project_id"),
337
  /*KEY "project_name" ("project_name")*/CHECK (true),
338
  /*KEY "on_project_list" ("allow_download_all")*/CHECK (true),
339
  /*KEY "project_distinct" ("project_id","project_name","project_pi")*/CHECK (true)
340
);
341
/*!40101 SET character_set_client = @saved_cs_client */;
342

    
343
--
344
-- Table structure for table "stems"
345
--
346

    
347
DROP TABLE IF EXISTS "stems";
348
/*!40101 SET @saved_cs_client     = @@character_set_client */;
349
/*!40101 SET character_set_client = utf8 */;
350
CREATE TABLE "stems" (
351
  "stem_id" integer NOT NULL,
352
  "origrecord_id_stems" integer DEFAULT NULL,
353
  "PlotObsID" integer DEFAULT NULL,
354
  "NoInd" integer DEFAULT '0',
355
  "basal_diam" double precision DEFAULT NULL,
356
  "stem_dbh" double precision DEFAULT NULL,
357
  "gentry_dbh" double precision DEFAULT NULL,
358
  "stem_notes" text,
359
  "stem_tag1" varchar(20) DEFAULT NULL,
360
  "stem_tag2" varchar(20) DEFAULT NULL,
361
  "stem_height_m" double precision DEFAULT NULL,
362
  "stem_height_first_branch_m" double precision DEFAULT NULL,
363
  "stem_canopy_form" varchar(50) DEFAULT NULL,
364
  "stem_canopy_position" varchar(50) DEFAULT NULL,
365
  "stem_liana_infestation" varchar(50) DEFAULT NULL,
366
  "tmp_del" char(3) DEFAULT NULL,
367
  PRIMARY KEY ("stem_id"),
368
  /*KEY "plotobs_id" ("PlotObsID")*/CHECK (true)
369
);
370
/*!40101 SET character_set_client = @saved_cs_client */;
371
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
372

    
373
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
374
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
375
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
376
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
377
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
378
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
379
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
380

    
381
-- Dump completed on 2012-11-14 15:48:54
(3-3/7)