Adding database columns on WeeWX3.9.1?

126 views
Skip to first unread message

Patrick Mendiuk

unread,
Jan 24, 2022, 2:10:50 PM1/24/22
to weewx-user
I have an existing WeeWX 3.9.1 install with the Belchertown skin that has been working great.  I would like to add some additional database columns and I can't find the old WeeWX documentation for adding database columns.  Everything I have found refers to WeeWX 4.5 and the new --add-column command.

Thanks
Patrick

vince

unread,
Jan 24, 2022, 2:36:14 PM1/24/22
to weewx-user
That version is almost 3 years old. I'd suggest you simply upgrade to the current version.

The current weewx also has the wview_extended schema  (link) which has 'many' more fields defined.
It's possible the ones you want to add are already defined in it.


Patrick Mendiuk

unread,
Jan 24, 2022, 2:55:38 PM1/24/22
to weewx-user
I'm just worried about breaking things with upgrading.

vince

unread,
Jan 24, 2022, 4:16:30 PM1/24/22
to weewx-user
On Monday, January 24, 2022 at 11:55:38 AM UTC-8 pmen...@gmail.com wrote:
I'm just worried about breaking things with upgrading.


Hundreds of people have succeeded in doing so....and it's simpler and less risky than doing what you're asking about altering the v3 database.

Just do a backup of the important stuff first....see https://weewx.com/docs/usersguide.htm#backup for details.  I personally would add backing up your NOAA files since they take a long time to generate, but that's a nice-to-have.

Another way to look at it is "how would you recover if your computer's disk failed ?"
Just do a backup now even if you don't upgrade.  It's always good to have just in case...


gjr80

unread,
Jan 24, 2022, 5:56:26 PM1/24/22
to weewx-user
Upgrading should be painless but the jump from 3.x to 4.x could have consequences, can't say till you do it :)  If you are keen to stay on 3.9.1 you can still add extra fields to your database, the procedure is detailed in the 3.9.1 Customization Guide, a copy of which you have on your 3.9.1 WeeWX install. Have a look in /usr/share/doc/weewx or /home/weewx/docs (depending on how you installed WeeWX) on your 3.9.1 WeeWX machine and you will find the 3.9.1 docs. customizing.htm is the document you want, in particular the Adding a new type to the database section. The document may be hard to read as it is a HTML file, you may be able to open directly as a file in your browser or if you have a web server running on your WeeWX machine you may be able to copy or link the file to your web server's document path so you can browse the document through your web server.

Gary

Patrick Mendiuk

unread,
Jan 24, 2022, 7:11:32 PM1/24/22
to weewx-user
Thanks Gary that is what I needed.  I copied that directory to another machine and the html doc files worked fine with the browser.  @vince I have periodically created backups but I haven't needed to use them up to now.  I will go through the process of restoring the existing database on a separate fresh install with more notes this time :)

BR
Patrick

Tom Keffer

unread,
Jan 24, 2022, 7:26:29 PM1/24/22
to weewx-user
There's another option: download v4.5 in a convenient directory somewhere, then just run the v4.5 version of wee_database using your old weewx.conf file.

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/56fd12cd-d5cd-45cd-a021-512ab59e1379n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages