Project

General

Profile

1
-- MySQL dump 10.13  Distrib 5.5.28, for debian-linux-gnu (x86_64)
2
--
3
-- Host: localhost    Database: salvias_plots
4
-- ------------------------------------------------------
5
-- Server version	5.5.28-0ubuntu0.12.04.2
6

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

    
18
--
19
-- Table structure for table "PlotMetadata"
20
--
21

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

    
99
--
100
-- Table structure for table "PlotObservations"
101
--
102

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

    
177
--
178
-- Table structure for table "log_plot_download"
179
--
180

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

    
196
--
197
-- Table structure for table "lookup_MethodCode"
198
--
199

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

    
210
--
211
-- Table structure for table "lookup_plot_security_levels"
212
--
213

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

    
224
--
225
-- Table structure for table "permissions_plot_user"
226
--
227

    
228
DROP TABLE IF EXISTS "permissions_plot_user";
229
/*!40101 SET @saved_cs_client     = @@character_set_client */;
230
/*!40101 SET character_set_client = utf8 */;
231
CREATE TABLE "permissions_plot_user" (
232
  "plot_id" int(11) NOT NULL DEFAULT '0',
233
  "username" varchar(50) NOT NULL DEFAULT '',
234
  "access_level" mediumint(9) NOT NULL DEFAULT '0',
235
  PRIMARY KEY ("plot_id","username"),
236
  KEY "access_level" ("access_level")
237
);
238
/*!40101 SET character_set_client = @saved_cs_client */;
239

    
240
--
241
-- Table structure for table "plotMetadata"
242
--
243

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

    
320
--
321
-- Table structure for table "projects"
322
--
323

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

    
341
--
342
-- Table structure for table "stems"
343
--
344

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

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

    
379
-- Dump completed on 2012-11-14 15:48:54
(2-2/6)