Re: checking if db is empty

2009-02-25 Thread Jacob Kaplan-Moss
On Wed, Feb 25, 2009 at 5:23 PM, Russell Keith-Magee wrote: > There isn't a simple 'is_my_database_empty' command that returns > true/false. Actually, "SELECT COUNT(*) FROM pg_tables WHERE schemaname = 'public'" does pretty well. But Russ is right that this isn't the type of question Django's go

Re: checking if db is empty

2009-02-25 Thread Russell Keith-Magee
On Thu, Feb 26, 2009 at 4:24 AM, knight wrote: > > Hi, > > I'm using postgres database in my Django application. > Is there a way to check if the database is empty from my models.py? (I > mean before the first syncdb) There isn't a simple 'is_my_database_empty' command that returns true/false. H

checking if db is empty

2009-02-25 Thread knight
Hi, I'm using postgres database in my Django application. Is there a way to check if the database is empty from my models.py? (I mean before the first syncdb) Thanks, Arshavski Alexander. --~--~-~--~~~---~--~~ You received this message because you are subscribed t