Fix typo. Fixes #1596
parent
49ee8abb72
commit
a91f19a21d
|
@ -8,7 +8,7 @@ CREATE{% if data.is_constraint_trigger %} CONSTRAINT{% endif %} TRIGGER {{ conn|
|
|||
{{data.fires}} {% if data.evnt_insert %}INSERT{% set or_flag = True %}
|
||||
{% endif %}{% if data.evnt_delete %}
|
||||
{% if or_flag %} OR {% endif %}DELETE{% set or_flag = True %}
|
||||
{% endif %}{% if data.evnt_turncate %}
|
||||
{% endif %}{% if data.evnt_truncate %}
|
||||
{% if or_flag %} OR {% endif %}TRUNCATE{% set or_flag = True %}
|
||||
{% endif %}{% if data.evnt_update %}
|
||||
{% if or_flag %} OR {% endif %}UPDATE {% if data.columns|length > 0 %}OF {% for c in data.columns %}{% if loop.index != 1 %}, {% endif %}{{ conn|qtIdent(c.column) }}{% endfor %}{% endif %}
|
||||
|
|
|
@ -9,7 +9,7 @@ CREATE OR REPLACE TRIGGER {{ conn|qtIdent(data.name) }}
|
|||
{{o_data.fires}} {% if o_data.evnt_insert %}INSERT{% set or_flag = True %}
|
||||
{% endif %}{% if o_data.evnt_delete %}
|
||||
{% if or_flag %} OR {% endif %}DELETE{% set or_flag = True %}
|
||||
{% endif %}{% if o_data.evnt_turncate %}
|
||||
{% endif %}{% if o_data.evnt_truncate %}
|
||||
{% if or_flag %} OR {% endif %}TRUNCATE{% set or_flag = True %}
|
||||
{% endif %}{% if o_data.evnt_update %}
|
||||
{% if or_flag %} OR {% endif %}UPDATE {% if o_data.columns|length > 0 %}OF {% for c in o_data.columns %}{% if loop.index != 1 %}, {% endif %}{{ conn|qtIdent(c.column) }}{% endfor %}{% endif %}
|
||||
|
|
|
@ -464,9 +464,9 @@ class TriggerView(PGChildNodeView):
|
|||
data['evnt_update'] = False
|
||||
|
||||
if data['tgtype'] & self.trigger_definition['TRIGGER_TYPE_TRUNCATE']:
|
||||
data['evnt_turncate'] = True
|
||||
data['evnt_truncate'] = True
|
||||
else:
|
||||
data['evnt_turncate'] = False
|
||||
data['evnt_truncate'] = False
|
||||
|
||||
return data
|
||||
|
||||
|
|
|
@ -367,7 +367,7 @@ function($, _, S, pgAdmin, pgBrowser, Backform, alertify) {
|
|||
return m.inSchemaWithModelCheck.apply(this, [m]);
|
||||
}
|
||||
},{
|
||||
id: 'evnt_turncate', label:'{{ _('TRUNCATE') }}',
|
||||
id: 'evnt_truncate', label:'{{ _('TRUNCATE') }}',
|
||||
type: 'switch', group: '{{ _('Events') }}',
|
||||
control: Backform.CustomSwitchControl,
|
||||
disabled: function(m) {
|
||||
|
@ -471,10 +471,10 @@ function($, _, S, pgAdmin, pgBrowser, Backform, alertify) {
|
|||
return msg;
|
||||
}
|
||||
|
||||
if(!this.get('evnt_turncate') && !this.get('evnt_delete') &&
|
||||
if(!this.get('evnt_truncate') && !this.get('evnt_delete') &&
|
||||
!this.get('evnt_update') && !this.get('evnt_insert')) {
|
||||
msg = '{{ _('Specify at least one event.') }}';
|
||||
this.errorModel.set('evnt_turncate', " ");
|
||||
this.errorModel.set('evnt_truncate', " ");
|
||||
this.errorModel.set('evnt_delete', " ");
|
||||
this.errorModel.set('evnt_update', " ");
|
||||
this.errorModel.set('evnt_insert', msg);
|
||||
|
|
|
@ -297,9 +297,9 @@ def trigger_definition(data):
|
|||
data['evnt_update'] = False
|
||||
|
||||
if data['tgtype'] & trigger_definition['TRIGGER_TYPE_TRUNCATE']:
|
||||
data['evnt_turncate'] = True
|
||||
data['evnt_truncate'] = True
|
||||
else:
|
||||
data['evnt_turncate'] = False
|
||||
data['evnt_truncate'] = False
|
||||
|
||||
return data
|
||||
|
||||
|
|
Loading…
Reference in New Issue