Postgres default value parsing regression #152

Closed
apinstein opened this Issue Oct 19, 2011 · 3 comments

Comments

Projects
None yet
3 participants
Contributor

apinstein commented Oct 19, 2011

e2067a8#L1R225

Introduces a regression bug in postgres "reverse" whereby:

phone        | character varying(20)    | default ''::character varying

turns into

<column name="phone" phpName="Phone" type="VARCHAR" size="20" required="false" defaultValue="'"/>

Notice the ' as the literal default value.

The bug was introduced when this bug was fixed (from trac) http://trac.propelorm.org/ticket/1150.

I'm not familiar with that situation so I can't even regression test a fix to be sure it doesn't break his.

Member

fzaninotto commented Oct 30, 2011

Regression introduced in http://trac.propelorm.org/changeset/2022. Can a Propel dev with a pgsql install take a look?

Member

fzaninotto commented Oct 30, 2011

By the way, the quoted changeset doesn't include unit tests. This is typically something that we must avoid.

@apinstein apinstein added a commit to apinstein/Propel that referenced this issue Mar 3, 2012

@apinstein apinstein [gh-152] Revert change that was made to postgres schema parsing that
causes regressions and has no tests. Add tests for my case. I do not
understand the case that the person who introduced the bug was trying to
solve.
365ba2f

@apinstein apinstein added a commit to apinstein/Propel that referenced this issue Mar 3, 2012

@apinstein apinstein [gh-152] Revert change that was made to postgres schema parsing that
causes regressions and has no tests. Add tests for my case. I do not
understand the case that the person who introduced the bug was trying to
solve.
4c772ce

@willdurand willdurand added a commit that referenced this issue Mar 5, 2012

@apinstein @willdurand apinstein + willdurand [gh-152] Revert change that was made to postgres schema parsing that
causes regressions and has no tests. Add tests for my case. I do not
understand the case that the person who introduced the bug was trying to
solve.
865511a
Owner

willdurand commented Mar 6, 2012

Fixed.

willdurand closed this Mar 6, 2012

apinstein referenced this issue in propelorm/Propel2 Nov 18, 2011

Closed

Postgres default value parsing regression #55

@willdurand willdurand added a commit that referenced this issue Sep 9, 2013

@willdurand willdurand Merge pull request #152 from natecj/patch-1
Update cookbook/user-contributed-behaviors.markdown
bcccfc0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment