Jira issue originally created by user @beberlei:
This issue is created automatically through a Github pull request on behalf of CraigMason:
Currently when executing an ALTER TABLE statement with SQL Server, the query will be:
This will happen when adding primary keys via ALTER TABLE.
ALTER TABLE foo ADD PRIMARY KEY (id) WHERE id IS NOT NULL
ALTER TABLE foo ADD PRIMARY KEY (id)
Issue was closed with resolution "Fixed"