Re: Best way to change column/property type?
Thomas Mills Hinkle <[email protected]>
| Newsgroups | gmane.comp.db.metakit |
|---|---|
| Message-ID | <[email protected]> |
On Apr 7, 2005 7:02 PM, Brian Kelley <[email protected]> wrote: > You are on the right track, you will need to have a dummy column but > you need to commit the database close the database and then reload at > every major step. here is a small script that you can test with. > > I don't think that there is an efficient way of doing this, but here > is A way of doing it :) Excellent. This did the trick! Thanks for taking the time to whip up the sample script. <snip> > # drop the 'b' column > vw = st.getas("test[a,c,newb:I]") > st.commit() > del st > st = metakit.storage("foo.mk", 1) This is the single most counter-intuitive piece to me. It would be nice if this method for dropping columns was covered more clearly in the pymetakit docs. I believe I did track down a sample that showed the following would drop a view: st.getas('test') st.commit() But it was buried deep and I didn't make the leap to seeing that committing would limit your DB to whatever your last getas() call had specified for a given view. Thanks again for your help! Tom _____________________________________________ Metakit mailing list - [email protected] http://www.equi4.com/mailman/listinfo/metakit