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

renameColumn will changed default from NULL to 'NULL' #2988

Closed
kingshark8848 opened this issue Jan 23, 2018 · 3 comments
Closed

renameColumn will changed default from NULL to 'NULL' #2988

kingshark8848 opened this issue Jan 23, 2018 · 3 comments

Comments

@kingshark8848
Copy link

DB version: MariaDB 10.2.7
Laravel version: 5.5
doctrine/dbal version 2.6

issue description:
When use code below to change column name,

Schema::table('my_table', function (Blueprint $table) {
    $table->renameColumn('from', 'to');
});

it will cause error:
"SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: 'NULL' for column 'c__x5a' at row 1 (SQL: ALTER TABLE xxx CHANGE c__x5 c__x5a DATETIME DEFAULT 'NULL')"

the column's default value is NULL, but was changed to 'NULL' (with single quotes), which caused the error.

@belgattitude
Copy link
Contributor

fixed in master, patch will be released in 2.7

@Ocramius
Copy link
Member

See #2824 and #2825. Closing as duplicate.

@github-actions
Copy link

github-actions bot commented Aug 3, 2022

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 Aug 3, 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