[web2py] Re: Unclear how to create a unique multiple fields on web2py

2015-03-12 Thread Francisco Costa
I tis also possible to use _before_insert before form process : http://stackoverflow.com/questions/8054665/multi-column-unique-constraint-with-web2py/23738715#23738715 On Sunday, 29 June 2014 02:16:14 UTC+1, Daniel Lafrance wrote: > > Thanks M. Di Pierro > > I was not expecting an answer so fa

[web2py] Re: Unclear how to create a unique multiple fields on web2py

2014-06-29 Thread Daniel Lafrance
Thanks M. Di Pierro I was not expecting an answer so fast. I will give that a try but I can not remove the unique clause from the DBMS because other apps (PHP and PERL) also have access to it. Regard's D. Lafrance Le vendredi 27 juin 2014 02:20:26 UTC-4, Massimo Di Pierro a écrit : > > I woul

[web2py] Re: Unclear how to create a unique multiple fields on web2py

2014-06-26 Thread Massimo Di Pierro
I would not do it that way. There are two places to enforce uniqueness: at the database level and at the form level. To enforce is at the database level you can manually do create table sometable ( a_field varchar(10), b_field timestamp default date(now()), unique(a_field, b_field)