Can it be a problem with permissions? Does web2py need to create a
database for migration or something?
Because it can create the table just never alters it.



On Sep 12, 11:12 am, vortex <[email protected]> wrote:
> I don't understand. I was working with sqlite and it worked OK. Now I
> am using mysql and it doesn't alter the columns in the table.
>
> On Sep 9, 2:34 pm, Massimo Di Pierro <[email protected]>
> wrote:
>
>
>
>
>
>
>
> > If web2py tries to create it then it does not know it exist. If you do
> > know and web2py does not know it means something is wrong with the
> > database metadata and needs rebuilding. You can do
>
> > db.define_tables(...,migrate=True,fake_migrate=True)
>
> > to rebuild metadata. Once done, remove the fake_migrate option.
>
> > On Sep 9, 4:19 am,vortex<[email protected]> wrote:
>
> > > What should be the definition so that web2py only alters the mysql
> > > table to correspond to the new definition but if it exists not to
> > > create it.
>
> > >             db_server.define_table('db_version',
> > >                 Field('major', 'integer', default = 0),
> > >                 Field('minor', 'integer', default = 0),
> > >                migrate= True,
> > >             )
>
> > > Or at least never to create the table but alter it if needed.

Reply via email to