GO
IF NOT EXISTS(SELECT 1 FROM syscolumns WHERE ID = OBJECT_ID('GLB_MOV_OP') AND NAME = 'FLAG_NAO_GERAR_ARQ_SPED')
BEGIN  
	ALTER TABLE dbo.GLB_MOV_OP ADD
		FLAG_NAO_GERAR_ARQ_SPED int NULL

	ALTER TABLE dbo.GLB_MOV_OP ADD CONSTRAINT
		DF_GLB_MOV_OP_FLAG_NAO_GERAR_ARQ_SPED DEFAULT ((0)) FOR FLAG_NAO_GERAR_ARQ_SPED
    
END