This is a problem with an Oracle database. The problem may be database independent.
If I create a database using this:
create table “VDC”.”PROGRAM2″(
“PGREF” VARCHAR2(50) not null,
“TITLE” VARCHAR2(254) not null,
“ABOUT” VARCHAR2(254),
“EPISODE” VARCHAR2(254),
“RATING” VARCHAR2(50),
“SOTYPE” VARCHAR2(50),
“NSTYPE” VARCHAR2(50),
constraint “PK_PROGRAM2” primary key (“PGREF”)
);
comment on table “VDC”.”PROGRAM2″ is ‘PROGRAM filled from GUIDE database’;
it works as it is supposed to. If I request its DDL, I get:
create table “VDC”.”PROGRAM2″(
“PGREF” VARCHAR2(50) not null,
“TITLE” VARCHAR2(254) not null,
“ABOUT” VARCHAR2(254),
“EPISODE” VARCHAR2(254),
“RATING” VARCHAR2(50),
“SOTYPE” VARCHAR2(50),
“NSTYPE” VARCHAR2(50),
constraint “PK_PROGRAM2” primary key (“PGREF”)
);
comment on table “VDC”.”PROGRAM2″ is ‘PROGRAM filled from GUIDE database’;
create unique index “VDC”.”PK_PROGRAM2″ on “VDC”.”PROGRAM2″(“PGREF”);
which does not work because the index has already been defined. If there is a primary key, the DDL should not also create it as a unique index.