Well, I don't know if that will work and personally I wouldn't dare try. Best
case is it doesn't and just throws errors, worst case is it will trash all
your data and recreate all tables. I somehow doubt that the sql create
command is smart enough to figure out that you just want to drop a column (I
may be wrong on that too)
Here's what I would do: remove the attribute from the model.
Then manually go into the database (or use something like pgadmin3 or
phpMyAdmin - depending on database) and drop the specific column you're not
interested in anymore, i.e. if the table is called mytable:
psql database
> alter table mytable drop column not_interested_anymore;
> \q
(mysql commandline is a bit different)
HTH
Uwe
On Saturday 15 September 2007, [EMAIL PROTECTED] wrote:
> Regarding those Python classes that define your data model....
>
> I'd like to remove an attribute I don't use anymore and don't care
> about.
> How do this without confusing the database and blowing away your
> existing data?
>
> If I remove that attribute from a Python class and then do
> tg-admin sql create
> again will I be happy?
>
> Will my old data still be there?
>
>
> Chris
>
>
>
--
UC
--
Open Source Solutions 4U, LLC 1618 Kelly St
Phone: +1 707 568 3056 Santa Rosa, CA 95401
Cell: +1 650 302 2405 United States
Fax: +1 707 568 6416
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---