
/*DOC_DOCUMENTOCOMENTARIO*/
if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='doc_documentoComentario' and column_name = 'id_usuario' )
begin
alter table [doc_documentoComentario] add [id_usuario] int  NOT NULL DEFAULT 0
end
if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='doc_documentoComentario' and column_name = 'id_tarea' )
begin
alter table [doc_documentoComentario] add [id_tarea] int NOT NULL DEFAULT 0
 end
if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='doc_documentoComentario' and column_name = 'fechaRecordar_fh' )
begin
alter table [doc_documentoComentario] add [fechaRecordar_fh] smalldatetime NOT NULL DEFAULT 01/01/1900
 end
if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='doc_documentoComentario' and column_name = 'cerrada' )
begin
alter table [doc_documentoComentario] add [cerrada] bit NOT NULL DEFAULT 0
 end
if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='doc_documentoComentario' and column_name = 'id_documentoComentario' )
begin
alter table [doc_documentoComentario] add [id_documentoComentario] int NOT NULL DEFAULT 0
end
if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='doc_documentoComentario' and column_name = 'id_documento' )
begin
alter table [doc_documentoComentario] add [id_documento] int NOT NULL DEFAULT 0
end

/*DOC_TAREA*/



if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='doc_tarea' and column_name = 'id_catalogo' )
begin
alter table [doc_tarea] add [id_catalogo] int  NOT NULL DEFAULT 0
end
if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='doc_tarea' and column_name = 'id_cargo' )
begin
alter table [doc_tarea] add [id_cargo] int  NOT NULL DEFAULT 0
 end
if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='doc_tarea' and column_name = 'fechaPlaneada_fh' )
begin
alter table [doc_tarea] add [fechaPlaneada_fh] smalldatetime NOT NULL DEFAULT 01/01/1900
end
if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='doc_tarea' and column_name = 'porcentajeAvance' )
begin
alter table [doc_tarea] add [porcentajeAvance] int NOT NULL DEFAULT 0
 end
if not exists(select * FROM INFORMATION_SCHEMA.COLUMNS  where Table_Name='doc_tarea' and column_name = 'id_documento' )
begin
alter table [doc_tarea] add [id_documento] int NOT NULL DEFAULT 0
end