I designed and setup a database that was created directly in Postgres,
not web2py. When attempting to view the database administration tool
in web2py it gives me constant errors:
Jul 29 07:32:38 postgres postgres[11459]: [6-1] 2011-07-29 07:32:38
EDT testdb postgres 192.168.148.68 WARNING: there is already a
transaction in progress
Jul 29 07:32:38 postgres postgres[11459]: [7-1] 2011-07-29 07:32:38
EDT testdb postgres 192.168.148.68 ERROR: column test.id does not
exist at character 36
Jul 29 07:32:38 postgres postgres[11459]: [7-2] 2011-07-29 07:32:38
EDT testdb postgres 192.168.148.68 STATEMENT: SELECT count(*) FROM
test WHERE (test.id > 0)
Here is the SQL used to create it:
create table test (
test_id integer primary key default nextval('test_id_seq'),
name varchar(100)
);
Here is the definition in models/db.py
db.define_table('test', Field('test_id'), Field('name'),
migrate=False, fake_migrate=True)
As you can see, there is no 'id' field. Is this a requirement?
Everytime I bring up the database administration tool it is trying to
select field 'id'. If I change the field the select still fails.
I've tried every variation of migrate, fake_migrate without luck.
Can someone assist?