I forgot. Important. The change below will affect all the apps
installed so it may break something.

On Oct 24, 9:38 am, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> from gluon import BaseAdapter.
> BaseAdapter.types.update({
>         'id': 'INTEGER PRIMARY KEY AUTOINCREMENT',        'reference':
> 'INTEGER REFERENCES %(foreign_key)s ON DELETE  %(on_delete_action)s'})
>
> db = DAL(....)
>
> You can replace the types for other adapters that you are using. For
> example PostgreSQLAdapter.
>
> On Oct 23, 9:20 pm, tom h <darkes...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > I've recently started to use web2py, pretty new to it and python also,
> > and I'd like to change the identity field that are automatically
> > created to be decimal(13,0) instead of integer.
>
> > Basically I would not like to deal with identity columns overflowing
> > when it reaches 10**9.  I mean, I'm only doing about a million rows
> > every day, but it could be more, and i'm just worried about future
> > migration to other systems.
>
> > I'm currently trying to hack dal.py but it's all over the place.
>
> > Is there anyway to get around this or make this id field a bit more
> > flexible?  It would be nice if it was implemented as a Field.identity,
> > and people can always name it whatever they wanted, and specify the
> > size smallint, int, decimal(X,0) that they feel like doing.
>
> > Thanks a lot!
>
> > Tom

Reply via email to