Problem
What is the best way to do this using Postgres? I tried the following code, but it doesn’t work:
ALTER TABLE mytable ALTER COLUMN mycolumn BIGINT NULL;
Asked by mateusmaso
Solution #1
From the excellent manual:
ALTER TABLE mytable ALTER COLUMN mycolumn DROP NOT NULL;
When modifying the nullability, there’s no need to provide the type.
Answered by mu is too short
Post is based on https://stackoverflow.com/questions/4812933/how-to-change-a-pg-column-to-nullable-true