DBAL-782: [GH-507] Fix unique indexes in CREATE TABLE statements on SQL Anywhere #2012

doctrinebot opened this Issue Jan 13, 2014 · 2 comments

2 participants


Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of deeky666:

Url: #507


SQL Anywhere seems to distinguish between unique indexes and unique constraints. Unique constraints do not allow NULL values while unique indexes do.

A UNIQUE constraint is not the same as a unique index. Columns of a unique index are allowed to be NULL, while columns in a UNIQUE constraint are not. Also, a foreign key can reference either a primary key or a UNIQUE constraint, but cannot reference a unique index since a unique index can include multiple instances of NULL.

The current implementation create unique constraints instead of unique indexes during CREATE TABLE statements which causes ORM to fail as all nullable columns in a unique constraint silently get converted to NOT NULL.
This PR replace unique constraints by unique indexes in CREATE TABLE.


Comment created by @doctrinebot:

A related Github Pull-Request [GH-507] was closed:


Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added the Bug label Dec 7, 2015
@beberlei beberlei was assigned by doctrinebot Dec 7, 2015
@doctrinebot doctrinebot added this to the 2.5 milestone Dec 7, 2015
@doctrinebot doctrinebot closed this Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment