ALTER TABLE HISTORIAL_ACCIONES ADD FECHA_HORA TIMESTAMP;
-----
CREATE TRIGGER HISTORIAL_ACCIONES_BI FOR HISTORIAL_ACCIONES
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
  IF (NEW.NRO_HISTORIAL_ACCIONES IS NULL) THEN BEGIN
    NEW.NRO_HISTORIAL_ACCIONES = GEN_ID(ORDEN_GEN, 1);
  END
  NEW.FECHA_HORA = CURRENT_TIMESTAMP;
END
-----
ALTER TABLE COMISIONES_ALUMNOS ALTER NRO_COMISION SET NOT NULL;


