Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make index names unique #562

Merged
merged 1 commit into from Aug 13, 2015
Merged

Make index names unique #562

merged 1 commit into from Aug 13, 2015

Conversation

alcohol
Copy link
Member

@alcohol alcohol commented Aug 13, 2015

If the names are not unique, SQLITE will throw a fit and refuse to create the schema, e.g.:

$ app/console doctrine:schema:create
ATTENTION: This operation should not be executed in a production environment.

Creating database schema...

  [Doctrine\ORM\Tools\ToolsException]
  Schema-Tool failed with Error 'An exception occurred while executing 'CREATE INDEX package_name_idx ON link_require (version_id, packageName)':
  SQLSTATE[HY000]: General error: 1 index package_name_idx already exists' while executing DDL: CREATE INDEX package_name_idx ON link_require (version_id, packageName)

  [Doctrine\DBAL\Exception\TableExistsException]
  An exception occurred while executing 'CREATE INDEX package_name_idx ON link_require (version_id, packageName)':
  SQLSTATE[HY000]: General error: 1 index package_name_idx already exists

  [Doctrine\DBAL\Driver\PDOException]
  SQLSTATE[HY000]: General error: 1 index package_name_idx already exists

  [PDOException]
  SQLSTATE[HY000]: General error: 1 index package_name_idx already exists

Making them unique solves this.

Seldaek added a commit that referenced this pull request Aug 13, 2015
@Seldaek Seldaek merged commit 69a367f into composer:master Aug 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants