Legacy DB using uuid value for "id" column

24 views
Skip to first unread message

Tito Garrido

unread,
Nov 10, 2021, 12:49:58 PM11/10/21
to web...@googlegroups.com
Hi!

I am trying to connect pydal to external database with fake_migration false just to use the pydal interface to interact with this database.

But when I try to select something like:
db(db.profiles.id == current_user.user_id).select(db.profiles.can_vote).first()

It complains about "profiles.id" because it is a "uuid" value and it expects a int10. Is there a way to define the id column to accept the uuid value?

db.define_table('profiles',
Field('id', 'string'),
Field('can_vote', 'boolean'),
Field('username'),
Field('avatar_url')
)


Thanks!


--

Linux User #387870
.........____
.... _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:_______
Reply all
Reply to author
Forward
0 new messages