alter table Trn_TraEspPedDetalle
add Itinerario varchar(1000) null
go
alter table Trn_TraEspContratoDet
add Itinerario varchar(1000) null
go
alter table Trn_TraEspResDetalle
add Itinerario varchar(1000) null
go
alter table trn_traespfuec
add Itinerario varchar(1000) null
go
/****** Object:  Table [dbo].[TiposAdendos]    Script Date: 20/04/2018 8:41:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TiposAdendos]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[TiposAdendos](
	[IdAdendo] [varchar](4) NOT NULL,
	[NomAdendo] [varchar](50) NOT NULL,
	[TipoDato] [varchar](15) NOT NULL DEFAULT ('VARCHAR'),
	[Inactivo] [bit] NOT NULL DEFAULT ((0)),
 CONSTRAINT [PK_TiposAdendos] PRIMARY KEY CLUSTERED 
(
	[IdAdendo] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
SET ANSI_PADDING OFF
GO
IF NOT EXISTS (SELECT * FROM sys.check_constraints WHERE object_id = OBJECT_ID(N'[dbo].[CK_TiposAdendos_IdAdendo]') AND parent_object_id = OBJECT_ID(N'[dbo].[TiposAdendos]'))
ALTER TABLE [dbo].[TiposAdendos]  WITH CHECK ADD  CONSTRAINT [CK_TiposAdendos_IdAdendo] CHECK  ((len([IdAdendo])>(0)))
GO
IF  EXISTS (SELECT * FROM sys.check_constraints WHERE object_id = OBJECT_ID(N'[dbo].[CK_TiposAdendos_IdAdendo]') AND parent_object_id = OBJECT_ID(N'[dbo].[TiposAdendos]'))
ALTER TABLE [dbo].[TiposAdendos] CHECK CONSTRAINT [CK_TiposAdendos_IdAdendo]
GO
IF NOT EXISTS (SELECT * FROM sys.check_constraints WHERE object_id = OBJECT_ID(N'[dbo].[CK_TiposAdendos_NomAdendo]') AND parent_object_id = OBJECT_ID(N'[dbo].[TiposAdendos]'))
ALTER TABLE [dbo].[TiposAdendos]  WITH CHECK ADD  CONSTRAINT [CK_TiposAdendos_NomAdendo] CHECK  ((len([NomAdendo])>(0)))
GO
IF  EXISTS (SELECT * FROM sys.check_constraints WHERE object_id = OBJECT_ID(N'[dbo].[CK_TiposAdendos_NomAdendo]') AND parent_object_id = OBJECT_ID(N'[dbo].[TiposAdendos]'))
ALTER TABLE [dbo].[TiposAdendos] CHECK CONSTRAINT [CK_TiposAdendos_NomAdendo]
GO
