le 15.09.2007 23:36 [EMAIL PROTECTED] a écrit:
> 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
>   
I did that a few times during development with SA.
>     tg-admin sql create
>   
This won't do anything with SA (won't suppress the corresponding column...)
> again will I be happy?
>   
If the attribute you removed was "nullable" everything will be ok 
because the DB will fill the column with NULL value when you create a 
new object. If the attribute was not nullable, you'll get an error each 
time you add a new object :-(
Depending on the database you use, you can also alter the table and drop 
the column.

> Will my old data still be there?
>   
yes. (if you don't drop the table)
>
> Chris
>
>
> >
>   

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to