Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diff for LONGVARCHAR false positive (MySQL) #1489

Open
stefankleff opened this issue Jul 27, 2018 · 3 comments · May be fixed by #1986
Open

Diff for LONGVARCHAR false positive (MySQL) #1489

stefankleff opened this issue Jul 27, 2018 · 3 comments · May be fixed by #1986
Labels

Comments

@stefankleff
Copy link

Running propel:diff with a LONGVARCHAR column type finds differences, even they don't exist.

Cause:
During reverse lookup of the schema:
SQL::MEDIUMTEXT is parsed as Propel::LONGVARCHAR
see MySQLSchemaParser::$mysqlTypeMap

Schema based on mapping config:
Propel::LONGVARCHAR is mapped to SQL::TEXT
see MySQLPlatform::initialize()

MysqlPlatform::getColumnDDL() is creating:
from: "foobar TEXT"
to: "foobar MEDIUMTEXT"
because it uses the raw sqlType stored in the column object.

@dereuromark dereuromark added the Bug label Jul 1, 2020
@dereuromark
Copy link
Contributor

Is this still relevant or can it be closed?

@mhabibi
Copy link

mhabibi commented Dec 17, 2021

I am experiencing similar issue.

I have <column name="field_name" type="CLOB" sqlType="MEDIUMTEXT"/> in my schema and it generates the following migration repeatedly when running diff:

ALTER TABLE `my_table` CHANGE `field_name` `ci_comments` MEDIUMTEXT

Is there a workaround?

@ghost
Copy link

ghost commented Nov 23, 2023

This is still an issue with mediumtext and CLOB. Also with mediumtext and LONGVARCHAR. This makes us unable to keep dev and production in sync.

@mringler mringler linked a pull request Nov 29, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants