-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Migration. Alter table, set as NULL, PostgreSQL. #11958
Comments
Hi.
Saludos. |
Hi.
The problem is that Yii build the same code for alter column and create table SQL commands.
The same SQL is generated for ALTER COLUMN, this is wrong. The correct code for ALTER COLUMN is SET DEFAULT true. Saludos. |
Duplicates #9903 |
@lalviarez solution worked for me, thanks! |
Hello,
In user table I have two columns: first_name and last_name and currently NOT NULL is set to Yes - I'm not allowed to create a new user without first name and last name.
This is how the migration looks:
and this is the error:
Of course, I can change the column manually:
ALTER TABLE "user" ALTER COLUMN "first_name" SET DEFAULT NULL;
but I'm interested why this doesn't work.
Nedim
The text was updated successfully, but these errors were encountered: