# ---------------------------------------------------------------------- #
# Drop foreign key constraints                                           #
# ---------------------------------------------------------------------- #


# ---------------------------------------------------------------------- #
# Modify table "ARTICOLO_FORNITORE"                                      #
# ---------------------------------------------------------------------- #

ALTER TABLE `ARTICOLO_FORNITORE` ADD COLUMN `flgAbituale` INTEGER;

# ---------------------------------------------------------------------- #
# Modify table "HELP"                                                    #
# ---------------------------------------------------------------------- #

ALTER TABLE `HELP` MODIFY `indici` VARCHAR(1000);


# ---------------------------------------------------------------------- #
# Modify table "ALLEGATO_CLIFOR"                                         #
# ---------------------------------------------------------------------- #

ALTER TABLE `ALLEGATO_CLIFOR` MODIFY `nomeFile` VARCHAR(254);

# ---------------------------------------------------------------------- #
# Modify table "ALLEGATO_DOCUMENTO"                                      #
# ---------------------------------------------------------------------- #

ALTER TABLE `ALLEGATO_DOCUMENTO` MODIFY `nomeFile` VARCHAR(254);

# ---------------------------------------------------------------------- #
# Add table "RIGA_DOCUMENTO_PM"                                          #
# ---------------------------------------------------------------------- #

CREATE TABLE `RIGA_DOCUMENTO_P_M` (
    `id_rigaDocumento` INTEGER NOT NULL,
    `id_rigaDocumentoPrelevata` INTEGER NOT NULL,
    `quantitaPrelevata` DOUBLE,
    CONSTRAINT `PK_RIGA_DOCUMENTO_PM` PRIMARY KEY (`id_rigaDocumento`, `id_rigaDocumentoPrelevata`)
);

# ---------------------------------------------------------------------- #
# Add foreign key constraints                                            #
# ---------------------------------------------------------------------- #
