peewee-db-evolve icon indicating copy to clipboard operation
peewee-db-evolve copied to clipboard

Support for BIGSERIAL in Postgres

Open jnrbsn opened this issue 4 years ago • 1 comments

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 avatar Feb 02 '21 04:02 jnrbsn

@jnrbsn: Did you find any workaround?

kluenkersen avatar Feb 26 '22 16:02 kluenkersen