CREATE TABLE `ad_discountgroup` (
	`pk_discountgroup` INT(11) NOT NULL AUTO_INCREMENT,
	`id` TEXT NULL,
	`name` TEXT NULL,
	`active` BIT(1) NULL DEFAULT NULL,
	`ModificationDate` DATETIME NULL DEFAULT NULL,
	PRIMARY KEY (`pk_discountgroup`)
)
COLLATE='utf8_general_ci'
;

CREATE TABLE `ad_discountgroup_articlediscount` (
	`pk_articlediscount` INT(11) NOT NULL AUTO_INCREMENT,
	`fk_discountgroup` INT(11) NOT NULL,
	`articlenumber` TEXT NULL COLLATE 'utf8_unicode_ci',
	`discount` DECIMAL(10,8) NULL DEFAULT NULL,
	`active` BIT(1) NULL DEFAULT NULL,
	`ModificationDate` DATETIME NULL DEFAULT NULL,
	PRIMARY KEY (`pk_articlediscount`),
	INDEX `FKarticlediscountdiscountgroup` (`fk_discountgroup`),
	CONSTRAINT `FKarticlediscountdiscountgroup` FOREIGN KEY (`fk_discountgroup`) REFERENCES `ad_discountgroup` (`pk_discountgroup`)
)
COLLATE='utf8_general_ci'
;
