peewee-db-evolve
peewee-db-evolve copied to clipboard
Support for BIGSERIAL in Postgres
I have a BaseModel
class that all my models inherit from that looks like this:
class BaseModel(peewee.Model):
id = peewee.BigAutoField(primary_key=True)
class Meta:
database = db
When I run db.evolve()
, it wants to run an ALTER TABLE
query for every table that that looks like this:
ALTER TABLE "my_table_name" ALTER COLUMN "id" TYPE BIGSERIAL;
But this doesn't work because BIGSERIAL
is not a type.
ERROR: type "bigserial" does not exist
@jnrbsn: Did you find any workaround?