Doctrine 1
  1. Doctrine 1
  2. DC-428

Bug on DropDB on Oracle. The sequence isn't not correct

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.1
    • Fix Version/s: 1.2.2
    • Component/s: None
    • Labels:
      None

      Description

      The sequence of drop database is not correct.

      I change this in my patch.

      Thank's

      1. Oracle.php.patch
        0.9 kB
        Bertrand Zuchuat

        Activity

        Hide
        Miloslav "adrive" Kmet added a comment -

        Hi Bertrand,

        Can you provide more informations on this issue? Some test cases, oracle error messages, oracle settings..

        You are proposing to remove the double quotes from DROP TABLE statements. You can turn identifier quoting on and off. When you have ATTR_QUOTE_IDENTIFIERS to on, all your identifier names are double quoted in oracle and if you do something like
        SELECT * FROM user_tables, the TABLE_NAME column contains table names lovercased. So you need the double quotes in DROP TABLE statements. If your table name is "my_table" and you do DROP TABLE my_table; you get an error about nonexistent table. You need to do DROP TABLE "my_table". That's exactly what doctrine does now.

        Another scenario is doublequotes turned off. So all your tables are handled in oracle uppercased. So my_table is internally handled as MY_TABLE. That's alredy what you recieve from USER_TABLES. And when you do DROP TABLE "MY_TABLE" that is the same as DROP TABLE my_table.

        I use this heavily in both cases and I have no problems with that.

        The issue with I.SEQUENCE_OWNER in DROP SEQUENCE statement I fixed in r6896 (http://trac.doctrine-project.org/changeset/6896).

        Show
        Miloslav "adrive" Kmet added a comment - Hi Bertrand, Can you provide more informations on this issue? Some test cases, oracle error messages, oracle settings.. You are proposing to remove the double quotes from DROP TABLE statements. You can turn identifier quoting on and off. When you have ATTR_QUOTE_IDENTIFIERS to on, all your identifier names are double quoted in oracle and if you do something like SELECT * FROM user_tables, the TABLE_NAME column contains table names lovercased. So you need the double quotes in DROP TABLE statements. If your table name is "my_table" and you do DROP TABLE my_table; you get an error about nonexistent table. You need to do DROP TABLE "my_table". That's exactly what doctrine does now. Another scenario is doublequotes turned off. So all your tables are handled in oracle uppercased. So my_table is internally handled as MY_TABLE. That's alredy what you recieve from USER_TABLES. And when you do DROP TABLE "MY_TABLE" that is the same as DROP TABLE my_table. I use this heavily in both cases and I have no problems with that. The issue with I.SEQUENCE_OWNER in DROP SEQUENCE statement I fixed in r6896 ( http://trac.doctrine-project.org/changeset/6896 ).
        Hide
        Bertrand Zuchuat added a comment -

        Hi,

        The symfony use the last version 1.2.1 revision 6894 and the change is on 6896.

        A release date for version 1.2.2 ?

        Thank's for your help.

        Show
        Bertrand Zuchuat added a comment - Hi, The symfony use the last version 1.2.1 revision 6894 and the change is on 6896. A release date for version 1.2.2 ? Thank's for your help.
        Hide
        Miloslav "adrive" Kmet added a comment -

        Just update it yourself with svn up or use your version in YOUR_PROJECT/lib/vendor/doctrine.

        Show
        Miloslav "adrive" Kmet added a comment - Just update it yourself with svn up or use your version in YOUR_PROJECT/lib/vendor/doctrine.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Bertrand Zuchuat
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: