Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-166

Table Encoding on generation table creation query

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.3
    • Component/s: Schema Managers
    • Security Level: All
    • Labels:
      None
    • Environment:
      mysql

      Description

      Can not set charset options for table creation.
      Now I am fix thix problem in patch.
      File: doctrine-dbal/lib/Doctrine/DBAL/Schema/Schema.php

      #!/usr/bin/php
      <?php
      /**

      • Doctrine DBAL Patch
      • fix table creation query encode
      • (c) _Nicolay
        */
        system ('cp ./vendor/doctrine-dbal/lib/Doctrine/DBAL/Schema/Schema.php ./vendor/doctrine-dbal/lib/Doctrine/DBAL/Schema/Schema.php.Orig');

      $data = file_get_contents('./vendor/doctrine-dbal/lib/Doctrine/DBAL/Schema/Schema.php');
      $data = str_replace("new Table(\$tableName);",
      "new Table(\$tableName,array(),array(),array(),0,array('charset'=>'utf8','collate'=>'utf8_general_ci'));",
      $data);
      file_put_contents('./vendor/doctrine-dbal/lib/Doctrine/DBAL/Schema/Schema.php', $data);

        Activity

        Punin Nicolay G. created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.3 [ 10184 ]
        Fix Version/s 2.1.2 [ 10160 ]
        Resolution Fixed [ 1 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 13018 ] jira-feedback2 [ 17752 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17752 ] jira-feedback3 [ 20107 ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Punin Nicolay G.
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: