mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed issues reported while testing feature #6378
This commit is contained in:
parent
aa973fc8ae
commit
d69b4282c8
@ -81,16 +81,17 @@ CACHE {{c.seqcache|int}} {% endif %}
|
|||||||
{% if data.like_relation or data.coll_inherits or data.columns|length > 0 or data.primary_key|length > 0 or data.unique_constraint|length > 0 or data.foreign_key|length > 0 or data.check_constraint|length > 0 or data.exclude_constraint|length > 0 %}
|
{% if data.like_relation or data.coll_inherits or data.columns|length > 0 or data.primary_key|length > 0 or data.unique_constraint|length > 0 or data.foreign_key|length > 0 or data.check_constraint|length > 0 or data.exclude_constraint|length > 0 %}
|
||||||
|
|
||||||
){% endif %}{% if data.relkind is defined and data.relkind == 'p' %} PARTITION BY {{ data.partition_scheme }}{% endif %}
|
){% endif %}{% if data.relkind is defined and data.relkind == 'p' %} PARTITION BY {{ data.partition_scheme }}{% endif %}
|
||||||
{% if not data.coll_inherits and not data.spcname and not with_clause %};{% endif %}
|
{% if not data.coll_inherits and not data.spcname and not with_clause and not data.amname %};{% endif %}
|
||||||
|
|
||||||
{### If we are inheriting it from another table(s) ###}
|
{### If we are inheriting it from another table(s) ###}
|
||||||
{% if data.coll_inherits %}
|
{% if data.coll_inherits %}
|
||||||
INHERITS ({% for val in data.coll_inherits %}{% if loop.index != 1 %}, {% endif %}{{val}}{% endfor %}){% if not data.spcname and not with_clause %};{% endif %}
|
INHERITS ({% for val in data.coll_inherits %}{% if loop.index != 1 %}, {% endif %}{{val}}{% endfor %}){% if not data.spcname and not with_clause and not data.amname %};{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if data.default_amname and data.default_amname != data.amname and data.amname is not none %}
|
{% if data.default_amname and data.default_amname != data.amname and data.amname is not none %}
|
||||||
USING {{data.amname}}
|
USING {{data.amname}}
|
||||||
{% elif not data.default_amname and data.amname %}
|
{% elif not data.default_amname and data.amname %}
|
||||||
USING {{data.amname}}
|
USING {{data.amname}}{% if not data.spcname and not with_clause %};{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if with_clause %}
|
{% if with_clause %}
|
||||||
|
@ -83,16 +83,17 @@ CACHE {{c.seqcache|int}} {% endif %}
|
|||||||
{% if data.like_relation or data.coll_inherits or data.columns|length > 0 or data.primary_key|length > 0 or data.unique_constraint|length > 0 or data.foreign_key|length > 0 or data.check_constraint|length > 0 or data.exclude_constraint|length > 0 %}
|
{% if data.like_relation or data.coll_inherits or data.columns|length > 0 or data.primary_key|length > 0 or data.unique_constraint|length > 0 or data.foreign_key|length > 0 or data.check_constraint|length > 0 or data.exclude_constraint|length > 0 %}
|
||||||
|
|
||||||
){% endif %}{% if data.relkind is defined and data.relkind == 'p' %} PARTITION BY {{ data.partition_scheme }}{% endif %}
|
){% endif %}{% if data.relkind is defined and data.relkind == 'p' %} PARTITION BY {{ data.partition_scheme }}{% endif %}
|
||||||
{% if not data.coll_inherits and not data.spcname and not with_clause %};{% endif %}
|
{% if not data.coll_inherits and not data.spcname and not with_clause and not data.amname %};{% endif %}
|
||||||
|
|
||||||
{### If we are inheriting it from another table(s) ###}
|
{### If we are inheriting it from another table(s) ###}
|
||||||
{% if data.coll_inherits %}
|
{% if data.coll_inherits %}
|
||||||
INHERITS ({% for val in data.coll_inherits %}{% if loop.index != 1 %}, {% endif %}{{val}}{% endfor %}){% if not data.spcname and not with_clause %};{% endif %}
|
INHERITS ({% for val in data.coll_inherits %}{% if loop.index != 1 %}, {% endif %}{{val}}{% endfor %}){% if not data.spcname and not with_clause and not data.amname %};{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if data.default_amname and data.default_amname != data.amname and data.amname is not none %}
|
{% if data.default_amname and data.default_amname != data.amname and data.amname is not none %}
|
||||||
USING {{data.amname}}
|
USING {{data.amname}}
|
||||||
{% elif data.amname and not data.default_amname %}
|
{% elif data.amname and not data.default_amname %}
|
||||||
USING {{data.amname}}
|
USING {{data.amname}}{% if not data.spcname and not with_clause %};{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if with_clause %}
|
{% if with_clause %}
|
||||||
|
@ -87,8 +87,14 @@ export default class MViewSchema extends BaseUISchema {
|
|||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
id: 'amname', label: gettext('Access Method'), group: gettext('Definition'),
|
id: 'amname', label: gettext('Access Method'), group: gettext('Definition'),
|
||||||
type: 'select', mode: ['create', 'properties', 'edit'], min_version: 120000,
|
type: (state)=>{
|
||||||
options: obj.fieldOptions.table_amname_list,
|
return {
|
||||||
|
type: 'select', options: obj.fieldOptions.table_amname_list,
|
||||||
|
controlProps: {
|
||||||
|
allowClear: obj.isNew(state) ? true : false,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}, mode: ['create', 'properties', 'edit'], min_version: 120000,
|
||||||
disabled: (state) => {
|
disabled: (state) => {
|
||||||
if (obj.getServerVersion() < 150000 && !obj.isNew(state)) {
|
if (obj.getServerVersion() < 150000 && !obj.isNew(state)) {
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user