dbsrgits / sql-translator

SQL::Translator (SQLFairy)
http://sqlfairy.sourceforge.net/
82 stars 91 forks source link

Support for removing NOT NULL constraints in PostgreSQL. #133

Closed uehara-delta closed 1 year ago

uehara-delta commented 3 years ago

Fix a problem in PostgreSQL that caused incorrect ALTER TABLE output when NOT NULL constraints were removed.

For example,

ALTER TABLE "customer" DROP CONSTRAINT ;
ALTER TABLE "customer" ALTER COLUMN "customername" DROP NOT NULL;

The first line is trying to remove an unnamed NOT NULL constraint, which is unnecessary.

rabbiveesh commented 1 year ago

thanks!