#
# MySQL upgrade script for upgrade database from version 2.0.8 to 2.0.9
# 

#-----------------------------------------------------------------------------
#-- faconnage_format
#-----------------------------------------------------------------------------

SET FOREIGN_KEY_CHECKS = 0;

ALTER TABLE `faconnage_format` DROP FOREIGN KEY `faconnage_format_FK_1`;
ALTER TABLE `faconnage_format` DROP FOREIGN KEY `faconnage_format_FK_2`;

ALTER TABLE `faconnage_format`
            ADD CONSTRAINT `faconnage_format_FK_1`
                        FOREIGN KEY (`format_id`)
                        REFERENCES `format` (`id`)
                        ON DELETE CASCADE;
ALTER TABLE `faconnage_format`
            ADD CONSTRAINT `faconnage_format_FK_2`
                        FOREIGN KEY (`faconnage_id`)
                        REFERENCES `faconnage` (`id`)
                        ON DELETE CASCADE;

SET FOREIGN_KEY_CHECKS = 1;

