Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-735

[GH-468] Fix dropping table without autoincrement trigger in Oracle

    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/468

      Message:

      Autoincrement primary key columns are implemented as a triggers that emulate autoincrementation in Oracle. Dropping tables with Oracle's schema manager first drops those triggers before actually dropping the table. However when there is no such trigger (either if the primary key was not defined as autoincrement column or the trigger could not be found on database side) dropping the table via schema manager fails silently and the table still exists. Dropping those triggers should not cause the schema manager to skip executing the `DROP TABLE` statement. Therefore this PR wraps dropping the trigger into a `tryMethod()` so that it can fail and still call the actual `dropTable` operation.
      This also fixes a lot of failing functional tests in Oracle's test suite where tables without autoincrement primary keys column are created and dropped.

        Activity

        Hide
        Doctrine Bot added a comment -

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

        Show
        Doctrine Bot added a comment - A related Github Pull-Request [GH-468] was closed: https://github.com/doctrine/dbal/pull/468

          People

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

            Dates

            • Created:
              Updated:
              Resolved: