Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-747

Add support for table, column and indexes comments


    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Mapping Drivers
    • Security Level: All
    • Labels:


      It would be nice to add support for table comments, column comments and indexes comments, i.e.

          comment="Contains products",
          indexes={@index(name="search_idx", comment="Makes finding people by name easier", columns={"name", "email"})}
      @Column(type="integer", comment="Stores the user's age, in years")

      MySQL supports comments via ALTER TABLE since 4.1.
      PostgreSQL support comments via COMMENT at least since 7.4.
      SQLite doesn't appear to support table, column or indexes comments as of 3.7.
      Oracle supports comments on tables and columns via COMMENT at least since 10.1. It doesn't appear to support comments on indexes.

      For databases that don't support those persistent comments, you could use normal SQL comments in the table definition. Of course they wouldn't be stored by the database, but at least they would appear in the generated schema, that's better than nothing.


        There are no comments yet on this issue.


          • Assignee:
            romanb Roman S. Borschel
            s9e s9e
          • Votes:
            5 Vote for this issue
            5 Start watching this issue


            • Created: