declare
    object_exists exception;
    pragma exception_init (object_exists , -00001);
begin
	execute immediate 'update CATEGORIA_DESCUENTO set indSegunda = 1 where indSegunda is null';
	execute immediate 'update CATEGORIA_DESCUENTO set indTerca = 1 where indTerca is null';
	execute immediate 'update CATEGORIA_DESCUENTO set indQuarta = 1 where indQuarta is null';
	execute immediate 'update CATEGORIA_DESCUENTO set indQuinta = 1 where indQuinta is null';
	execute immediate 'update CATEGORIA_DESCUENTO set indSexta = 1 where indSexta is null';
	execute immediate 'update CATEGORIA_DESCUENTO set indSabado = 1 where indSabado is null';
	execute immediate 'update CATEGORIA_DESCUENTO set indDomingo = 1 where indDomingo is null';
	exception when object_exists then null;
end;

/

declare
    object_exists exception;
    pragma exception_init (object_exists , -01442);
begin
	execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO MODIFY (INDSEGUNDA NOT NULL)';
	execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO MODIFY (INDTERCA NOT NULL)';
	execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO MODIFY (INDQUARTA NOT NULL)';
	execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO MODIFY (INDQUINTA NOT NULL)';
	execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO MODIFY (INDSEXTA NOT NULL)';
	execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO MODIFY (INDSABADO NOT NULL)';
	execute immediate 'ALTER TABLE CATEGORIA_DESCUENTO MODIFY (INDDOMINGO NOT NULL)';
	exception when object_exists then null;
end;
