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

ROW_FORMAT error when change to default #22

Open
WADS94 opened this issue Nov 7, 2017 · 0 comments
Open

ROW_FORMAT error when change to default #22

WADS94 opened this issue Nov 7, 2017 · 0 comments

Comments

@WADS94
Copy link

WADS94 commented Nov 7, 2017

If the from table has a ROW_FORMAT and the to table doesn't the migration sql is:
ALTER TABLE table_name
ROW_FORMAT=;

Which is not a correct format, it should be ROW_FORMAT=DEFAULT

From what I looked the problem is in Camcima\MySqlDiff\Model\ChangedTable:383
$tableChanges[] = sprintf('ROW_FORMAT=%s', $this->toTable->getRowFormat());
And this fix it:
$toRowFormat = $this->toTable->getRowFormat(); if( empty($toRowFormat) ){ $toRowFormat = 'DEFAULT'; } $tableChanges[] = sprintf('ROW_FORMAT=%s', $toRowFormat);
If you think this is ok , I can make PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant