ah thanks - that was it. I heard a year back the new DAL would take care of these name conflicts.
On Sat, Dec 31, 2011 at 6:39 PM, Marin Pranjić <marin.pran...@gmail.com> wrote: > User is a reserved keyword in postgres, you need to rename field > > Marin > > On 31 Dec 2011 09:42, "Plumo" <richar...@gmail.com> wrote: > > I have an app working with sqlite. I tried changing to postgres and get this > error: > > <class 'psycopg2.ProgrammingError'>(syntax error at or near "user" LINE 3: > user INTEGER REFERENCES auth_user(id) ON DELETE CASCADE, ^ ) > > This is the relevant table: > > db.define_table('purchase', > > Field('user', db.auth_user), > > Field('database', db.database), > > Field('txn_id', unique=True), > > Field('price', 'decimal(8,2)', required=True, > requires=IS_DECIMAL_IN_RANGE(0, 1e100)), > > Field('created', 'datetime', compute=now), > > ) > > > > Any ideas? The auth_user table is the default. > > Richard