update DOCUMENTS set CONVERSION_STATUS_ID = NULL
/
alter table DOCUMENTS drop constraint FK_CONVERSIONSTATI
/
alter table DOCUMENTS drop column CONVERSION_STATUS_ID
/
alter table CONVERSIONSTATI drop constraint PK_CONVERSIONSTATI
/
delete from CONVERSIONSTATI
/
alter table CONVERSIONSTATI RENAME COLUMN ID TO DOCUMENTID
/
alter table CONVERSIONSTATI add constraint PK_CONVERSIONSTATI primary key (DOCUMENTID)
/
update SYSPARAMETERS set VALUESTRING = '1'  where CONTEXT = 'SYSTEMINFO' and name = 'DBVersionHigh'
/
update SYSPARAMETERS set VALUESTRING = '120' where CONTEXT = 'SYSTEMINFO' and name = 'DBVersionLow'
/
update SYSPARAMETERS set VALUESTRING = '2004-10-25' where CONTEXT = 'SYSTEMINFO' and name = 'DBCreationDate'
/
commit
/