if not exists(select 1
				from sysobjects a inner join 
					 sysconstraints b on a.id = b.constid
				where a.id = object_id('PK_ADM_ERRO'))
begin
	ALTER TABLE dbo.ADM_ERRO ADD CONSTRAINT
		PK_ADM_ERRO PRIMARY KEY CLUSTERED 
		(
		codigo
		) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]


	ALTER TABLE dbo.ADM_ERRO SET (LOCK_ESCALATION = TABLE)
end
