Peewee: UUID primary keys

Created on 4 Jul 2014  路  1Comment  路  Source: coleifer/peewee

I'd like to have playhouse.postgres_ext.UUIDField as the primary key for a table.

https://github.com/coleifer/peewee/issues/9 seems to suggest that this should be possible, but seems to have been deprecated since it's first introduction in 2012. Any suggestions?

Cheers,
Alex

PS. Awesome ORM, switched over from SQLAlchemy and loving every minute of it thus far!

Most helpful comment

Aha, scratch that I found the 1.0 -> 2.0 upgrade notes. My bad, closing...

For anyone finding this:

class MyModel(Model):
    uuid = UUIDField(primary_key=True)
    ...

>All comments

Aha, scratch that I found the 1.0 -> 2.0 upgrade notes. My bad, closing...

For anyone finding this:

class MyModel(Model):
    uuid = UUIDField(primary_key=True)
    ...
Was this page helpful?
0 / 5 - 0 ratings

Related issues

dev-zero picture dev-zero  路  4Comments

razodactyl picture razodactyl  路  3Comments

megachweng picture megachweng  路  3Comments

hanxifu picture hanxifu  路  4Comments

rayzorben picture rayzorben  路  4Comments