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

ALTER TABLE adds COLLATION to changes on numeric columns #3715

Closed
spaceemotion opened this issue Nov 4, 2019 · 5 comments
Closed

ALTER TABLE adds COLLATION to changes on numeric columns #3715

spaceemotion opened this issue Nov 4, 2019 · 5 comments

Comments

@spaceemotion
Copy link

BC Break Report

Q A
BC Break yes
Version 2.10.0

Summary

The latest change in #3668 by @staudenmeir seem to have broken my migrations in MySQL that don't update text columns.

Previous behaviour

ALTER TABLE user_details 
CHANGE vat_amount vat_amount NUMERIC(8, 2) DEFAULT '0' NOT NULL, 
CHANGE vat_included vat_included TINYINT (1) DEFAULT '0' NOT NULL

Current behavior

ALTER TABLE user_details 
CHANGE vat_amount vat_amount NUMERIC(8, 2) DEFAULT '0' NOT NULL, 
CHANGE vat_included vat_included TINYINT (1) CHARACTER SET utf8mb4 DEFAULT '0' NOT NULL COLLATE `utf8mb4_unicode_ci`

How to reproduce

In a Laravel 6 project:

Schema::table('user_details', static function (Blueprint $table) {
    $table->decimal('vat_amount', 8, 2)->default(0)->change();
    $table->boolean('vat_included')->nullable(false)->default(false)->change();
});
@Ocramius
Copy link
Member

Ocramius commented Nov 4, 2019

duplicate of #3714

@spaceemotion
Copy link
Author

Dang, I had this open half an hour ago, went to lunch and submitted when I came back haha.

@williamdes
Copy link
Contributor

Haha submitted before lunch :p

@Ocramius
Copy link
Member

Ocramius commented Nov 4, 2019

s'alright - closing here meanwhile.

@Ocramius Ocramius closed this as completed Nov 4, 2019
@Ocramius Ocramius self-assigned this Nov 4, 2019
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants