Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-472

Oracle schema modification - incorrect SQL to change the nullable status of column

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.2
    • Fix Version/s: 2.5
    • Component/s: Schema Managers
    • Security Level: All
    • Labels:
      None
    • Environment:
      Centos 6 PHP 5.3.3 Oracle 11g

      Description

      When updating the nullable status of a column the sql generated is

      ALTER TABLE MET MODIFY (METAR VARCHAR2(2000) DEFAULT NULL)

      This will set the default column value to null but does not modify the nullable status of the column. The correct sql would be

      ALTER TABLE MET MODIFY (METAR VARCHAR2(2000) NULL)

      The field definition changed from

      metar:
      type: string
      length: 2000
      nullable: false
      column: METAR

      to

      metar:
      type: string
      length: 2000
      nullable: true
      column: METAR

        Activity

        Hide
        Benjamin Eberlei added a comment -

        Works for me strangely.

        Show
        Benjamin Eberlei added a comment - Works for me strangely.
        Hide
        Steve Müller added a comment -
        Show
        Steve Müller added a comment - Patch supplied in PR: https://github.com/doctrine/dbal/pull/467
        Hide
        Doctrine Bot added a comment -

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

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

          People

          • Assignee:
            Steve Müller
            Reporter:
            Andy Park
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: