if exists(SELECT * FROM sys.indexes WHERE name='UQ_T_ADDRESS_CdaSectionDocinfoAbsenceContactsInfectious' AND object_id = OBJECT_ID('AKUZ.T_ADDRESS'))
drop index UQ_T_ADDRESS_CdaSectionDocinfoAbsenceContactsInfectious ON AKUZ.T_ADDRESS
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP CONSTRAINT [FK_T_CDA_SECTION_DOCINFO_ABSENCE_CONTACTS_INFECTIOUS_T_ADDRESS_CdaSectionDocinfoAbsenceContactsInfectious]
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP COLUMN [CdaSectionDocinfoAbsenceContactsInfectious_UQ]
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP COLUMN [CdaSectionDocinfoAbsenceContactsInfectious]
GO

if exists(SELECT * FROM sys.indexes WHERE name='UQ_T_ADDRESS_CdaSectionDocinfoChemicalPoisoning' AND object_id = OBJECT_ID('AKUZ.T_ADDRESS'))
drop index UQ_T_ADDRESS_CdaSectionDocinfoChemicalPoisoning ON AKUZ.T_ADDRESS
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP CONSTRAINT [FK_T_CDA_SECTION_DOCINFO_CHEMICAL_POISONING_T_ADDRESS_CdaSectionDocinfoChemicalPoisoning]
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP COLUMN [CdaSectionDocinfoChemicalPoisoning_UQ]
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP COLUMN [CdaSectionDocinfoChemicalPoisoning]
GO

if exists(SELECT * FROM sys.indexes WHERE name='UQ_T_ADDRESS_CdaSectionWorkMedCertificate' AND object_id = OBJECT_ID('AKUZ.T_ADDRESS'))
drop index UQ_T_ADDRESS_CdaSectionWorkMedCertificate ON AKUZ.T_ADDRESS
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP CONSTRAINT [FK_T_CDA_SECTION_WORK_MED_CERTIFICATE_T_ADDRESS_CdaSectionWorkMedCertificate]
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP COLUMN [CdaSectionWorkMedCertificate_UQ]
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP COLUMN [CdaSectionWorkMedCertificate]
GO

if exists(SELECT * FROM sys.indexes WHERE name='UQ_T_ADDRESS_CdaWorkplace' AND object_id = OBJECT_ID('AKUZ.T_ADDRESS'))
drop index UQ_T_ADDRESS_CdaWorkplace ON AKUZ.T_ADDRESS
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP CONSTRAINT [FK_T_CDA_WORKPLACE_T_ADDRESS_CdaWorkplace]
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP COLUMN [CdaWorkplace_UQ]
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP COLUMN [CdaWorkplace]
GO

if exists(SELECT * FROM sys.indexes WHERE name='UQ_T_ADDRESS_DeadpatinfoPerinatalBirthPlace' AND object_id = OBJECT_ID('AKUZ.T_ADDRESS'))
drop index UQ_T_ADDRESS_DeadpatinfoPerinatalBirthPlace ON AKUZ.T_ADDRESS
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP CONSTRAINT [FK_T_CDA_SECTION_DEADPATINFO_PERINATAL_T_ADDRESS_DeadpatinfoPerinatalBirthPlace]
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP COLUMN [DeadpatinfoPerinatalBirthPlace_UQ]
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP COLUMN [DeadpatinfoPerinatalBirthPlace]
GO

if exists(SELECT * FROM sys.indexes WHERE name='UQ_T_ADDRESS_DeadpatinfoPerinatalDeathPlace' AND object_id = OBJECT_ID('AKUZ.T_ADDRESS'))
drop index UQ_T_ADDRESS_DeadpatinfoPerinatalDeathPlace ON AKUZ.T_ADDRESS
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP CONSTRAINT [FK_T_CDA_SECTION_DEADPATINFO_PERINATAL_T_ADDRESS_DeadpatinfoPerinatalDeathPlace]
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP COLUMN [DeadpatinfoPerinatalDeathPlace_UQ]
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP COLUMN [DeadpatinfoPerinatalDeathPlace]
GO

if exists(SELECT * FROM sys.indexes WHERE name='UQ_T_ADDRESS_HospLanamSocanamEdu' AND object_id = OBJECT_ID('AKUZ.T_ADDRESS'))
drop index UQ_T_ADDRESS_HospLanamSocanamEdu ON AKUZ.T_ADDRESS
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP CONSTRAINT [FK_T_HOSP_LANAM_SOCANAM_EDU_T_ADDRESS_HospLanamSocanamEdu]
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP COLUMN [HospLanamSocanamEdu_UQ]
GO
ALTER TABLE [AKUZ].[T_ADDRESS] DROP COLUMN [HospLanamSocanamEdu]
GO