File tree Expand file tree Collapse file tree 6 files changed +12910
-12884
lines changed Expand file tree Collapse file tree 6 files changed +12910
-12884
lines changed Original file line number Diff line number Diff line change @@ -125,7 +125,6 @@ export type Database = {
125
125
gattung : string | null
126
126
gattung_deutsch : string | null
127
127
geom : unknown | null
128
- gml_id : string | null
129
128
hausnr : string | null
130
129
id : string
131
130
kennzeich : string | null
@@ -154,7 +153,6 @@ export type Database = {
154
153
gattung ?: string | null
155
154
gattung_deutsch ?: string | null
156
155
geom ?: unknown | null
157
- gml_id ?: string | null
158
156
hausnr ?: string | null
159
157
id : string
160
158
kennzeich ?: string | null
@@ -183,7 +181,6 @@ export type Database = {
183
181
gattung ?: string | null
184
182
gattung_deutsch ?: string | null
185
183
geom ?: unknown | null
186
- gml_id ?: string | null
187
184
hausnr ?: string | null
188
185
id ?: string
189
186
kennzeich ?: string | null
@@ -233,6 +230,7 @@ export type Database = {
233
230
Row : {
234
231
amount : number
235
232
id : number
233
+ included_in_map_layer : boolean | null
236
234
timestamp : string
237
235
tree_id : string
238
236
username : string | null
@@ -241,6 +239,7 @@ export type Database = {
241
239
Insert : {
242
240
amount : number
243
241
id ?: number
242
+ included_in_map_layer ?: boolean | null
244
243
timestamp : string
245
244
tree_id : string
246
245
username ?: string | null
@@ -249,6 +248,7 @@ export type Database = {
249
248
Update : {
250
249
amount ?: number
251
250
id ?: number
251
+ included_in_map_layer ?: boolean | null
252
252
timestamp ?: string
253
253
tree_id ?: string
254
254
username ?: string | null
Original file line number Diff line number Diff line change
1
+ ALTER TABLE trees_watered DROP CONSTRAINT fk_trees_watered_trees;
2
+ UPDATE trees_watered SET tree_id = (SELECT gml_id FROM trees WHERE trees .id = trees_watered .tree_id );
3
+
4
+ ALTER TABLE trees_adopted DROP CONSTRAINT fk_trees_adopted_trees;
5
+ UPDATE trees_adopted SET tree_id = (SELECT gml_id FROM trees WHERE trees .id = trees_adopted .tree_id );
6
+
7
+ UPDATE trees SET id = gml_id;
8
+
9
+ ALTER TABLE trees_watered
10
+ ADD CONSTRAINT fk_trees_watered_trees
11
+ FOREIGN KEY (tree_id)
12
+ REFERENCES trees (id)
13
+ ON DELETE CASCADE
14
+ ON UPDATE CASCADE;
15
+
16
+ ALTER TABLE trees_adopted
17
+ ADD CONSTRAINT fk_trees_adopted_trees
18
+ FOREIGN KEY (tree_id)
19
+ REFERENCES trees (id)
20
+ ON DELETE CASCADE
21
+ ON UPDATE CASCADE;
22
+
23
+ ALTER TABLE trees DROP COLUMN gml_id;
24
+
25
+ DROP TRIGGER insert_uuid on public .trees ;
26
+ DROP FUNCTION public .uuid_insert_trigger ;
You can’t perform that action at this time.
0 commit comments