If you want to add something to the database, you have two choices:

1. Create a new database using a custom schema, then transfer over the
contents of the old database to the new database using the tool
wee_database with the --transfer
<http://www.weewx.com/docs/utilities.htm#Action_--transfer> option.
2. Simply add a new column to the old database by using the tool
wee_database with the --add-column
<http://www.weewx.com/docs/utilities.htm#Action_--add-column> option. For
example

*wee_database --add-column=pm2_5*


would add a column for your air quality sensor.



On Tue, May 3, 2022 at 3:40 AM Meteo Oberwallis <[email protected]>
wrote:

> Hello, everyone
>
> Maybe I can help the whole thing along a bit. I installed the Weewx system
> on a Raspberry and also installed the Davis fine dust sensor extension.
> After that I made a backup of the whole system so I can use it for my other
> weather stations. Since the old database (weewx.sdb) now lacks the fields
> of qm2.5 etc, I reconfigured the database with the new weewx schema. After
> that I was missing all "sunshine_hours" entries. I use this "
> https://github.com/Jterrettaz/sunduration"; to track the hours of
> sunshine. But for this to work, I had to set the schema to "schema =
> user.sunduration.schema_with_sunshine_time". But if you do this with the
> latest weewx version, the particulate matter sensor no longer works. That
> means the columns in weewx.sdb are missing. I have had hours of sunshine
> since 2017, but unfortunately they are missing now. I had to reconfigure
> the scheme again after "wview-extended". I'm probably making a
> misconception. Tom is right. I was able to copy and start the old weewx.sdb
> without any problems. However, the particulate matter sensor then stopped
> working.
>
> Greeting
> Stefan
>
> [email protected] schrieb am Montag, 2. Mai 2022 um 16:01:43 UTC+2:
>
>> My apologies, but I'm just not following this.
>>
>> There is no "upgrading" of the database. They are all the same. You can
>> take a database from wview 15 years ago, and run it on a modern WeeWX with
>> no changes.
>>
>> Now it's true that the *default* schema for WeeWX changed in V4.0 from
>> the "wview" schema to the "wview-extended" schema, but old schemas will run
>> without change.   Simply move the old database into place --- no need to
>> "import" it.
>>
>> Perhaps I'm missing some subtlety here, but I keep seeing this.
>>
>> *There is no need to "upgrade" your database!* Just use it.
>>
>> On Mon, May 2, 2022 at 6:33 AM Burns Fisher <[email protected]> wrote:
>>
>>> I've been a WeeWX user since late 2013.  At first I ported it to a
>>> BeagleBone Black but  I moved it to a Raspberry Pi somewhere around late
>>> 2018.  The point of all this is that I have been running it for years--last
>>> version was 3.8.0, I think, but just this weekend I actually upgraded the
>>> whole Pi to the latest Raspbian as well as WeeWX 4.8.  I appreciate that
>>> WeeWX can upgrade the database files automagically, but just like the
>>> original poster here, I am stuck with an old database that I'd like to
>>> import.
>>>
>>> The Raspberry Pi folks have a tendency to say "Yes, you can upgrade
>>> Raspbian, but it is much easier to just install the new version fresh" (and
>>> this is my experience in other cases too!).  This precludes upgrading WeeWX
>>> and thus the database does not automatically get upgraded.  I found this
>>> post after I had already installed the new system and it had been running
>>> for a day or so (without any old data).  It turns out that the
>>> "reconfigure" above was just what I needed.  I stopped WeeWX, made a copy
>>> of the day-old database and replaced it with the old one.  Then ran
>>> re-configure and rebuilt the daily summaries (must use "sudo"!)  and
>>> started up WeeWX.  Interestingly, WeeWX must have had to rebuild some more
>>> because it was not till I looked this morning that a whole year's worth of
>>> data was showing under "Year".  But the other interesting thing is that it
>>> apparently re-downloaded data from my Vantage's buffer so it seems to have
>>> all the data from the past couple days and I don't have to merge in the
>>> "new" database.
>>>
>>> Anyway, besides giving my experience, I'd like to suggest that idea that
>>> an upgrade on Raspberry Pi might often consist of a complete new system be
>>> included in the documentation.  Then also mention 'reconfigure'.  The only
>>> hard part about this was finding the information!  Thanks to everyone for
>>> it being here at all!
>>>
>>> Thanks for listening...
>>>
>>> Burns
>>>
>>> On Monday, April 25, 2022 at 5:30:05 AM UTC-4 Meteo Oberwallis wrote:
>>>
>>>> The old schema was
>>>> "schema=user.radiationhours.schema_with_sunshine_hours". If I load my old
>>>> weewx.sdb and then configure it with "wee_database weewx.conf
>>>> --reconfigure" then this deletes the "sunshine_hours" column. All other
>>>> data will be accepted. I'll try your instructions to see if it works.
>>>> Thanks very much
>>>>
>>>> vince schrieb am Sonntag, 24. April 2022 um 21:55:37 UTC+2:
>>>>
>>>>> I have no idea where sunshine_hours comes from.  Did you add it to
>>>>> your old weewx schema ?   If so you'd need to similarly add it to the new
>>>>> schema probably before doing your conversion and see if wee_database is
>>>>> smart enough to do the right thing.
>>>>>
>>>>> (untested - but give it a try.  This is why you always work off copies
>>>>> of your data..).
>>>>>
>>>>> On Sunday, April 24, 2022 at 12:29:04 PM UTC-7 Meteo Oberwallis wrote:
>>>>>
>>>>>> Hello Vince Many thanks for your response. I moved my old weewx.sdb
>>>>>> to the new weewx version and then created it in the new format with
>>>>>> "wee_database weewx.conf --reconfigure". Unfortunately, the
>>>>>> "sunshine_hours" was deleted in the process. Can I somehow transfer these
>>>>>> to the new scheme? Greeting
>>>>>>
>>>>> --
>>> 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 [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/weewx-user/89f57f3b-6aff-4de6-a55c-4df3bd9f5d38n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/weewx-user/89f57f3b-6aff-4de6-a55c-4df3bd9f5d38n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/8563748b-eaf9-43c0-9b61-dc52fe71fca1n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/8563748b-eaf9-43c0-9b61-dc52fe71fca1n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAPq0zEDO08azX%3DsKkb13n%3DZ7Bq8HnqzUU4tRXD0vg6ea%3D_9yNw%40mail.gmail.com.

Reply via email to