-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
Having issue with not null keywork while using ->virtualAs #16643
Comments
I assume same error on stored function but not tested! |
Can you please share more details about the issue? I don't seem to understand. Can you share the sql output of the migration that fails and the complete error message you get from the DB engine? |
here you go:
|
I've opened a PR to fix this, I was waiting because I thought you would submit one... |
@fernandobandeira thanks I really don't know much about sending patch stuff, but I am glad you did! |
Description:
Got syntax error using MariaDB version 10.1.13
('not null,
created_at
timestamp)I think when adding virtual column not null will be not as virtual generated column can't be nulled.
I used --prepend method and removed not null keyword and query get accepted.
Steps To Reproduce:
make migration using following query:
My Workaround (author may have better way):
@ /vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php
The text was updated successfully, but these errors were encountered: