Let me think of a better way...

On Oct 25, 2:25 am, tom h <darkes...@gmail.com> wrote:
> Thanks a lot for the fast replies.
>
> Denes - I actually tried that tonight but it's still creating the
> INTEGER columns.  I think dal.py is using the column name to figure
> out the type of data, it's been a couple of days since I read through
> it.
>
> Massimo - Thanks for writing this framework, I've bounced around rails
> and django and settled with web2py.  Also, I just checked out fluxflex
> and it's pretty sexy.
> Unfortunately, changing dal.py is what I eventually had to do:
> changing the adapters to be BIGINT, which causes really small tables
> to also use BIGINT as the identity column unless I extend the adapter
> class and make a new DAL object with different identity type
> behavior.  Would it be possible to incorporate more flexibility into
> identity columns in the future?  Also, due to __migrate function I
> cannot really extend Auth defines_table function.  Is this intended?
>
> Thanks to all again, I'll live with BIGINT identity field everywhere
> for now.
>
> Tom
>
> On Oct 24, 10:40 am, Massimo Di Pierro <massimo.dipie...@gmail.com>
> wrote:
>
>
>
>
>
>
>
> > 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 theidentityfield that are automatically
> > > > created to be decimal(13,0) instead of integer.
>
> > > > Basically I would not like to deal withidentitycolumns 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