Ghini / ghini.web

web and geo interface to ghini.desktop database
GNU Affero General Public License v3.0
4 stars 1 forks source link

gardens still miss a short id #35

Closed mfrasca closed 6 years ago

mfrasca commented 6 years ago

In ghini.web, mongodb automatically assigns a unique code to all objects, as field _id, and it looks like ObjectId("58557201967f5a8bccdf422b").

:pensive: This is internally useful, but do we want to use it?

In ghini.tour, we ask that sqlite assigns a unique sequential integer number to gardens, field id.

:-1: ¡this is too late!, ghini.tour is a pure data consumer …

ghini.web receives gardens (now it's still from a script, and in perspective it is straight from ghini.desktop)

:question: by the way, where is the script?

and it is ghini.web that has to keep plants, panels, pictures from different gardens associated to the garden.

:construction_worker_man: it is only in ghini.web that we create the garden id. it can't be earlier, because each ghini.desktop instance is isolated, it can't know of its globally unique garden id.

there are two streams into ghini.web:

when we export (botanic) garden data from ghini.desktop into ghini.web (stream d2w), we should let ghini.web define the garden id. and we need to include this information in the gardens export from g.web to g.tour.

but: if we update from the same garden, ghini.web should be able to recognize it's receiving data from a known garden, not from a new one. I suggest we add a uuid to a garden database upon database creation.

when we finally write (non-botanic) garden data (stream g2w4t), we have to manually specify the garden id, or uuid.

mfrasca commented 6 years ago

the new script implementing the stream d2w solves all this, I think.