Reloading babase_test -- Was: Re: [Babase] progress on 07a update
Karl O. Pinc
kop at meme.com
Fri Jan 25 17:32:38 EST 2008
On 01/25/2008 03:47:04 PM, Karl O. Pinc wrote:
>
> On 01/25/2008 02:12:59 PM, kfenn wrote:
>
>> So, my question for you is, can you give me a fresh copy of
>> babase_test that mimics what is currently in babase?
>
> Ok. I'll be doing this now-ish, so anybody who's working in
> babase_test will have to make allowances.
I have a problem. There is a discrepancy between the validation
in babase_test and babase. I just re-created the babase_test
database, with what are _supposed_ to be the latest set of
validation rules and found that while babase_test validation
rules do not allow a ALLMISCS.Atime value to be later than
19:00, the babase database contains no such rule.
This is probably a rule I added to babase after some discussion,
but it did not go in because data cleanup was required.
Here are the rows that violate this rule.
select * from allmiscs where atime > '19:00';
almid | sid | atime | txt
-------+-------+----------+-------------------------
50 | 2937 | 20:10:26 | U,MISSED,OUT OF SIGHT.
374 | 5321 | 20:14:58 | U,1330/1430 NOT DONE
408 | 5596 | 20:32:59 | U,1700 SAMPLES NOT DONE
409 | 5596 | 20:33:18 | U,IDS WITH RSM.
416 | 5645 | 19:57:11 | C,ROC,C,WEN
417 | 5662 | 19:58:24 | C,ROC,C,WEN
464 | 6135 | 20:17:23 | U,1330 SAMPLE BATT. LOW
2041 | 36783 | 21:18:39 | C,YOB,C,MON
(8 rows)
As a result, the babase_test database will not load with
the babase data. I could fudge things and remove this rule
but it's probably better to clean up the data.
Please let me know where to go with this.
If you like, you can try copying the data yourself with the
following commmand (all one line):
pg_dump --format=c --compress=0 --schema=babase --data-only --user
babase_admin babase | pg_restore --data-only --disable-triggers --user
babase_admin --dbname=babase_test
You will need the babase_admin administrator password.
Note that the above command will only work once. After that
all data must be deleted from the babase_test database before
it can be run again.
Karl <kop at meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
More information about the Babase
mailing list