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

DROP NOT NULL with DEFAULT #253

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mamonovd
Copy link

Drop both "NOT NULL" and "DEFAULT" on table column.
Switch order of parseDefinition patterns apply, otherwise column which has both "NOT NULL" and "DEFAULT" can't be modified to have none of them.

oldColumn: column_name column_type NOT NULL DEFAULT default_value
newColumn: column_name column_type
diff (v2.6.0): ALTER TABLE...
ALTER COLUMN column_name column_type,
ALTER COLUMN DROP DEFAULT;

but should be: ALTER TABLE...
ALTER COLUMN DROP NOT NULL,
ALTER COLUMN DROP DEFAULT;

Drop both "NOT NULL" and "DEFAULT" constraints on table column
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant