Skip to content

Commit

Permalink
Fixed issues reported while testing feature #6378
Browse files Browse the repository at this point in the history
  • Loading branch information
pravesh-sharma authored Sep 13, 2023
1 parent aa973fc commit d69b428
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

){% 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 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 %}

{% if data.default_amname and data.default_amname != data.amname and data.amname is not none %}
USING {{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 %}

{% if with_clause %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

){% 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 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 %}

{% if data.default_amname and data.default_amname != data.amname and data.amname is not none %}
USING {{data.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 %}

{% if with_clause %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,14 @@ export default class MViewSchema extends BaseUISchema {
},
}, {
id: 'amname', label: gettext('Access Method'), group: gettext('Definition'),
type: 'select', mode: ['create', 'properties', 'edit'], min_version: 120000,
options: obj.fieldOptions.table_amname_list,
type: (state)=>{
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) => {
if (obj.getServerVersion() < 150000 && !obj.isNew(state)) {
return true;
Expand Down

0 comments on commit d69b428

Please sign in to comment.