Doctrine 1
  1. Doctrine 1
  2. DC-194

Oracle dropDatabase does not work

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.4, 1.1.5
    • Fix Version/s: 1.2.0-BETA3
    • Component/s: Connection
    • Labels:
      None
    • Environment:
      Oracle 10 or higher

      Description

      Doctrine_Export_Oracle::dropDatabase does not work, it contains some SQL errors. Here is the patch:

      --- Doctrine-1.1.5/lib/Doctrine/Export/Oracle.php	2009-11-03 19:33:04.000000000 +0100
      +++ doctrine/Doctrine/Export/Oracle.php	2009-11-06 14:40:46.000000000 +0100
      @@ -76,17 +76,19 @@
               $sql[] = "BEGIN
       FOR I IN (select table_name from user_tables)
       LOOP 
      -EXECUTE IMMEDIATE 'DROP TABLE '||I.table_name||' CASCADE CONSTRAINTS';
      +EXECUTE IMMEDIATE 'DROP TABLE \"'||I.table_name||'\" CASCADE CONSTRAINTS';
       END LOOP;
       END;";
       
               $sql[] = "BEGIN
       FOR I IN (SELECT SEQUENCE_NAME, SEQUENCE_OWNER FROM ALL_SEQUENCES WHERE SEQUENCE_OWNER <> 'SYS')
       LOOP 
      -EXECUTE IMMEDIATE 'DROP SEQUENCE '||I.SEQUENCE_OWNER||'.'||I.SEQUENCE_NAME;
      +EXECUTE IMMEDIATE 'DROP SEQUENCE \"'||I.SEQUENCE_OWNER||'\".\"'||I.SEQUENCE_NAME||'\"';
       END LOOP;
       END;";
      

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Igor D'Astolfo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: