On Wednesday, February 5, 2014 11:53:40 AM UTC-8, Anthony wrote:
>
> When you do "for x in db", that will iterate of the Table objects attached 
> to db. The Table objects are just models defined in your model files -- 
> they do not necessarily have to correspond to actual tables in your 
> database. The tables you listed are Auth tables that would be defined via 
> auth.define_tables(). If you have migrations turned off (or the database is 
> not writable), then defining those tables in the model will not result in 
> them actually being created in the database.
>
> Regarding the existing tables in the database, do you have models in your 
> app defining them? 
>

> Anthony
>




If Austin's db1.py defines a db1 model, does he need to do "for x in db1"?  
Otherwise, my naive suspicion would be that the table files weren't created 
by migration.


/dps
 

 

>
> On Wednesday, February 5, 2014 2:29:16 PM UTC-5, Austin Taylor wrote:
>>
>> Hello,
>>
>> I followed the instructions for importing legacy databases and created a 
>> db1.py which gave me a nice model, but I'd like to be able to interact with 
>> my current database. 
>>
>> When I type db the shell returns <DAL uri="mysql://*****:********@
>> 127.0.0.1/tablename">
>>
>> I run for x in db:
>>            print x
>>
>> and it only shows user, user_group, user_membership, auth_event, and 
>> auth_cas when I access my database from phpmyadmin I don't even have those 
>> tables in the database.
>>
>> Am I doing something wrong?
>>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to