I don’t maintain migrations so I end having this error almost everytime I add a new column that’s not nullable.

Here’s a few queries you can execute for this.

Integer

1
ALTER TABLE public.<tablename> ADD COLUMN <column_name> integer NOT NULL default 0;

String

1
ALTER TABLE public.<tablename> ADD COLUMN <column_name> VARCHAR NOT NULL default ' ';

Boolean

1
ALTER TABLE public.<tablename> ADD COLUMN <column_name> boolean NOT NULL default false;