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

Generating alter column when not needed and autocomplete primary issue #57

Closed
andrewpros opened this issue Aug 18, 2019 · 4 comments
Closed
Assignees
Labels

Comments

@andrewpros
Copy link

andrewpros commented Aug 18, 2019

Hi.

Looks like migration update with -g=0 generates the same columns alter code over and over with tinyInteger or smallInteger.

Also, still with -g=0 parameter, it generates double autoincremet primary key string when the first time migration generate was in g=1 mode, string like this

$this->integer(11)->notNull()->append('AUTO_INCREMENT PRIMARY KEY AUTO_INCREMENT PRIMARY KEY')

@andrewpros andrewpros changed the title Generating alter column when not needed. Generating alter column when not needed and autocomplete primary issue Aug 18, 2019
@bizley
Copy link
Owner

bizley commented Aug 19, 2019

Could you paste here SQL for the table that makes this problem? Initial SQL and SQL for update. And please state the DB engine you are using.

Do I understand it correctly? - generating that migration with -g=0 and then generating update migration without any change creates the migration with alters?

@bizley bizley self-assigned this Aug 19, 2019
@bizley bizley added the bug label Aug 19, 2019
@andrewpros
Copy link
Author

Yeah, generating migration update with the same set of parameters generates alters but with exactly the same migration code for tinyInteger or smallInteger that is already there.
I will provide more details later.

@bizley
Copy link
Owner

bizley commented Oct 10, 2019

Fixed in 3.6.2 / 2.9.2.

Thanks!

@bizley bizley closed this as completed Oct 10, 2019
@andrewpros
Copy link
Author

Ahh, totally forgot about this, i was on tight schedule so i just corrected it manually, sorry, but nevertheless thx for fix.

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

No branches or pull requests

2 participants