update DOCUMENTS set CONVERSION_STATUS_ID = NULL;
alter table DOCUMENTS drop constraint FK_CONVERSIONSTATI;
alter table DOCUMENTS drop CONVERSION_STATUS_ID;

alter table CONVERSIONSTATI drop constraint PK_CONVERSIONSTATI;
delete from CONVERSIONSTATI;
alter table CONVERSIONSTATI alter 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;