Database of OTM migration from old otm to new otm

40 views
Skip to first unread message

Surendra Patil

unread,
May 29, 2018, 3:39:37 AM5/29/18
to opentreemap-user
We are trying to migrate data from old instance to new instance but there is a schema difference. Is there a easy way to migrate data in new instance.

I would also like to know about the new fields "eco_rev", "universal_rev" and "canopy_boundary_category" in table "treemap_instance". What values should be inserted in it while migrating from old to new otm database ? 

Justin Walgran

unread,
May 29, 2018, 2:43:49 PM5/29/18
to opentree...@googlegroups.com
There is an otm1_migrator Django application that provides a management command and supporting code for importing fixtures exported from an OTM1 install into and OTM2 instance.  https://github.com/OpenTreeMap/otm-core/tree/develop/opentreemap/otm1_migrator

It is a complex tool and is unfortunately not documented.

The `eco_rev` and `universal_rev` fields are used by OTM2 to control caching of query results. They have a default value of "1" so you will not need to worry about initializing them

canopy_boundary_category is for a tree canopy percentage tracking feature that is not fully implemented. It also has a default empty value, so it will not need to be initialized


On Tue, May 29, 2018 at 12:39 AM, Surendra Patil <meetsure...@gmail.com> wrote:
We are trying to migrate data from old instance to new instance but there is a schema difference. Is there a easy way to migrate data in new instance.

I would also like to know about the new fields "eco_rev", "universal_rev" and "canopy_boundary_category" in table "treemap_instance". What values should be inserted in it while migrating from old to new otm database ? 

--
You received this message because you are subscribed to the Google Groups "opentreemap-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opentreemap-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Surendra Patil

unread,
May 30, 2018, 1:55:42 AM5/30/18
to opentreemap-user
Thank You for the quick response. Will try and get back to you. 
To unsubscribe from this group and stop receiving emails from it, send an email to opentreemap-us...@googlegroups.com.

Surendra Patil

unread,
Jul 19, 2018, 6:36:38 AM7/19/18
to opentreemap-user
I have imported all rows and columns but facing below given issues.


1) On clicking the tree points, details don't appear ().
2) Add tree option got disabled for few locations.
3) On new user registration form submission & forgot password submit, it shows broken page.

Please help me decide which table is rows/columns entry is creating this issue.

Justin Walgran

unread,
Jul 19, 2018, 12:27:28 PM7/19/18
to opentree...@googlegroups.com
1) On clicking the tree points, details don't appear (). 

Check for errors or failed network requests in the browser developer tools.

2) Add tree option got disabled for few locations.

OTM instances have a polygonal boundary and the app prevents adding features outside that boundary. By default the boundary is a 10km square centered on the point that was specified when the instance was created.

Also verify that the logged in user has permission to add planting sites and trees.

3) On new user registration form submission & forgot password submit, it shows broken page.

Check for errors in the browser developer tools.
Check the Django log output in the syslog.

--

Surendra Patil

unread,
Jul 20, 2018, 11:24:10 AM7/20/18
to opentreemap-user
Thanks for the quick reply. We tried to fix the things.

Now the registration/forgot password issue is resolved. Even if new trees are added they are getting added properly and even the details are visible on the page properly.

But for our old trees only the green dots are visible but the details are not appearing on clicking it.

We also tried adding the entries for height, diameter, canopy_height in treemap_audit for the old trees still no luck. We have tried checking almost with all tables & their interconnection in the postgres database.

We just want to know from which table & how the details appear on clicking the green dot (Tree location).



On Tuesday, May 29, 2018 at 1:09:37 PM UTC+5:30, Surendra Patil wrote:

Justin Walgran

unread,
Jul 23, 2018, 12:39:36 PM7/23/18
to opentree...@googlegroups.com
Is an AJAX request appearing in the network tab of the browser developer tools when clicking on an old tree?

Are any errors appearing the browser developer tools console when clicking on an old tree?


--

Surendra Patil

unread,
Jul 23, 2018, 3:17:36 PM7/23/18
to opentreemap-user
Selector not found: input[name="addResourceType"]  in utility.js:90

<city name>/features/1156/accordion 500 (OK)   in jquery.js 8706
<city name>/features/1156//features/1156/popup 500 (OK)     in jquery.js 8706

where 1156 is my tree.

jquery.js has   "xhr.send( ( s.hasContent && s.data ) || null );" on line 8706

Also my searching work properly on old trees, as i search some species name, it fades away the other species. 

Reply all
Reply to author
Forward
0 new messages