-- ------------------------
-- 13.1.2016 --- Innerdienst column in ShopCustomer
-- ------------------------
ALTER TABLE `ShopCustomer`
	ADD COLUMN `ShopCustomer_Innerdienst` INT(10) UNSIGNED NULL DEFAULT NULL AFTER `ShopCustomer_Billpay_InvoiceDueDate`;

ALTER TABLE `ShopCustomer`
	ADD CONSTRAINT `ShopCustomer_Innerdienst_1` FOREIGN KEY (`ShopCustomer_Innerdienst`) REFERENCES `Person` (`Person_ID`);




-- ------------------------
-- 13.1.2016 Freigabe status (0/1)
-- ------------------------
ALTER TABLE `ShopOrder`
	ADD COLUMN `ShopOrder_Released` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0' AFTER `ShopOrder_ComissionNumber`;



-- ------------------------
-- 5.4.2016 Price details
-- ------------------------
ALTER TABLE `ShopOrderItem`
	ADD COLUMN `ShopOrderItem_WizardPriceDetails` TEXT NULL AFTER `ShopOrderItem_WizardConfig`;



-- ------------------------
-- 28.6.2016 Order discount details
-- ------------------------
ALTER TABLE `ShopOrder`
	ADD COLUMN `ShopSalesPartner_DiscountCarpenter` DOUBLE UNSIGNED NULL DEFAULT '0' AFTER `ShopOrder_GrandTotalIncl`,
	ADD COLUMN `ShopSalesPartner_DiscountInnendienst` DOUBLE UNSIGNED NULL DEFAULT '0' AFTER `ShopSalesPartner_DiscountCarpenter`;