The same suggestions as before apply: do write a test case. Marco Pivetta
http://twitter.com/Ocramius http://ocramius.github.com/ On Wed, Sep 20, 2017 at 12:42 PM, Przemyslaw Furtak <[email protected]> wrote: > I forgot to mention that I'm using MySQL engine so this may be a problem - > mysql doesn't support datetimetz natively. > > > W dniu środa, 20 września 2017 12:40:23 UTC+2 użytkownik Przemyslaw Furtak > napisał: >> >> Any progress in this issue? I still have the same problem. I don't make >> any changes but in every migration file I have an additional query like: >> >> ALTER TABLE user CHANGE created_on created_on DATETIME NOT NULL, CHANGE >> updated_on updated_on DATETIME NOT NULL, CHANGE birthday birthday DATETIME >> DEFAULT NULL. >> >> The problem seems to be related with datetimetz field. >> >> >> W dniu czwartek, 4 maja 2017 13:35:59 UTC+2 użytkownik Marco Pivetta >> napisał: >>> >>> This is most likely a DBAL-level database introspection issue, as >>> `datetimetz` may be generating a different signature than the one used by >>> `datetime`. >>> >>> I suggest trying to isolate this behavior in a test that: >>> >>> * creates the DB with that type >>> * runs the schema diff against that DB and verifies that the diff is >>> empty >>> >>> Marco Pivetta >>> >>> http://twitter.com/Ocramius >>> >>> http://ocramius.github.com/ >>> >>> On Thu, May 4, 2017 at 1:33 PM, Andrew Davey <[email protected]> >>> wrote: >>> >>>> I've noticed this for a while now and i'm unsure what the issue is and >>>> what it's happening. >>>> >>>> if i were to have no changes in my entity but run >>>> doctrine:schema:update --force i would always have 1 query executed. I'm >>>> now using diff with migrations to keep on top of my DB changes vs. using >>>> schema:update and it's always adding the following SQL update: >>>> >>>> $this->addSql('ALTER TABLE table_name CHANGE deactivatedDate >>>> deactivatedDate DATETIME DEFAULT NULL'); >>>> >>>> >>>> the entity property definition is: >>>> >>>> /** >>>> * @var \DateTime >>>> * >>>> * @ORM\Column(name="deactivatedDate", type="datetimetz", nullable=true) >>>> */ >>>> private $deactivatedDate; >>>> >>>> >>>> Now i'm looking at this properly Is it the datetimetz thing? But if so >>>> why is this happening? >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "doctrine-user" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> Visit this group at https://groups.google.com/group/doctrine-user. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> -- > You received this message because you are subscribed to the Google Groups > "doctrine-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/doctrine-user. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "doctrine-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/doctrine-user. For more options, visit https://groups.google.com/d/optout.
