Uploaded image for project: 'Doctrine DBAL'
  1. Doctrine DBAL
  2. DBAL-472

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 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

        Issue Links

          Activity

          acp Andy Park created issue -
          deeky666 Steve Müller made changes -
          Field Original Value New Value
          Assignee Benjamin Eberlei [ beberlei ] Steve Müller [ deeky666 ]
          deeky666 Steve Müller made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          beberlei Benjamin Eberlei made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Fix Version/s 2.5 [ 10523 ]
          Resolution Fixed [ 1 ]
          deeky666 Steve Müller made changes -
          Link This issue is referenced by DBAL-1001 [ DBAL-1001 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: