I took a shot at explaining the current behavior at the end of the 
Migrations section in the book: 
http://web2py.com/book/default/chapter/06#Migrations
 
Feel free to suggest changes.
 
Anthony

On Monday, March 28, 2011 1:12:09 PM UTC-4, Massimo Di Pierro wrote:

> I am looking at the source code right now. Currently this does not 
> override the behavior of individual define_table(s). It just provides 
> the default behavior in case a migrate argument is not passed. Since 
> this is undocumented bahviour it can be changed and, the more I think 
> about it, the more I feel it should be changed and DAL(migrate) should 
> override define_table(migrate) 
>
>
>
>
> On Mar 28, 11:45 am, Anthony <abas...@gmail.com> wrote: 
> > Massimo, 
> > 
> > What is the exact behavior of DAL(..., migrate=False)? Does setting 
> > 'migrate' in the DAL connection always override the 'migrate' arguments 
> in 
> > the individual table definitions associated with that connection? For 
> > example, if you have db=DAL(..., migrate=True), will that cause migration 
> of 
> > all tables, even if some of the table definitions explicitly set 
> > 'migrate=False'? How does this work? I'd like to mention DAL(..., 
> > migrate=False) in the Migrations section of the book, but I want to make 
> > sure I describe the behavior and use cases properly. 
> > 
> > Thanks. 
> > 
> > Anthony 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > On Monday, March 28, 2011 11:17:18 AM UTC-4, Jose wrote: 
> > > 2011/3/28 Anthony <aba...@gmail.com>: 
> > > > On Monday, March 28, 2011 9:53:54 AM UTC-4, Jose wrote: 
> > 
> > > >> On 28 mar, 07:13, Alexandre Strzelewicz 
> > > >> <strz...@gmail.com> wrote: 
> > > >> > I have recurrent problems with auto-migration. 
> > 
> > > >> > Is there a way to totally disable migration on all tables ? 
> > 
> > > >> > Thanks 
> > 
> > > >> db = DAL(..., migrate=False) 
> > 
> > > > Cools, I didn't even know about that. Is that in the book anywhere? 
> If 
> > > not, 
> > > > I'll add it. 
> > 
> > > > Anthony 
> > 
> > > Hi Anthony 
> > 
> > > look in: 
> > 
> > >http://web2py.com/book/default/chapter/11?search=migrate%3DFalse 
> > 
> > >http://www.web2py.com/examples/static/epydoc/web2py.gluon.dal.DAL-cla... 
>
> > 
> > > Jose

Reply via email to