Doctrine 1
  1. Doctrine 1
  2. DC-741

Sort of Migration Class Problem With More Than 9 Classes

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: Cli
    • Labels:
      None
    • Environment:
      Ubuntu 10.04, PHP 5.3.2, Doctrine 1.2.2

      Description

      I have problem when do a migration with more than 9 classes. (Version1, Version2, Version3, ..., Version10)

      php doctrine-cli.php migrate 10

      When migration class lower than 10, migration well done.
      The migration always return another class, not Version10.

      I have do a simple research, and found the problem is on the sort of the class name.
      It use SORT_NUMERIC, and it is not suitable to sort them.

      So, I change the sort method to Natural Sort, to fix this issue.

      1. DC-741.patch
        0.8 kB
        Dolly Aswin Harahap

        Activity

        Hide
        Dolly Aswin Harahap added a comment -

        Here I attach patch to fix this issue. Please check it.

        Show
        Dolly Aswin Harahap added a comment - Here I attach patch to fix this issue. Please check it.
        Hide
        Jonathan H. Wage added a comment -

        I am not able to produce the error, things are always in the correct order. I added a test here: http://trac.doctrine-project.org/changeset/7683

        Can you help me with how to reproduce the error?

        Show
        Jonathan H. Wage added a comment - I am not able to produce the error, things are always in the correct order. I added a test here: http://trac.doctrine-project.org/changeset/7683 Can you help me with how to reproduce the error?

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Dolly Aswin Harahap
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: