CREATE TABLE `iwit_discountgroup` (
	`pk_discountgroup` INT NOT NULL AUTO_INCREMENT,
	`id` TEXT NULL,
	`name` TEXT NULL,
	`active` BIT NULL,
	`ModificationDate` DATETIME NULL,
	PRIMARY KEY (`pk_discountgroup`)
)
COLLATE='utf8_unicode_ci'
ENGINE=InnoDB
;


CREATE TABLE `iwit_discountgroup_articlediscount` (
	`pk_articlediscount` INT NOT NULL AUTO_INCREMENT,
	`fk_discountgroup` INT NOT NULL,
	`articlenumber` TEXT NULL,
	`discount` DECIMAL(10,8) NULL,
	`active` BIT NULL,
	`ModificationDate` DATETIME NULL,
	PRIMARY KEY (`pk_articlediscount`),
	CONSTRAINT `FKarticlediscountdiscountgroup` FOREIGN KEY (`fk_discountgroup`) REFERENCES `iwit_discountgroup` (pk_discountgroup)
)
COLLATE='utf8_unicode_ci'
ENGINE=InnoDB
;
