On Thu, Jul 3, 2008 at 8:28 PM, Alex Slesarev <[EMAIL PROTECTED]> wrote:
> One more issue - if you change a model, then you have to drop database
> and recreate it using syncdb (sqlite do not allow modifying tables and
> columns). It is not so good for production use.

This is not quite correct. SQLite has limited support for ALTER TABLE
statements, which is a different thing from saying it has no support
for them.

It is possible, in SQLite, to rename tables and to add new columns
directly through ALTER TABLE statements. It is not possible to do more
-- directly. However, it *is* possible to alter a schema without
dropping the entire table:

1. Create a new table, with a temporary name, and with the correct
definition to match the new schema.
2. Copy data into that table from the original table, inserting it
appropriately to suit the new schema.
3. Drop the original table.
4. Rename the new table to the original table's name.

Yes, this is more complex. However, it is often less complex than
completely re-creating things from scratch.


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to