2013/10/13 david.waldrop <david.wald...@gmail.com>

> This worked perfectly.
>
Good!

>   I am not sure why the sequence worked though. I thought once I had the
> .table files created and if I then ran a migrate they would be created in
> the database.  but that obviously did not happen.  Do you have time to
> explain why this sequence worked?  Thanks.
>
.tables files are used by DAL to see what is the last known state of the
tables on the database compared to what is the required state in the models
code.  If DAL sees a difference a migration (i.e. a DDL SQL command) is
issued and the new state is saved in the interested .tables files.
As you can see there is not any attempt by the DAL to understand the state
of the real tables on the database. DAL relies only on .table files.  By
absurd you could have an empty database without defined tables, but have
copied all the databases dir from another machine:  the DAL would firmly
believe that all the tables defined in the model are already in the
database.


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

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