Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-721

[GH-457] Fix composite primary key introspection on Sqlite

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

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

      Url: https://github.com/doctrine/dbal/pull/457

      Message:

      Running the Sqlite testsuite I get the following error:

      ```bash
      There was 1 failure:

      1) Doctrine\Tests\DBAL\Functional\Schema\SqliteSchemaManagerTest::testListTableIndexes
      Failed asserting that two arrays are equal.
      — Expected
      +++ Actual
      @@ @@
      Array (
      0 => 'id'

      • 1 => 'other_id'
        )

      /home/deeky/dev/doctrine/dbal/tests/Doctrine/Tests/DBAL/Functional/Schema/SchemaManagerFunctionalTestCase.php:272
      ```

      This is due to the schema manager not correctly building composite primary keys on Sqlite. I don't know why this does not fail on Travis but accoding to the [official documentation](http://www.sqlite.org/pragma.html#pragma_table_info) this approach is the correct implementation.
      I did not add a dedicated test for this as there obviously already is one that covers this.

        Activity

        Hide
        Doctrine Bot added a comment -

        A related Github Pull-Request [GH-457] was closed:
        https://github.com/doctrine/dbal/pull/457

        Show
        Doctrine Bot added a comment - A related Github Pull-Request [GH-457] was closed: https://github.com/doctrine/dbal/pull/457
        Show
        Steve Müller added a comment - Fixed in commit: https://github.com/doctrine/dbal/commit/0724b0257f38bfad34485e11261fad3050287366

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Doctrine Bot
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: