mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-25 10:10:19 -06:00
Fixed an issue where schema diff does not create DROP DEFAULT statement for columns. Fixes #6377
This commit is contained in:
parent
b853bda2a2
commit
7d6f077cf8
@ -19,4 +19,5 @@ Bug fixes
|
||||
|
||||
| `Issue #6329 <https://redmine.postgresql.org/issues/6329>`_ - Fixed an issue where the wrong SQL is showing for the child partition tables.
|
||||
| `Issue #6341 <https://redmine.postgresql.org/issues/6341>`_ - Fixed an issue where CSV download quotes the numeric columns.
|
||||
| `Issue #6377 <https://redmine.postgresql.org/issues/6377>`_ - Fixed an issue where schema diff does not create DROP DEFAULT statement for columns.
|
||||
| `Issue #6385 <https://redmine.postgresql.org/issues/6385>`_ - Ensure that Backup and Restore should work on shared servers.
|
||||
|
@ -31,7 +31,7 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.table)}}
|
||||
|
||||
{% endif %}
|
||||
{### Drop column default value ###}
|
||||
{% if data.defval is defined and data.defval == '' and data.defval != o_data.defval %}
|
||||
{% if data.defval is defined and (data.defval == '' or data.defval is none) and data.defval != o_data.defval %}
|
||||
ALTER TABLE {{conn|qtIdent(data.schema, data.table)}}
|
||||
ALTER COLUMN {% if data.name %}{{conn|qtTypeIdent(data.name)}}{% else %}{{conn|qtTypeIdent(o_data.name)}}{% endif %} DROP DEFAULT;
|
||||
|
||||
|
@ -31,7 +31,7 @@ ALTER TABLE {{conn|qtIdent(data.schema, data.table)}}
|
||||
|
||||
{% endif %}
|
||||
{### Drop column default value ###}
|
||||
{% if data.defval is defined and data.defval == '' and data.defval != o_data.defval %}
|
||||
{% if data.defval is defined and (data.defval == '' or data.defval is none) and data.defval != o_data.defval %}
|
||||
ALTER TABLE {{conn|qtIdent(data.schema, data.table)}}
|
||||
ALTER COLUMN {% if data.name %}{{conn|qtTypeIdent(data.name)}}{% else %}{{conn|qtTypeIdent(o_data.name)}}{% endif %} DROP DEFAULT;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user