[OpenSIPS-Devel] [ opensips-Bugs-3065000 ] ocp_admin_privileges.pgsql error
SourceForge.net
noreply at sourceforge.net
Wed Sep 15 14:39:38 CEST 2010
Bugs item #3065000, was opened at 2010-09-13 05:56
Message generated for change (Settings changed) made by bogdan_iancu
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3065000&group_id=232389
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: tools
Group: 1.6.x
Status: Open
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: jrudolph (jrudolph75)
>Assigned to: Alex Ionescu (untiptun)
Summary: ocp_admin_privileges.pgsql error
Initial Comment:
the script ocp_admin_privileges.pgsql creates errors with latest psql version 8.4.4
The first problem:
ERROR: relation "admin_id_seq" already exists
ERROR: syntax error at or near "("
LINE 2: id int(10) integer Primary KEY DEFAULT nextval(admin_id_se...
^
SET
Removing the int(10) before the integer declaration moves past this error.
After int(10) removed:
ERROR: relation "admin_id_seq" already exists
ERROR: column "admin_id_seq" does not exist
SET
This was ran against a fresh database install with the only previous entry being "opensipsdbctl create"
The complete script as delivered in the 1.6.3 tarball:
CREATE SEQUENCE admin_id_seq;
CREATE TABLE ocp_admin_privileges (
id int(10) integer Primary KEY DEFAULT nextval(admin_id_seq),
first_name text NOT NULL default '',
last_name text NOT NULL default '',
username text NOT NULL default '',
password text NOT NULL default '',
ha1 text default '',
available_tools text NOT NULL default '',
permissions text default NULL
);
SET CLIENT_ENCODING TO 'latin1' ;
----------------------------------------------------------------------
Comment By: jrudolph (jrudolph75)
Date: 2010-09-13 06:21
Message:
The following changes correct the script. Changes are removing "int(11)"
before integer declaration on line 3 and adding single quotes around
admin_id_seq in the nextval() function on line 3.
CREATE SEQUENCE admin_id_seq;
CREATE TABLE ocp_admin_privileges (
id integer Primary KEY DEFAULT nextval('admin_id_seq'),
first_name text NOT NULL default '',
last_name text NOT NULL default '',
username text NOT NULL default '',
password text NOT NULL default '',
ha1 text default '',
available_tools text NOT NULL default '',
permissions text default NULL
);
SET CLIENT_ENCODING TO 'latin1' ;
----------------------------------------------------------------------
Comment By: jrudolph (jrudolph75)
Date: 2010-09-13 06:15
Message:
Sorry, double post was caused by the browser back button.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3065000&group_id=232389
More information about the Devel
mailing list