1) Ensure that sequence should be created with Privileges.
2) Updated the validation for blank values in Definition tab.pull/22/head
parent
c4ea1a56bc
commit
a0010aac31
|
@ -364,7 +364,7 @@ class SequenceView(PGChildNodeView):
|
|||
return internal_server_error(errormsg=msg)
|
||||
|
||||
if 'relacl' in data:
|
||||
data['relacl'] = parse_priv_to_db(data['relacl'], 'DATABASE')
|
||||
data['relacl'] = parse_priv_to_db(data['relacl'], self.acl)
|
||||
|
||||
# The SQL below will execute rest DMLs because we cannot execute
|
||||
# CREATE with any other
|
||||
|
|
|
@ -262,6 +262,9 @@ define('pgadmin.node.sequence', [
|
|||
start_lt = gettext('Start value cannot be less than minimum value.'),
|
||||
start_gt = gettext('Start value cannot be greater than maximum value.');
|
||||
|
||||
if (_.isEmpty(minimum) || _.isEmpty(maximum))
|
||||
return null;
|
||||
|
||||
if ((minimum == 0 && maximum == 0) ||
|
||||
(parseInt(minimum, 10) >= parseInt(maximum, 10))) {
|
||||
this.errorModel.set('minimum', min_lt);
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
CREATE SEQUENCE {{ conn|qtIdent(data.schema, data.name) }}{% if data.increment is defined and data.cycled %}
|
||||
|
||||
CYCLE{% endif %}{% if data.increment is defined %}
|
||||
CYCLE{% endif %}{% if data.increment is defined and data.increment|int(-1) > -1 %}
|
||||
|
||||
INCREMENT {{data.increment|int}}{% endif %}{% if data.start is defined %}
|
||||
INCREMENT {{data.increment|int}}{% endif %}{% if data.start is defined and data.start|int(-1) > -1%}
|
||||
|
||||
START {{data.start|int}}{% elif data.current_value is defined %}
|
||||
START {{data.start|int}}{% elif data.current_value is defined and data.current_value|int(-1) > -1%}
|
||||
|
||||
START {{data.current_value|int}}{% endif %}{% if data.minimum is defined %}
|
||||
START {{data.current_value|int}}{% endif %}{% if data.minimum is defined and data.minimum|int(-1) > -1%}
|
||||
|
||||
MINVALUE {{data.minimum|int}}{% endif %}{% if data.maximum is defined %}
|
||||
MINVALUE {{data.minimum|int}}{% endif %}{% if data.maximum is defined and data.maximum|int(-1) > -1%}
|
||||
|
||||
MAXVALUE {{data.maximum|int}}{% endif %}{% if data.cache is defined %}
|
||||
MAXVALUE {{data.maximum|int}}{% endif %}{% if data.cache is defined and data.cache|int(-1) > -1%}
|
||||
|
||||
CACHE {{data.cache|int}}{% endif %};
|
||||
|
||||
|
|
Loading…
Reference in New Issue