Skip to content
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.

Bug fix for MySQL timestamps with Doctrine1 #44

Closed
wants to merge 2 commits into from
Closed

Bug fix for MySQL timestamps with Doctrine1 #44

wants to merge 2 commits into from

Conversation

blockjon
Copy link

Each time I run a diff migration, doctrine thinks all of my timestamps have changed. I discovered that in Doctrine/Migration/Diff.php on line 214, you check for

I therefore devised this solution which will observe whether or not a field is a timestamp field. If so, it will forcibly remove the empty fields. This was my best guess at a resolution and it works for me.

This problem is also described a long time ago here:

http://groups.google.com/group/doctrine-user/browse_thread/thread/7df8a94284cf89aa?pli=1

…ration, doctrine thinks all of my timestamps have changed. I discovered that in Doctrine/Migration/Diff.php on line 214, you check for

I therefore devised this solution which will observe whether or not a field is a timestamp field. If so, it will forcibly remove the empty fields. This was my best guess at a resolution and it works for m
…alues and also a fix for string columns... doctrine assigns all fields a unsigned property which causes problems with migrations and behaviors. With the unsigned property, I was setting that at runtime a unsigned validator was checking the values of STRINGS to make sure they were numeric. This changeset will observe if the field type is string and remove the unsigned property during the change detection.
@Ocramius Ocramius closed this May 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants