DDC-3277: Yaml convert-mapping bug #4056

Open
opened 2026-01-22 14:34:25 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Aug 27, 2014).

Jira issue originally created by user Kilrogg:

I use yaml mapping in my project for better migration management. For example, I use

    orm:convert-mapping yml ./yml --from-database --namespace="User\Entity\\" --filter="User\Entity\User"

To make yml entites for my User module. In my yml I have smth like this:

      password:
            type: string
            nullable: false
            length: 256
            fixed: false
            comment: ''
        email:
            type: string
            nullable: false
            length: 64
            fixed: false
            comment: ''
        status:
            type: smallint
            nullable: false
            unsigned: false
            comment: ''

I can write a comment to column

         status:
                type: smallint
                nullable: true
                unsigned: false
                comment: '%some comment%'
                column: status

And when I perform migration comment disappears. Here https://github.com/doctrine/migrations/issues/184 I was adviced to use such construction:

    status:
        type: smallint
        nullable: true
        column: status
        options:
            unsigned: false
            comment: '%some comment%'

And It works! But convert-mapping generates wrong code. Does anyone know any way to generate a correct one with convert-mapping?

Originally created by @doctrinebot on GitHub (Aug 27, 2014). Jira issue originally created by user Kilrogg: I use yaml mapping in my project for better migration management. For example, I use ``` orm:convert-mapping yml ./yml --from-database --namespace="User\Entity\\" --filter="User\Entity\User" ``` To make yml entites for my User module. In my yml I have smth like this: ``` password: type: string nullable: false length: 256 fixed: false comment: '' email: type: string nullable: false length: 64 fixed: false comment: '' status: type: smallint nullable: false unsigned: false comment: '' ``` I can write a comment to column ``` status: type: smallint nullable: true unsigned: false comment: '%some comment%' column: status ``` And when I perform migration comment disappears. Here https://github.com/doctrine/migrations/issues/184 I was adviced to use such construction: ``` status: type: smallint nullable: true column: status options: unsigned: false comment: '%some comment%' ``` And It works! But convert-mapping generates wrong code. Does anyone know any way to generate a correct one with convert-mapping?
admin added the Bug label 2026-01-22 14:34:25 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4056