
# ---------------------------------------------------------------------- #
# Alter table "CLIFOR"                                                   #
# ---------------------------------------------------------------------- #

ALTER TABLE `CLIFOR` ADD COLUMN `flgStatoConfermaDati` INTEGER;

# ---------------------------------------------------------------------- #
# Add table "CLIFOR_LOG"                                                 #
# ---------------------------------------------------------------------- #

CREATE TABLE `CLIFOR_LOG` (
    `id_cliforLog` INTEGER NOT NULL AUTO_INCREMENT,
    `id_clifor` INTEGER,
    `id_users` INTEGER,
    `tsCliforlog` DATETIME,
    `dataCliforlog` DATE,
    `descrizioneCliforlog` VARCHAR(1000),
    CONSTRAINT `PK_CLIFOR_LOG` PRIMARY KEY (`id_cliforLog`)
);

ALTER TABLE `CLIFOR_LOG` ADD CONSTRAINT `CLIFOR_CLIFOR_LOG` 
    FOREIGN KEY (`id_clifor`) REFERENCES `CLIFOR` (`id_clifor`);

ALTER TABLE `CLIFOR_LOG` ADD CONSTRAINT `USERS_CLIFOR_LOG` 
    FOREIGN KEY (`id_users`) REFERENCES `USERS` (`id_users`);
