Skip to content

Loading…

DBAL-77: Mysql Numeric / Decimal fields #1999

Closed
doctrinebot opened this Issue · 7 comments

2 participants

@doctrinebot

Jira issue originally created by user eugeneiso:

class product {
/****
*Column(type="decimal", scale="2")
*
*/
private $discount;
}

generate SQL

create table product {
discount DECIMAL(10,2) NOT NULL
}

if you have a field in a database type DECIMAL doctrine tries to
generate for him diff

doctrine orm:schema-tool

ALTER TABLE product CHANGE discrount discrount NUMERIC (10, 2) NOT NULL

but mysql ignore the alter, as a result of these diff stretch from
migration to migration

@doctrinebot

Comment created by @beberlei:

This is fixed in RC1 or RC2.

@doctrinebot

Comment created by eugeneiso:

checked for the version of doctrine 2.1.0-DEV
result is the same

@doctrinebot

Comment created by extesy:

I have the same issue with the latest doctrine build. Please fix it because it makes schema migration scripts dirty with redundant changes.

@doctrinebot

Comment created by @beberlei:

I cannot reproduce this, does this happen if you also specify precision=10 ?

@doctrinebot

Comment created by @asm89:

Closing until someone can provide more feedback.

@doctrinebot

Issue was closed with resolution "Can't Fix"

@doctrinebot

Comment created by jsimpson:

I am seeing this bug for a definition specified as:

  • @ORM\Column(type="decimal", precision=20, scale=0, nullable=false, unique=true)

Doctrine Command Line Interface version 2.3.2-DEV

@doctrinebot doctrinebot added the Bug label
@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.