Error writing to postgreSQL hosted on Heroku

@0xdesdenova

Good news indeed!

According to the DDL you shared, your id primary key doesn’t have a default value declared in SQL.
Looking at you model, it seems like the default UUID value is computed from Django via default=uuid.uuid4.

Our one click deploy directly plugs on top of your database and not from your Django app - thus it cannot generate a default value for your primary key.

You could define the default value in SQL directly (The syntax is DBS dependant though). Doing would allow to use the one click deploy with your database, while still being able to add new records with a default id :slight_smile:

Let me know if that helps

1 Like