Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for BIGSERIAL in Postgres #55

Open
jnrbsn opened this issue Feb 2, 2021 · 1 comment
Open

Support for BIGSERIAL in Postgres #55

jnrbsn opened this issue Feb 2, 2021 · 1 comment

Comments

@jnrbsn
Copy link

jnrbsn commented Feb 2, 2021

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
@kluenkersen
Copy link

@jnrbsn: Did you find any workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants