errors while rescanPorts after upgrading to 3.4

Dmitry Morozovsky marck at rinet.ru
Tue Dec 6 11:49:04 EST 2011


On Tue, 6 Dec 2011, Joe Marcus Clarke wrote:


> Did you run the upgrade script?  If so, this query should have been run
> against the DB:

Yes I did, see below.

> ALTER TABLE port_dependencies MODIFY dependency_type VARCHAR(16) CHECK
> (dependency_type IN ('UNKNOWN', 'EXTRACT_DEPENDS', 'PATCH_DEPENDS',
> 'FETCH_DEPENDS', 'BUILD_DEPENDS', 'LIB_DEPENDS', 'RUN_DEPENDS',
> 'TEST_DEPENDS')) DEFAULT 'UNKNOWN';


tb=# ALTER TABLE port_dependencies MODIFY dependency_type VARCHAR(16) CHECK
tb-# (dependency_type IN ('UNKNOWN', 'EXTRACT_DEPENDS', 'PATCH_DEPENDS',
tb(# 'FETCH_DEPENDS', 'BUILD_DEPENDS', 'LIB_DEPENDS', 'RUN_DEPENDS',
tb(# 'TEST_DEPENDS')) DEFAULT 'UNKNOWN';
ERROR:  syntax error at or near "MODIFY"
LINE 1: ALTER TABLE port_dependencies MODIFY dependency_type VARCHAR...
                                      ^
tb=# \d port_dependencies
                                              Table "public.port_dependencies"
       Column       |         Type          |                                   
Modifiers                                    
--------------------+-----------------------+--------------------------------------------------------------------------------
 port_dependency_id | integer               | not null default 
nextval('port_dependencies_port_dependency_id_seq'::regclass)
 build_port_id      | integer               | 
 port_id            | integer               | 
 dependency_type    | character varying(16) | default 'UNKNOWN'::character 
varying
Indexes:
    "port_dependencies_pkey" PRIMARY KEY, btree (port_dependency_id)
    "port_dependencies_build_port_id_idx" btree (build_port_id)
    "port_dependencies_port_id_idx" btree (port_id)
Check constraints:
    "port_dependencies_dependency_type_check" CHECK (dependency_type::text = 
ANY (ARRAY['UNKNOWN'::character varying, 'EXTRACT_DEPENDS'::character varying, 
'PATCH_DEPENDS'::character varying, 'FETCH_DEPENDS'::character varying, 
'BUILD_DEPENDS'::character varying, 'LIB_DEPENDS'::character varying, 
'DEPENDS'::character varying, 'RUN_DEPENDS'::character varying]::text[]))
Foreign-key constraints:
    "port_dependencies_build_port_id_fkey" FOREIGN KEY (build_port_id) 
REFERENCES build_ports(build_port_id) ON UPDATE CASCADE ON DELETE CASCADE
    "port_dependencies_port_id_fkey" FOREIGN KEY (port_id) REFERENCES 
ports(port_id) ON UPDATE CASCADE ON DELETE CASCADE

but this query pair succeeds:

tb=# alter table port_dependencies drop CONSTRAINT 
port_dependencies_dependency_type_check;
ALTER TABLE

tb=# ALTER TABLE port_dependencies add check (
dependency_type IN ('UNKNOWN', 'EXTRACT_DEPENDS', 'PATCH_DEPENDS',
'FETCH_DEPENDS', 'BUILD_DEPENDS', 'LIB_DEPENDS', 'RUN_DEPENDS',
'TEST_DEPENDS')) ;
ALTER TABLE



-- 
Sincerely,
D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
[ FreeBSD committer:                                 marck at FreeBSD.org ]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck at rinet.ru ***
------------------------------------------------------------------------


More information about the tinderbox-list mailing list