Comments (3)
using [SQLite] and [MySQL] stanzas has a well-defined upgrade path; we can automatically convert existing weewx.conf files.
so the default weewx.conf would look like this:
[Databases]
[[archive_sqlite]]
database_name = weewx.sdb
driver = weedb.sqlite
[[archive_mysql]]
database_name = weewx
driver = weedb.mysql
and a user could override the sqlite database location for a single database like this:
[Database]
[[custom_sqlite]]
database_name = /home/username/custom.sdb
driver = weedb.sqlite
or like this:
[Database]
[[custom_sqlite]]
SQLITE_ROOT = /home/username
database_name = custom.sdb
driver = weedb.sqlite
or override mysql login credentials like this (still using the same 'localhost' defined in the [MySQL] stanza):
[Database]
[[custom_mysql]]
database_name = custom
user = username
password = pw
driver = weedb.mysql
so the minimal definition for an extension (specified in install.py) would be this:
[Databases]
[[cmon_sqlite]]
database_name = cmon.sdb
driver = weedb.sqlite
[[cmon_mysql]]
database_name = cmon
driver = weedb.mysql
from weewx.
Exactly.
One correction: on my earlier post, I proposed including the driver in the [SQLite] and [MySQL] stanzas. That won't work because, right now, the driver name is the only way to identify what kind of database it is.
We can either do things the way you outline above, or introduce yet another level of indirection:
[Databases]
[[cmon_sqlite]]
database_name = cmon.sdb
database_type = SQLite
[[cmon_mysql]]
database_name = cmon
database_type = MySQL
where option database_type
has to match a stanza name.
from weewx.
Fixed in V3.2. With the addition of [SQLite] and [MySQL], the installer has become much simpler.
Closing issue.
from weewx.
Related Issues (20)
- 5.0.1 and 5.0.2 upgrades via deb breaking rsync id_rsa key HOT 2
- Add current user/group and group membership to startup logging
- station registration silently fails if hardware_name is not a @property HOT 3
- including new instruments HOT 1
- `weewx.xtypes.XTypeTable.get_aggregate()` is very very slow HOT 8
- [Fix pending] Upgrades broken on Fedora due to epel-release dependency HOT 1
- 29th February and `archiveSpanSpan` HOT 5
- weewx v5.0.2 PID file? HOT 7
- weewx.conf apt upgrade keep overwrites station_type HOT 5
- Reopen #247 HOT 1
- WeeWX starts before clock correct when using ntp HOT 12
- Running WeeWX as executable (for apparmor use) HOT 7
- Upgrade setting permissions on weewx.conf HOT 6
- WMR300 permission error HOT 3
- "Total Rain" is shown now for 1 hour on the next day since daylight saving HOT 14
- Add RSync options capability - exclude files/directories HOT 1
- Bug in Debian postinst prevent installing 5.0.2 debs HOT 2
- issues with wee_extensions install HOT 1
- View from Reports / NOAA (Belchertown Skin) HOT 4
- Problems with "Zambretti" forecast HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weewx.