<p>Fix a problem in PostgreSQL that caused incorrect ALTER TABLE output when NOT NULL constraints were removed.</p>
<p>For example,</p>
<pre><code>ALTER TABLE "customer" DROP CONSTRAINT ;
ALTER TABLE "customer" ALTER COLUMN "customername" DROP NOT NULL;
</code></pre>
<p>The first line is trying to remove an unnamed NOT NULL constraint, which is unnecessary.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>&nbsp;&nbsp;<a href='https://github.com/dbsrgits/sql-translator/pull/133'>https://github.com/dbsrgits/sql-translator/pull/133</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Fixed a bug in PostgreSQL when dropping NOT NULL constraints.</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/dbsrgits/sql-translator/pull/133/files#diff-74dda26d4d454e8f3a1a7f3761fc0ebe1c1117c68b192b24c0e3ab07358bf733">lib/SQL/Translator/Producer/PostgreSQL.pm</a>
    (5)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/dbsrgits/sql-translator/pull/133/files#diff-dc674c857fc58da9a2c873694ba89921ad196e7db419f77515d41141850c0363">t/30sqlt-new-diff-pgsql.t</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/dbsrgits/sql-translator/pull/133/files#diff-afc145f419ace283007fc98e0f343a8bf86b9bf1df1d8ce93f057246773d4d14">t/data/diff/pgsql/create1.yml</a>
    (14)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/dbsrgits/sql-translator/pull/133.patch'>https://github.com/dbsrgits/sql-translator/pull/133.patch</a></li>
  <li><a href='https://github.com/dbsrgits/sql-translator/pull/133.diff'>https://github.com/dbsrgits/sql-translator/pull/133.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/dbsrgits/sql-translator/pull/133">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AACJ4AWZZ3K646A76ZMMZE3THUYBTANCNFSM42SCHSJQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AACJ4AWINEAQ5NDXPXD3LCDTHUYBTA5CNFSM42SCHSJ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4MWYR6LQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/dbsrgits/sql-translator/pull/133",
"url": "https://github.com/dbsrgits/sql-translator/pull/133",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>