Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-110

No way to get platform specific values from old schema to schema create sql

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.4
    • Fix Version/s: None
    • Component/s: Schema Managers
    • Labels:
      None
    • Environment:
      ubuntu 10.10 with php 5.3.3

      Description

      Even if I create custom types to support non-default types in Mysql (enum,set) I cant get the values from the schema manager to the type object due to encapsulation:

      type declaration
      <?php
      use Doctrine\DBAL\Types\Type;
      use Doctrine\DBAL\Platforms\AbstractPlatform;

      class EnumType extends Type
      {
      const MYTYPE = 'Enum'; /
      public function getSqlDeclaration(array $fieldDeclaration, AbstractPlatform $platform)

      { return "ENUM(HERE IS THE PROBLEM)"; }

      public function getName()

      { return self::MYTYPE; }

      }
      ?>

      db connection construction:
      <?php
      //...

      \Doctrine\DBAL\Types\Type::addType('enum', 'CustomTypes\EnumType');
      $conn->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'enum');

      ?>

      There is no way to create even an extension to better support mysql databases, and since its a pretty commonly used rdbms this issue lowers the value of Doctrine2 for mysql (since you get errors by going by the reference guide).

      related issues:
      http://www.doctrine-project.org/jira/browse/DBAL-4
      http://www.doctrine-project.org/jira/browse/DBAL-89

        Activity

        Peter Jasiulewicz created issue -
        Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Won't Fix [ 2 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 12561 ] jira-feedback2 [ 17711 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17711 ] jira-feedback3 [ 20066 ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Peter Jasiulewicz
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: