Hi.
On Thursday, November 3, 2005, at 06:37 PM, Adrian Holovaty wrote:
On 11/3/05, David Pratt <[EMAIL PROTECTED]> wrote:
Anyway, let me know what you think so I can get started.
django-admin sqlinit mymodel * new method
django-admin init mymodel current - no name change
django-admin sqlcreate mymodel (instead of django-admin sql
mymodel)
django-admin create mymodel (insead of django-admin install
mymodel)
django-admin sqlcreateall mymodel (instead of django-admin sqlall
mymodel)
django-admin createall mymodel * new method
django-admin sqldrop mymodel (instead of django-admin sqlclear
mymodel)
django-admin drop mymodel * new method
django-admin sqldropall mymodel * new method
django-admin dropall mymodel * new method
django-admin sqlreset mymodel current - no name change
django-admin reset mymodel * new method
django-admin sqlresetall mymodel *new method
django-admin resetall mymodel *new method
django-admin sqlindexes mymodel current - no name change
django-admin indexes mymodel *new method
django-admin sqlindexesall mymodel current - no name change
django-admin indexesall mymodel *new method
A couple of questions:
* What's sqlreset vs. sqlresetall?
sqlreset displays sql for drop and then create tables in app
sqlresetall displays sql for drop all tables (including those created
during init), create statements for init tables, create for tables in
app
* What's sqlindexes vs. sqlindexesall?
sqlindexes displays sql for indexes for tables in app
sqlindexesall displays sql for indexes for init tables plus tables in
app
* "createall" vs "create" is ambiguous. We want the name to convey the
concept that "This will output all CREATE TABLE statements plus any
INSERT statements with default data." Any better name suggestions?
Right, I did not consider default data, probably install then is better
choice since anything else likely gets pretty long.
I better check this out for myself about default data since I was not
aware of insertion on install. Valuable to know. I thought I would
need to generate my own code for initializing database with data.
So...
django-admin sqlinstall myapp
django-admin install myapp
django-admin sqlinstallall myapp
django-admin installall myapp
This might be better - let me know what you think. For myself I am
after dropping and everything as part of the process of schema
development. If some of these are overkill thats fine too, just let me
know what you might like out of what I have suggested and I will do
these.
One other thing, is there a debug mode to see interaction with db
adapter. I should probably just look for it, I am sure it is in the
code somewhere.
Yes, indeed! Check this out:
http://www.djangoproject.com/documentation/faq/#how-can-i-see-the-raw-
sql-queries-django-is-running
I knew it must be there somewhere, thanks!
Regards
David