forked from otm-india/treemapindia.in
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOTM_treeschema_india.sql~
65 lines (65 loc) · 2.26 KB
/
OTM_treeschema_india.sql~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
CREATE TABLE "treemap_tree" (
"id" serial NOT NULL PRIMARY KEY,
"plot_id" integer NOT NULL REFERENCES "treemap_plot" ("id") DEFERRABLE INITIALLY DEFERRED,
"tree_owner" varchar(256),
"steward_name" varchar(256),
"steward_user_id" integer REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED,
"sponsor" varchar(256),
"species_id" integer REFERENCES "treemap_species" ("id") DEFERRABLE INITIALLY DEFERRED,
"species_other1" varchar(255),
"species_other2" varchar(255),
"orig_species" varchar(256),
"dbh" double precision,
"height" double precision,
"canopy_height" double precision,
"date_planted" date,
"date_removed" date,
"present" boolean NOT NULL,
"last_updated" timestamp with time zone NOT NULL,
"last_updated_by_id" integer NOT NULL REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED,
"s_order" integer,
"photo_count" integer,
"projects" varchar(20),
"import_event_id" integer NOT NULL REFERENCES "treemap_importevent" ("id") DEFERRABLE INITIALLY DEFERRED,
"condition" varchar(256),
"canopy_condition" varchar(256),
"readonly" boolean NOT NULL,
"url" varchar(255),
"pests" varchar(256),
"tree_number" integer,
"prabhagid" integer,
"clusterid" integer,
"propertyid" varchar(256),
"girth_m" integer,
"height_m" integer,
"nest" varchar(256),
"burrows" varchar(256),
"flowers" varchar(256),
"fruits" varchar(256),
"nails" varchar(256),
"poster" varchar(256),
"wires" varchar(256),
"tree_guard" varchar(256),
"other_nuisance" boolean NOT NULL,
"other_nuisance_desc" varchar(256),
"health_of_tree" varchar(256),
"ground_type" varchar(256),
"ground_desc" varchar(256),
"risk_due_to_tree" varchar(256),
"risc_desc" varchar(256),
"refer_to_dept" varchar(256),
"special_other" varchar(256),
"special_other_desc" varchar(256),
"latitude" double precision,
"longitude" double precision,
"creation_date" timestamp with time zone,
"device_id" varchar(12),
"surveyor_id" varchar(256),
"session_id" integer,
"photo_focused1" varchar(100),
"photo_focused2" varchar(100),
"photo_panorama1" varchar(100),
"photo_panorama2" varchar(100),
"photo_other" varchar(100)
)
;