MeshAddicts / meshinfo

Realtime web UI to run against a Meshtastic regional or private mesh network.
https://svm1.meshinfo.network
46 stars 11 forks source link

Initial SQL #9

Closed kevinelliott closed 3 months ago

kevinelliott commented 4 months ago

This is a draft PR intentionally so that we can discuss and shape this initial SQL pass.

ab0oo commented 4 months ago

We need to ensure the indices are created, as well. I think there are some table joins in the views that require indices or they just explode. Also, there's at least one sequence in there, but it might be autogenerated at table create time. We also need to make sure table ownership is correct. I guess that can be handled by the create script when the DB is instantiated.

kevinelliott commented 4 months ago

We need to ensure the indices are created, as well. I think there are some table joins in the views that require indices or they just explode. Also, there's at least one sequence in there, but it might be autogenerated at table create time. We also need to make sure table ownership is correct. I guess that can be handled by the create script when the DB is instantiated.

Indeed, indexes. Feel free to take a pass here and push up a commit if you have a moment. Otherwise, I can tackle. I was mostly waiting until we solidified the structure.

kevinelliott commented 4 months ago

@ab0oo Of course this PR is based on a logical "merging" of each of our original schemas, with the intention to provide similar capabilities while also preserving history data. I would think we'll need a few more tables and perhaps a couple more views.

daviesgeek commented 3 months ago

This looks good to me, i'm lacking a lot of context of the data structures though, so take my input with a grain of salt.

kevinelliott commented 3 months ago

Merging as initial SQL but we can adjust and add to in follow ups.