When switching to the new Samples.csv generated from my DB, I wanted to
make sure I could revert to my original Samples file if something went
wrong, so I renamed my Samples.csv file to Samples.orig.csv. Of course,
as soon as I went looking through the code I see:
filenames = glob(os.path.join(self._filename, 'Sample*.csv'))
I guess that convention makes sense, so you can split your Samples file
across multiple files, I just was not aware of it.
But regardless, as soon as I moved that old Samples file out of there,
my problem was solved.
Thanks again - now I can feel confident in being able to easily upgrade
the db schema!
Jason Hildebrand wrote:
> On Mon, 2003-03-10 at 00:35, wayne@... wrote:
>>I updated and gave this a try. The new Samples.csv file looks great - and
>>I see the added Id column in the data. However, when I run generate to
>>get new sql files, the InsertSamples.sql file has duplicate data for every
>>table, one with the Id field, and one without.
> Hi Wayne,
> This is very strange -- I tested the code myself on two MySQL databases,
> and it worked fine for me. Are you using MySQL or something else? Are
> there duplicate samples for each and every table, or just some of them?
> Are you using inherited object models? (I've never tried that.)
> The dump code is really quite simple -- check out
> MiddleKit/Run/SQLObjectStore.py, and search for dumpObjectStore. The
> code simply loops over all classes in the model, so if you're getting
> duplicates the tables must be in there twice (which I've certainly never
> seen happen). I've cc'd the dev list -- maybe someone there has some
> insight. Failing that, try poking around a bit and see if you can
> figure it out.
>> This leads to the insert
>>failing, since the second insert is trying to insert data with a primary
>>key that already
>>Perhaps a file has yet to be committed?
> Nope - I just double-checked. Everything is in.