Skip to content

Loading…

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

Closed
doctrinebot opened this Issue · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user @doctrinebot:

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

Url: #507

Message:

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.

@doctrinebot

Comment created by @doctrinebot:

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

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added the Bug label
@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.5 milestone
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.