
CREATE TABLE `asmc_actionshots` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `xtId` int(11) DEFAULT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `created` datetime NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT 0,
  `deleted` tinyint(1) NOT NULL DEFAULT 0,
  `catalogQualified` tinyint(1) NOT NULL DEFAULT 0,
  `articleID` int(11) NOT NULL,
  `userID` int(11) NOT NULL,
  `author` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `mediaID` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11471 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_asmc_actionshots_insert` AFTER INSERT ON `asmc_actionshots`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 8, NEW.id, 1);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_asmc_actionshots_update` AFTER UPDATE ON `asmc_actionshots`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @changes = 0;
	SET @json = "{";
	SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');

	IF (OLD.id != NEW.id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');
	END IF;

	IF (OLD.xtId != NEW.xtId) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"xtId":', '"', NEW.xtId, '"');
	END IF;

	IF (OLD.title != NEW.title) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"title":', '"', NEW.title, '"');
	END IF;

	IF (OLD.description != NEW.description) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"description":', '"', NEW.description, '"');
	END IF;

	IF (OLD.created != NEW.created) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"created":', '"', NEW.created, '"');
	END IF;

	IF (OLD.active != NEW.active) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"active":', '"', NEW.active, '"');
	END IF;

	IF (OLD.deleted != NEW.deleted) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"deleted":', '"', NEW.deleted, '"');
	END IF;

	IF (OLD.catalogQualified != NEW.catalogQualified) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"catalogQualified":', '"', NEW.catalogQualified, '"');
	END IF;

	IF (OLD.articleID != NEW.articleID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"articleID":', '"', NEW.articleID, '"');
	END IF;

	IF (OLD.userID != NEW.userID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"userID":', '"', NEW.userID, '"');
	END IF;

	IF (OLD.author != NEW.author) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"author":', '"', NEW.author, '"');
	END IF;

	IF (OLD.mediaID != NEW.mediaID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"mediaID":', '"', NEW.mediaID, '"');
	END IF;

	SET @json = CONCAT(@json, "}");

	IF (@changes > 0) THEN
		INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 8, OLD.id, 2);
	END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `before_asmc_actionshots_delete` BEFORE DELETE ON `asmc_actionshots`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"id":', '"', OLD.id, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 8, OLD.id, 3);
END */;;
DELIMITER ;
CREATE TABLE `asmc_actionshots_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comment` longtext COLLATE utf8_unicode_ci NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT 0,
  `created` datetime NOT NULL,
  `actionshotID` int(11) NOT NULL,
  `userID` int(11) NOT NULL,
  `author` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=920 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_asmc_actionshots_comments_insert` AFTER INSERT ON `asmc_actionshots_comments`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"actionshotID":', '"', NEW.actionshotID, '"');
	SET @json = CONCAT(@json, ",");
	SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 8, NEW.actionshotID, 1);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_asmc_actionshots_comments_update` AFTER UPDATE ON `asmc_actionshots_comments`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @changes = 0;
	SET @json = "{";
	SET @json = CONCAT(@json, '"actionshotID":', '"', NEW.actionshotID, '"');
	SET @json = CONCAT(@json, ",");
	SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');

	IF (OLD.comment != NEW.comment) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"comment":', '"', NEW.comment, '"');
	END IF;

	IF (OLD.active != NEW.active) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"active":', '"', NEW.active, '"');
	END IF;

	IF (OLD.created != NEW.created) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"created":', '"', NEW.created, '"');
	END IF;

	IF (OLD.actionshotID != NEW.actionshotID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"actionshotID":', '"', NEW.actionshotID, '"');
	END IF;

	IF (OLD.userID != NEW.userID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"userID":', '"', NEW.userID, '"');
	END IF;

	IF (OLD.author != NEW.author) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"author":', '"', NEW.author, '"');
	END IF;

	SET @json = CONCAT(@json, "}");

	IF (@changes > 0) THEN
		INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 8, OLD.actionshotID, 2);
	END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `before_asmc_actionshots_comments_delete` BEFORE DELETE ON `asmc_actionshots_comments`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"actionshotID":', '"', OLD.actionshotID, '"');
	SET @json = CONCAT(@json, ",");
	SET @json = CONCAT(@json, '"id":', '"', OLD.id, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 8, OLD.actionshotID, 3);
END */;;
DELIMITER ;
CREATE TABLE `asmc_articles_restricted_countries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `articleID` int(11) NOT NULL,
  `countryID` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=135035 DEFAULT CHARSET=utf8mb4;
CREATE TABLE `asmc_articles_restricted_payments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `articleID` int(11) NOT NULL,
  `paymentID` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3816 DEFAULT CHARSET=utf8mb4;
CREATE TABLE `asmc_articles_variants` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `articleID` int(11) DEFAULT NULL,
  `relatedarticle` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `articleID_relatedarticle` (`articleID`,`relatedarticle`),
  KEY `articleID` (`articleID`),
  KEY `relatedarticle` (`relatedarticle`)
) ENGINE=InnoDB AUTO_INCREMENT=69681 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `asmc_catalogs` (
  `id` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `internal_name` varchar(255) DEFAULT NULL,
  `articleID` int(11) DEFAULT NULL,
  `url` varchar(255) DEFAULT NULL,
  `image_path` varchar(255) DEFAULT NULL,
  `active` tinyint(4) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `asmc_catalogs_pages` (
  `id` int(11) DEFAULT NULL,
  `article_ordernumber` varchar(255) DEFAULT NULL,
  `pagenumber` int(11) DEFAULT NULL,
  `catalogID` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
CREATE TABLE `asmc_changelog` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data` text NOT NULL,
  `changeDate` datetime NOT NULL,
  `modelTypeID` int(11) NOT NULL,
  `modelID` int(11) NOT NULL,
  `actionID` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=31447651 DEFAULT CHARSET=utf8;
CREATE TABLE `asmc_custom_product_options` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `typeId` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `placeholder` varchar(255) DEFAULT NULL COMMENT 'Textbaustein',
  `minLength` int(11) DEFAULT 0,
  `maxLength` int(11) DEFAULT 0,
  `validationRegex` varchar(255) DEFAULT NULL,
  `active` int(1) DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
CREATE TABLE `asmc_custom_product_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `display_name` varchar(255) DEFAULT NULL COMMENT 'Textbaustein',
  `active` int(1) DEFAULT 0,
  `xtId` int(11) NOT NULL COMMENT 'products_options_id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
CREATE TABLE `asmc_customer_cards` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `articleID` int(11) DEFAULT NULL,
  `name` varchar(30) DEFAULT NULL,
  `customergroupkey` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
CREATE TABLE `asmc_dhl_express_delivery_dates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date DEFAULT NULL,
  `asmcShipping` int(11) NOT NULL,
  `dhlDelivery` int(11) NOT NULL,
  `name` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8;
CREATE TABLE `asmc_dhl_express_delivery_times` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `day` varchar(25) DEFAULT NULL,
  `time` time DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
CREATE TABLE `asmc_dhl_express_services` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `number` int(11) NOT NULL,
  `surcharge` float NOT NULL,
  `name` varchar(25) NOT NULL,
  `sortOrder` int(11) DEFAULT NULL,
  `workingDay` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
CREATE TABLE `asmc_fieldpost_addresses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `zipCode` varchar(10) NOT NULL,
  `zipCodeRegex` varchar(10) NOT NULL,
  `city` varchar(25) NOT NULL,
  `multicode` int(11) DEFAULT NULL,
  `countryID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
CREATE TABLE `asmc_invoice` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `invoiceKey` int(11) NOT NULL,
  `invoiceNumber` varchar(255) NOT NULL,
  `amount` decimal(10,4) NOT NULL,
  `created` datetime NOT NULL,
  `paid` datetime DEFAULT NULL,
  `vatHigh` decimal(10,4) NOT NULL,
  `vatLow` decimal(10,4) NOT NULL,
  `isFieldpost` tinyint(4) NOT NULL,
  `isReturn` tinyint(4) NOT NULL,
  `isVatFree` tinyint(4) NOT NULL,
  `isVatError` tinyint(4) NOT NULL,
  `orderID` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=789622 DEFAULT CHARSET=utf8mb4;
CREATE TABLE `asmc_invoice_products` (
  `id` int(111) NOT NULL AUTO_INCREMENT,
  `invoiceID` int(11) NOT NULL,
  `orderID` int(11) NOT NULL,
  `articleDetailID` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `costPrice` decimal(10,4) NOT NULL,
  `productsPrice` decimal(10,4) NOT NULL,
  `totalPrice` decimal(10,4) NOT NULL,
  `vat` decimal(10,4) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2378310 DEFAULT CHARSET=utf8mb4;
CREATE TABLE `asmc_return_reasons` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reason` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4;
CREATE TABLE `asmc_returns` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `orderDetailID` int(11) NOT NULL,
  `reasonID` int(11) NOT NULL,
  `damageDescription` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `orderDetailID` (`orderDetailID`,`reasonID`)
) ENGINE=InnoDB AUTO_INCREMENT=28181 DEFAULT CHARSET=latin1;
CREATE TABLE `asmc_user_active_customer_card` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userID` int(11) DEFAULT NULL,
  `customergroupkey` int(11) DEFAULT NULL,
  `createdAt` datetime DEFAULT NULL,
  `expiresAt` datetime DEFAULT NULL,
  `temporary` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28242 DEFAULT CHARSET=utf8mb4;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_asmc_user_active_customer_card_insert` AFTER INSERT ON `asmc_user_active_customer_card`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"userID":', '"', NEW.userID, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 3, NEW.userID, 1);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_asmc_user_active_customer_card_update` AFTER UPDATE ON `asmc_user_active_customer_card`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @changes = 0;
	SET @json = "{";
	SET @json = CONCAT(@json, '"userID":', '"', NEW.userID, '"');

	IF (OLD.id != NEW.id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');
	END IF;

	IF (OLD.userID != NEW.userID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"userID":', '"', NEW.userID, '"');
	END IF;

	IF (OLD.customergroupkey != NEW.customergroupkey) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"customergroupkey":', '"', NEW.customergroupkey, '"');
	END IF;

	IF (OLD.createdAt != NEW.createdAt) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"createdAt":', '"', NEW.createdAt, '"');
	END IF;

	IF (OLD.expiresAt != NEW.expiresAt) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"expiresAt":', '"', NEW.expiresAt, '"');
	END IF;

	IF (OLD.temporary != NEW.temporary) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"temporary":', '"', NEW.temporary, '"');
	END IF;

	SET @json = CONCAT(@json, "}");

	IF (@changes > 0) THEN
		INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 3, OLD.userID, 2);
	END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `before_asmc_user_active_customer_card_delete` BEFORE DELETE ON `asmc_user_active_customer_card`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"userID":', '"', OLD.userID, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 3, OLD.userID, 3);
END */;;
DELIMITER ;
CREATE TABLE `asmc_user_age_verification` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created` datetime NOT NULL,
  `userID` int(11) NOT NULL,
  `birthday` date NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `userID` (`userID`)
) ENGINE=InnoDB AUTO_INCREMENT=42971 DEFAULT CHARSET=utf8;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_asmc_user_age_verification_insert` AFTER INSERT ON `asmc_user_age_verification`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"userID":', '"', NEW.userID, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 3, NEW.userID, 1);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_asmc_user_age_verification_update` AFTER UPDATE ON `asmc_user_age_verification`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @changes = 0;
	SET @json = "{";
	SET @json = CONCAT(@json, '"userID":', '"', NEW.userID, '"');

	IF (OLD.id != NEW.id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');
	END IF;

	IF (OLD.created != NEW.created) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"created":', '"', NEW.created, '"');
	END IF;

	IF (OLD.userID != NEW.userID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"userID":', '"', NEW.userID, '"');
	END IF;

	IF (OLD.birthday != NEW.birthday) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"birthday":', '"', NEW.birthday, '"');
	END IF;

	SET @json = CONCAT(@json, "}");

	IF (@changes > 0) THEN
		INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 3, OLD.userID, 2);
	END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `before_asmc_user_age_verification_delete` BEFORE DELETE ON `asmc_user_age_verification`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"userID":', '"', OLD.userID, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 3, OLD.userID, 3);
END */;;
DELIMITER ;
CREATE TABLE `asmc_wishlist` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `userID` int(11) NOT NULL,
  `created` datetime NOT NULL,
  `lastModified` datetime NOT NULL,
  `shareKey` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=85689 DEFAULT CHARSET=utf8mb4;
CREATE TABLE `asmc_wishlist_articles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `wishlistID` int(11) NOT NULL,
  `articleDetailID` int(11) NOT NULL,
  `nametapeText` varchar(100) CHARACTER SET latin1 NOT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=845981 DEFAULT CHARSET=utf8mb4;
CREATE TABLE `computopcw_customer_context` (
  `contextId` bigint(20) NOT NULL AUTO_INCREMENT,
  `customerId` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `context_values` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `versionNumber` int(11) NOT NULL,
  PRIMARY KEY (`contextId`),
  UNIQUE KEY `customerId` (`customerId`)
) ENGINE=InnoDB AUTO_INCREMENT=123796 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `computopcw_documents` (
  `documentId` bigint(20) NOT NULL AUTO_INCREMENT,
  `transactionId` int(11) DEFAULT NULL,
  `machineName` varchar(100) DEFAULT NULL,
  `name` longtext DEFAULT NULL,
  `fileExtension` varchar(255) DEFAULT NULL,
  `updatedOn` datetime DEFAULT NULL,
  `createdOn` datetime DEFAULT NULL,
  `versionNumber` int(11) NOT NULL,
  PRIMARY KEY (`documentId`),
  KEY `transactionId` (`transactionId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `computopcw_payment_config` (
  `payment_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `value` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`payment_id`,`shop_id`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `computopcw_schema_version` (
  `version_id` int(10) NOT NULL AUTO_INCREMENT,
  `version_number` varchar(20) NOT NULL,
  `comment` varchar(255) DEFAULT '',
  `installed_on` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`version_id`),
  UNIQUE KEY `version_number` (`version_number`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
CREATE TABLE `computopcw_storage` (
  `keyId` bigint(20) NOT NULL AUTO_INCREMENT,
  `keySpace` varchar(170) COLLATE utf8_unicode_ci DEFAULT NULL,
  `keyName` varchar(170) COLLATE utf8_unicode_ci DEFAULT NULL,
  `keyValue` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`keyId`),
  UNIQUE KEY `keyName_keySpace` (`keySpace`,`keyName`)
) ENGINE=InnoDB AUTO_INCREMENT=21357 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_addon_premiums` (
  `id` int(6) NOT NULL AUTO_INCREMENT,
  `startprice` double NOT NULL DEFAULT 0,
  `ordernumber` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `ordernumber_export` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `subshopID` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_article_configurator_dependencies` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `configurator_set_id` int(10) unsigned NOT NULL,
  `parent_id` int(11) unsigned DEFAULT NULL,
  `child_id` int(11) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `configurator_set_id` (`configurator_set_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_article_configurator_groups` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `position` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_article_configurator_groups_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `groupID` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `groupID` (`groupID`),
  CONSTRAINT `s_article_configurator_groups_attributes_ibfk_1` FOREIGN KEY (`groupID`) REFERENCES `s_article_configurator_groups` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_article_configurator_option_relations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `article_id` int(11) unsigned NOT NULL,
  `option_id` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `article_id` (`article_id`,`option_id`)
) ENGINE=InnoDB AUTO_INCREMENT=54530 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_article_configurator_options` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `group_id` int(11) unsigned DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` int(11) NOT NULL,
  `media_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `group_id` (`group_id`,`name`)
) ENGINE=InnoDB AUTO_INCREMENT=824 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_article_configurator_options_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `optionID` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `optionID` (`optionID`),
  CONSTRAINT `s_article_configurator_options_attributes_ibfk_1` FOREIGN KEY (`optionID`) REFERENCES `s_article_configurator_options` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_article_configurator_price_variations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `configurator_set_id` int(10) unsigned NOT NULL,
  `variation` decimal(10,3) NOT NULL,
  `options` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `is_gross` int(1) DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `configurator_set_id` (`configurator_set_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_article_configurator_set_group_relations` (
  `set_id` int(11) unsigned NOT NULL DEFAULT 0,
  `group_id` int(11) unsigned NOT NULL DEFAULT 0,
  PRIMARY KEY (`set_id`,`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_article_configurator_set_option_relations` (
  `set_id` int(11) unsigned NOT NULL DEFAULT 0,
  `option_id` int(11) unsigned NOT NULL DEFAULT 0,
  PRIMARY KEY (`set_id`,`option_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_article_configurator_sets` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `public` tinyint(1) NOT NULL,
  `type` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2549 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_article_configurator_template_prices` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `template_id` int(10) unsigned DEFAULT NULL,
  `customer_group_key` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL,
  `from` int(10) unsigned NOT NULL,
  `to` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `price` double NOT NULL DEFAULT 0,
  `pseudoprice` double DEFAULT NULL,
  `percent` decimal(10,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `pricegroup_2` (`customer_group_key`,`from`),
  KEY `pricegroup` (`customer_group_key`,`to`),
  KEY `template_id` (`template_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_article_configurator_template_prices_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `template_price_id` int(11) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `priceID` (`template_price_id`),
  CONSTRAINT `s_article_configurator_template_prices_attributes_ibfk_1` FOREIGN KEY (`template_price_id`) REFERENCES `s_article_configurator_template_prices` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_article_configurator_templates` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `article_id` int(11) unsigned NOT NULL DEFAULT 0,
  `order_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `suppliernumber` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `additionaltext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `impressions` int(11) NOT NULL DEFAULT 0,
  `sales` int(11) NOT NULL DEFAULT 0,
  `active` int(11) unsigned NOT NULL DEFAULT 0,
  `instock` int(11) DEFAULT NULL,
  `stockmin` int(11) unsigned DEFAULT NULL,
  `laststock` tinyint(4) NOT NULL DEFAULT 0,
  `weight` decimal(10,3) unsigned DEFAULT NULL,
  `position` int(11) unsigned NOT NULL,
  `width` decimal(10,3) unsigned DEFAULT NULL,
  `height` decimal(10,3) unsigned DEFAULT NULL,
  `length` decimal(10,3) unsigned DEFAULT NULL,
  `ean` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `unit_id` int(11) unsigned DEFAULT NULL,
  `purchasesteps` int(11) unsigned DEFAULT NULL,
  `maxpurchase` int(11) unsigned DEFAULT NULL,
  `minpurchase` int(11) unsigned DEFAULT NULL,
  `purchaseunit` decimal(11,4) unsigned DEFAULT NULL,
  `referenceunit` decimal(10,3) unsigned DEFAULT NULL,
  `packunit` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `releasedate` date DEFAULT NULL,
  `shippingfree` int(1) unsigned NOT NULL DEFAULT 0,
  `shippingtime` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL,
  `purchaseprice` double NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `articleID` (`article_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_article_configurator_templates_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `template_id` int(11) unsigned DEFAULT NULL,
  `attr1` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr2` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr3` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr4` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr5` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr6` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr7` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr8` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr9` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr10` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr11` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr12` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr13` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr14` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr15` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr16` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr17` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr18` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr19` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr20` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `is_not_ebay` int(1) DEFAULT 0,
  `is_not_amazon` int(1) DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `templateID` (`template_id`),
  CONSTRAINT `s_article_configurator_templates_attributes_ibfk_1` FOREIGN KEY (`template_id`) REFERENCES `s_article_configurator_templates` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_article_img_mapping_rules` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mapping_id` int(11) NOT NULL,
  `option_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `mapping_id` (`mapping_id`),
  KEY `option_id` (`option_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_article_img_mappings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `image_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `image_id` (`image_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `supplierID` int(11) unsigned DEFAULT NULL,
  `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `description_long` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `shippingtime` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL,
  `datum` date DEFAULT NULL,
  `active` int(1) unsigned NOT NULL DEFAULT 0,
  `taxID` int(11) unsigned DEFAULT NULL,
  `pseudosales` int(11) NOT NULL DEFAULT 0,
  `topseller` int(1) unsigned NOT NULL DEFAULT 0,
  `metaTitle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `keywords` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `changetime` datetime NOT NULL,
  `pricegroupID` int(11) unsigned DEFAULT NULL,
  `pricegroupActive` int(1) unsigned NOT NULL,
  `filtergroupID` int(11) unsigned DEFAULT NULL,
  `laststock` int(1) NOT NULL,
  `crossbundlelook` int(1) unsigned NOT NULL,
  `notification` int(1) unsigned NOT NULL COMMENT 'send notification',
  `template` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `mode` int(11) NOT NULL,
  `main_detail_id` int(11) unsigned DEFAULT NULL,
  `available_from` datetime DEFAULT NULL,
  `available_to` datetime DEFAULT NULL,
  `configurator_set_id` int(11) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `main_detailID` (`main_detail_id`),
  KEY `datum` (`datum`),
  KEY `name` (`name`),
  KEY `supplierID` (`supplierID`),
  KEY `shippingtime` (`shippingtime`),
  KEY `changetime` (`changetime`),
  KEY `configurator_set_id` (`configurator_set_id`),
  KEY `articles_by_category_sort_release` (`datum`,`id`),
  KEY `articles_by_category_sort_name` (`name`,`id`),
  KEY `product_newcomer` (`active`,`datum`),
  KEY `get_category_filters` (`active`,`filtergroupID`)
) ENGINE=InnoDB AUTO_INCREMENT=47094 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_also_bought_ro` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `article_id` int(11) unsigned NOT NULL,
  `related_article_id` int(11) NOT NULL,
  `sales` int(11) unsigned NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `bought_combination` (`article_id`,`related_article_id`),
  KEY `related_article_id` (`related_article_id`),
  KEY `article_id` (`article_id`),
  KEY `get_also_bought_articles` (`article_id`,`sales`,`related_article_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11009905 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `articledetailsID` int(11) unsigned DEFAULT NULL,
  `attr1` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr2` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr3` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr4` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr5` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr6` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr7` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr8` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr9` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr10` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr11` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr12` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr13` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr14` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr15` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr16` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr17` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr18` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr19` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attr20` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `is_second_hand` int(1) DEFAULT 0,
  `is_almost_new` int(1) DEFAULT 0,
  `is_limited` int(1) DEFAULT 0,
  `is_sellout` int(1) DEFAULT 0,
  `is_sold` int(1) DEFAULT 0,
  `is_fsk18` int(1) DEFAULT 0,
  `is_not_suitable_for_children_under_three_years` int(1) DEFAULT 0,
  `is_not_wrappable` int(1) DEFAULT 0,
  `is_not_for_sale` int(1) DEFAULT 0,
  `is_imitation_firearms` int(1) DEFAULT 0,
  `is_dangerous_good` int(1) DEFAULT 0,
  `is_yard_good` int(1) DEFAULT 0,
  `is_direct_fulfillment` int(1) DEFAULT 0,
  `is_deliverable_to_packing_station` int(1) DEFAULT 0,
  `is_delivered_in_original_packaging` int(1) DEFAULT 0,
  `is_nametape` int(1) DEFAULT 0,
  `is_customer_card` int(1) DEFAULT 0,
  `is_catalog` int(1) DEFAULT 0,
  `successor_article` int(1) DEFAULT 0,
  `uvp` double DEFAULT 0,
  `abc_class` varchar(32) COLLATE utf8_unicode_ci DEFAULT 'C',
  `is_returnable` int(1) DEFAULT 0,
  `is_firework` int(1) DEFAULT 0,
  `google_category` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `has_webgl_image` int(1) DEFAULT 0,
  `custom_product_type` int(11) DEFAULT 0,
  `is_swag_live_shopping` int(1) DEFAULT 0,
  `is_not_de` int(1) DEFAULT 0,
  `is_not_en` int(1) DEFAULT 0,
  `is_not_es` int(1) DEFAULT 0,
  `is_not_it` int(1) DEFAULT 0,
  `is_not_fr` int(1) DEFAULT 0,
  `is_not_ebay` int(1) DEFAULT 0,
  `is_not_amazon` int(1) DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `articledetailsID` (`articledetailsID`),
  CONSTRAINT `s_articles_attributes_ibfk_2` FOREIGN KEY (`articledetailsID`) REFERENCES `s_articles_details` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=92919 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_avoid_customergroups` (
  `articleID` int(11) NOT NULL,
  `customergroupID` int(11) NOT NULL,
  UNIQUE KEY `articleID` (`articleID`,`customergroupID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_categories` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `articleID` int(11) unsigned NOT NULL,
  `categoryID` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `articleID` (`articleID`,`categoryID`),
  KEY `categoryID` (`categoryID`),
  KEY `articleID_2` (`articleID`)
) ENGINE=InnoDB AUTO_INCREMENT=144876 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_categories_ro` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `articleID` int(11) unsigned NOT NULL,
  `categoryID` int(11) unsigned NOT NULL,
  `parentCategoryID` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `articleID` (`articleID`,`categoryID`,`parentCategoryID`),
  KEY `categoryID` (`categoryID`),
  KEY `articleID_2` (`articleID`),
  KEY `categoryID_2` (`categoryID`,`parentCategoryID`),
  KEY `category_id_by_article_id` (`articleID`,`id`),
  KEY `elastic_search` (`categoryID`,`articleID`)
) ENGINE=InnoDB AUTO_INCREMENT=210567 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_categories_seo` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `shop_id` int(11) NOT NULL,
  `article_id` int(11) NOT NULL,
  `category_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `shop_article` (`shop_id`,`article_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_details` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `articleID` int(11) unsigned NOT NULL DEFAULT 0,
  `ordernumber` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `suppliernumber` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `kind` int(1) NOT NULL DEFAULT 0,
  `additionaltext` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `sales` int(11) NOT NULL DEFAULT 0,
  `active` int(11) unsigned NOT NULL DEFAULT 0,
  `instock` int(11) NOT NULL DEFAULT 0,
  `stockmin` int(11) unsigned DEFAULT NULL,
  `laststock` int(1) NOT NULL DEFAULT 0,
  `weight` decimal(10,3) unsigned DEFAULT NULL,
  `position` int(11) unsigned NOT NULL,
  `width` decimal(10,3) unsigned DEFAULT NULL,
  `height` decimal(10,3) unsigned DEFAULT NULL,
  `length` decimal(10,3) unsigned DEFAULT NULL,
  `ean` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `unitID` int(11) unsigned DEFAULT NULL,
  `purchasesteps` int(11) unsigned DEFAULT NULL,
  `maxpurchase` int(11) unsigned DEFAULT NULL,
  `minpurchase` int(11) unsigned NOT NULL DEFAULT 1,
  `purchaseunit` decimal(11,4) unsigned DEFAULT NULL,
  `referenceunit` decimal(10,3) unsigned DEFAULT NULL,
  `packunit` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `releasedate` date DEFAULT NULL,
  `shippingfree` int(1) unsigned NOT NULL DEFAULT 0,
  `shippingtime` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL,
  `purchaseprice` double NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ordernumber` (`ordernumber`),
  KEY `articleID` (`articleID`),
  KEY `releasedate` (`releasedate`),
  KEY `articles_by_category_sort_popularity` (`sales`,`articleID`),
  KEY `get_similar_articles` (`kind`,`sales`)
) ENGINE=InnoDB AUTO_INCREMENT=101623 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_downloads` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `articleID` int(11) unsigned NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `filename` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `size` double NOT NULL,
  PRIMARY KEY (`id`),
  KEY `articleID` (`articleID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_downloads_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `downloadID` int(11) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `downloadID` (`downloadID`),
  CONSTRAINT `s_articles_downloads_attributes_ibfk_1` FOREIGN KEY (`downloadID`) REFERENCES `s_articles_downloads` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_esd` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `articleID` int(11) NOT NULL DEFAULT 0,
  `articledetailsID` int(11) NOT NULL DEFAULT 0,
  `file` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `serials` int(1) NOT NULL DEFAULT 0,
  `notification` int(1) NOT NULL DEFAULT 0,
  `maxdownloads` int(11) NOT NULL DEFAULT 0,
  `datum` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `articleID` (`articleID`),
  KEY `articledetailsID` (`articledetailsID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_esd_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `esdID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `esdID` (`esdID`),
  CONSTRAINT `s_articles_esd_attributes_ibfk_1` FOREIGN KEY (`esdID`) REFERENCES `s_articles_esd` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_esd_serials` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `serialnumber` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `esdID` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `esdID` (`esdID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_img` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `articleID` int(11) DEFAULT NULL,
  `img` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `main` int(1) NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` int(11) NOT NULL,
  `width` int(11) NOT NULL,
  `height` int(11) NOT NULL,
  `relations` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `extension` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `parent_id` int(10) unsigned DEFAULT NULL,
  `article_detail_id` int(10) unsigned DEFAULT NULL,
  `media_id` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `artikel_id` (`articleID`),
  KEY `article_detail_id` (`article_detail_id`),
  KEY `parent_id` (`parent_id`),
  KEY `media_id` (`media_id`),
  KEY `article_images_query` (`articleID`,`position`),
  KEY `article_cover_image_query` (`articleID`,`main`,`position`)
) ENGINE=InnoDB AUTO_INCREMENT=81838 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_img_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `imageID` int(11) DEFAULT NULL,
  `attribute1` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute2` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute3` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `imageID` (`imageID`),
  CONSTRAINT `s_articles_img_attributes_ibfk_1` FOREIGN KEY (`imageID`) REFERENCES `s_articles_img` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_information` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `articleID` int(11) NOT NULL DEFAULT 0,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `link` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `target` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `hauptid` (`articleID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_information_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `informationID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `informationID` (`informationID`),
  CONSTRAINT `s_articles_information_attributes_ibfk_1` FOREIGN KEY (`informationID`) REFERENCES `s_articles_information` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_live_customer_groups` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `live_shopping_id` int(11) unsigned DEFAULT NULL,
  `customer_group_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `live_shopping_id` (`live_shopping_id`,`customer_group_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4370 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_live_prices` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `live_shopping_id` int(11) unsigned DEFAULT NULL,
  `customer_group_id` int(11) DEFAULT NULL,
  `price` double NOT NULL,
  `endprice` double NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1354756 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_live_shoprelations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `live_shopping_id` int(11) unsigned DEFAULT NULL,
  `shop_id` int(11) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `live_shopping_id` (`live_shopping_id`,`shop_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2452 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_live_stint` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `live_shopping_id` int(11) unsigned DEFAULT NULL,
  `article_detail_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `live_shopping_id` (`live_shopping_id`,`article_detail_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_lives` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `article_id` int(11) unsigned DEFAULT NULL,
  `type` int(1) DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `active` int(1) unsigned NOT NULL,
  `order_number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `max_quantity_enable` int(1) unsigned NOT NULL,
  `max_quantity` int(11) unsigned NOT NULL,
  `max_purchase` int(11) unsigned NOT NULL,
  `valid_from` datetime DEFAULT NULL,
  `valid_to` datetime DEFAULT NULL,
  `datum` datetime DEFAULT NULL,
  `sells` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `article_id` (`article_id`)
) ENGINE=InnoDB AUTO_INCREMENT=571 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_notification` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `ordernumber` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `date` datetime NOT NULL,
  `mail` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `send` int(1) unsigned NOT NULL,
  `language` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `shopLink` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=29538 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_notification_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `notificationID` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `notificationID` (`notificationID`),
  CONSTRAINT `s_articles_notification_attributesibfk_1` FOREIGN KEY (`notificationID`) REFERENCES `s_articles_notification` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=29538 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_prices` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `pricegroup` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL,
  `from` int(10) unsigned NOT NULL,
  `to` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `articleID` int(11) NOT NULL DEFAULT 0,
  `articledetailsID` int(11) NOT NULL DEFAULT 0,
  `price` double NOT NULL DEFAULT 0,
  `pseudoprice` double DEFAULT NULL,
  `baseprice` double DEFAULT NULL,
  `percent` decimal(10,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `articleID` (`articleID`),
  KEY `articledetailsID` (`articledetailsID`),
  KEY `pricegroup_2` (`pricegroup`,`from`,`articledetailsID`),
  KEY `pricegroup` (`pricegroup`,`to`,`articledetailsID`),
  KEY `product_prices` (`articledetailsID`,`from`)
) ENGINE=InnoDB AUTO_INCREMENT=92919 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_prices_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `priceID` int(11) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `priceID` (`priceID`),
  CONSTRAINT `s_articles_prices_attributes_ibfk_1` FOREIGN KEY (`priceID`) REFERENCES `s_articles_prices` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_relationships` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `articleID` int(30) NOT NULL,
  `relatedarticle` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `articleID` (`articleID`,`relatedarticle`)
) ENGINE=InnoDB AUTO_INCREMENT=7181 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_similar` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `articleID` int(30) NOT NULL,
  `relatedarticle` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `articleID` (`articleID`,`relatedarticle`)
) ENGINE=InnoDB AUTO_INCREMENT=2598 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_similar_shown_ro` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `article_id` int(11) unsigned NOT NULL,
  `related_article_id` int(11) NOT NULL,
  `viewed` int(11) unsigned NOT NULL DEFAULT 0,
  `init_date` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `viewed_combination` (`article_id`,`related_article_id`),
  KEY `viewed` (`viewed`,`related_article_id`,`article_id`)
) ENGINE=InnoDB AUTO_INCREMENT=248876595 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_supplier` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `img` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `link` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `meta_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `meta_description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `meta_keywords` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `changed` datetime NOT NULL DEFAULT '2019-12-17 12:23:02',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=681 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_supplier_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `supplierID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `supplierID` (`supplierID`),
  CONSTRAINT `s_articles_supplier_attributes_ibfk_1` FOREIGN KEY (`supplierID`) REFERENCES `s_articles_supplier` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=680 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_top_seller_ro` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `article_id` int(11) unsigned NOT NULL,
  `sales` int(11) unsigned NOT NULL DEFAULT 0,
  `last_cleared` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `article_id` (`article_id`),
  KEY `sales` (`sales`),
  KEY `listing_query` (`sales`,`article_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2301147 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_translations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `articleID` int(11) NOT NULL,
  `languageID` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `keywords` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `description_long` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `description_clear` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `shippingtime` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `attr1` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `attr2` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `attr3` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `attr4` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `attr5` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_not_ebay` int(1) DEFAULT 0,
  `is_not_amazon` int(1) DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `articleID` (`articleID`,`languageID`)
) ENGINE=InnoDB AUTO_INCREMENT=152038 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_articles_vote` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `articleID` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `headline` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `comment` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `points` double NOT NULL,
  `datum` datetime NOT NULL,
  `active` int(11) NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `answer` text COLLATE utf8_unicode_ci NOT NULL,
  `answer_date` datetime DEFAULT NULL,
  `shop_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `articleID` (`articleID`),
  KEY `get_articles_votes` (`articleID`,`active`,`datum`),
  KEY `vote_average` (`points`)
) ENGINE=InnoDB AUTO_INCREMENT=167134 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_articles_vote_insert` AFTER INSERT ON `s_articles_vote`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 11, NEW.id, 1);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_articles_vote_update` AFTER UPDATE ON `s_articles_vote`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @changes = 0;
	SET @json = "{";
	SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');

	IF (OLD.id != NEW.id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');
	END IF;

	IF (OLD.articleID != NEW.articleID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"articleID":', '"', NEW.articleID, '"');
	END IF;

	IF (OLD.name != NEW.name) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"name":', '"', NEW.name, '"');
	END IF;

	IF (OLD.headline != NEW.headline) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"headline":', '"', NEW.headline, '"');
	END IF;

	IF (OLD.comment != NEW.comment) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"comment":', '"', NEW.comment, '"');
	END IF;

	IF (OLD.points != NEW.points) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"points":', '"', NEW.points, '"');
	END IF;

	IF (OLD.datum != NEW.datum) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"datum":', '"', NEW.datum, '"');
	END IF;

	IF (OLD.active != NEW.active) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"active":', '"', NEW.active, '"');
	END IF;

	IF (OLD.email != NEW.email) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"email":', '"', NEW.email, '"');
	END IF;

	IF (OLD.answer != NEW.answer) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"answer":', '"', NEW.answer, '"');
	END IF;

	IF (OLD.answer_date != NEW.answer_date) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"answer_date":', '"', NEW.answer_date, '"');
	END IF;

	IF (OLD.shop_id != NEW.shop_id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"shop_id":', '"', NEW.shop_id, '"');
	END IF;

	SET @json = CONCAT(@json, "}");

	IF (@changes > 0) THEN
		INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 11, OLD.id, 2);
	END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `before_s_articles_vote_delete` BEFORE DELETE ON `s_articles_vote`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"id":', '"', OLD.id, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 11, OLD.id, 3);
END */;;
DELIMITER ;
CREATE TABLE `s_attribute_configuration` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `table_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `column_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `column_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `default_value` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL,
  `position` int(11) NOT NULL,
  `translatable` int(1) NOT NULL,
  `display_in_backend` int(1) NOT NULL,
  `custom` int(1) NOT NULL,
  `help_text` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `support_text` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL,
  `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `entity` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL,
  `array_store` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `readonly` int(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `table_column_unique` (`table_name`,`column_name`),
  KEY `table_name` (`table_name`)
) ENGINE=InnoDB AUTO_INCREMENT=161 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_billing_template` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `value` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `typ` mediumint(11) NOT NULL,
  `group` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `desc` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` int(11) NOT NULL,
  `show` int(1) NOT NULL DEFAULT 1,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_blog` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `author_id` int(11) DEFAULT NULL,
  `active` int(1) NOT NULL,
  `short_description` text COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `views` int(11) unsigned DEFAULT NULL,
  `display_date` datetime NOT NULL,
  `category_id` int(11) unsigned DEFAULT NULL,
  `template` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `meta_keywords` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `meta_description` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
  `meta_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `shop_ids` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `emotion_get_blog_entry` (`display_date`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_blog_assigned_articles` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `blog_id` int(11) unsigned NOT NULL,
  `article_id` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `blog_id` (`blog_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_blog_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `blog_id` int(11) unsigned DEFAULT NULL,
  `attribute1` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute2` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute3` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute4` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute5` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute6` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `blog_id` (`blog_id`),
  CONSTRAINT `s_blog_attributes_ibfk_1` FOREIGN KEY (`blog_id`) REFERENCES `s_blog` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_blog_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `blog_id` int(11) unsigned DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `headline` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `comment` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `creation_date` datetime NOT NULL,
  `active` int(1) NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `points` double NOT NULL,
  `shop_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_blog_media` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `blog_id` int(11) unsigned NOT NULL,
  `media_id` int(11) unsigned NOT NULL,
  `preview` int(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `blogID` (`blog_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_blog_tags` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `blog_id` int(11) unsigned DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `blogID` (`blog_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_campaigns_articles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parentID` int(11) NOT NULL DEFAULT 0,
  `articleordernumber` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `position` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_campaigns_banner` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parentID` int(11) NOT NULL,
  `image` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `link` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `linkTarget` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_campaigns_containers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `promotionID` int(11) DEFAULT NULL,
  `value` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_campaigns_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_campaigns_html` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parentID` int(11) DEFAULT NULL,
  `headline` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `html` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `image` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `link` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `alignment` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_campaigns_links` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parentID` int(11) NOT NULL DEFAULT 0,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `link` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `target` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_campaigns_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `datum` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `mailingID` int(11) NOT NULL DEFAULT 0,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `articleID` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_campaigns_mailaddresses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `customer` int(1) NOT NULL,
  `groupID` int(11) NOT NULL,
  `email` varchar(90) COLLATE utf8_unicode_ci NOT NULL,
  `lastmailing` int(11) NOT NULL,
  `lastread` int(11) NOT NULL,
  `added` datetime DEFAULT NULL,
  `double_optin_confirmed` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `groupID` (`groupID`),
  KEY `email` (`email`),
  KEY `lastmailing` (`lastmailing`),
  KEY `lastread` (`lastread`)
) ENGINE=InnoDB AUTO_INCREMENT=9023 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_campaigns_maildata` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `groupID` int(11) unsigned NOT NULL,
  `salutation` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `firstname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `lastname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `street` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zipcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `city` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `added` datetime NOT NULL,
  `double_optin_confirmed` datetime DEFAULT NULL,
  `deleted` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`,`groupID`)
) ENGINE=InnoDB AUTO_INCREMENT=5649 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_campaigns_mailings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `datum` date DEFAULT NULL,
  `groups` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `subject` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `sendermail` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `sendername` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `plaintext` int(1) NOT NULL,
  `templateID` int(11) NOT NULL DEFAULT 0,
  `languageID` int(11) NOT NULL,
  `status` int(11) NOT NULL DEFAULT 0,
  `locked` datetime DEFAULT NULL,
  `recipients` int(11) NOT NULL,
  `read` int(11) NOT NULL DEFAULT 0,
  `clicked` int(11) NOT NULL DEFAULT 0,
  `customergroup` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL,
  `publish` int(1) unsigned NOT NULL,
  `timed_delivery` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_campaigns_positions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `promotionID` int(11) NOT NULL DEFAULT 0,
  `containerID` int(11) NOT NULL DEFAULT 0,
  `position` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_campaigns_sender` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_campaigns_templates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_categories` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `parent` int(11) unsigned DEFAULT NULL,
  `path` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` int(11) unsigned DEFAULT 0,
  `left` int(11) unsigned NOT NULL,
  `right` int(11) unsigned NOT NULL,
  `level` int(11) unsigned NOT NULL,
  `added` datetime NOT NULL,
  `changed` datetime NOT NULL,
  `metakeywords` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `metadescription` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `cmsheadline` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `cmstext` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `template` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `active` int(1) NOT NULL,
  `blog` int(11) NOT NULL,
  `external` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `hidefilter` int(1) NOT NULL,
  `hidetop` int(1) NOT NULL,
  `mediaID` int(11) unsigned DEFAULT NULL,
  `product_box_layout` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `meta_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `stream_id` int(11) unsigned DEFAULT NULL,
  `hide_sortings` int(1) NOT NULL DEFAULT 0,
  `sorting_ids` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `facet_ids` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `external_target` varchar(32) COLLATE utf8_unicode_ci DEFAULT '',
  `shops` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `parent` (`parent`),
  KEY `description` (`description`),
  KEY `position` (`position`),
  KEY `left` (`left`,`right`),
  KEY `level` (`level`),
  KEY `active_query_builder` (`parent`,`position`,`id`),
  KEY `stream_id` (`stream_id`),
  CONSTRAINT `s_categories_fk_stream_id` FOREIGN KEY (`stream_id`) REFERENCES `s_product_streams` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=3726 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_categories_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `categoryID` int(11) unsigned DEFAULT NULL,
  `attribute1` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute2` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute3` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute4` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute5` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute6` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `categoryID` (`categoryID`),
  CONSTRAINT `s_categories_attributes_ibfk_1` FOREIGN KEY (`categoryID`) REFERENCES `s_categories` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=4008 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_categories_avoid_customergroups` (
  `categoryID` int(11) NOT NULL,
  `customergroupID` int(11) NOT NULL,
  UNIQUE KEY `articleID` (`categoryID`,`customergroupID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_categories_manual_sorting` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `position` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `category_id_product_id` (`category_id`,`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_cms_static` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `tpl1variable` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tpl1path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tpl2variable` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tpl2path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tpl3variable` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tpl3path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `html` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `grouping` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` int(11) NOT NULL,
  `link` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `target` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `parentID` int(11) NOT NULL DEFAULT 0,
  `page_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `meta_keywords` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `meta_description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `changed` datetime NOT NULL DEFAULT '2019-12-17 12:23:02',
  `shop_ids` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `get_menu` (`position`,`description`)
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_cms_static_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cmsStaticID` int(11) DEFAULT NULL,
  `asmc_meta_robots` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `cmsStaticID` (`cmsStaticID`),
  CONSTRAINT `s_cms_static_attributes_ibfk_1` FOREIGN KEY (`cmsStaticID`) REFERENCES `s_cms_static` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_cms_support` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `active` tinyint(1) NOT NULL DEFAULT 1,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `text` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `email_template` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `email_subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `text2` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `meta_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `meta_keywords` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `meta_description` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `ticket_typeID` int(10) NOT NULL,
  `isocode` varchar(3) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'de',
  `shop_ids` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_cms_support_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cmsSupportID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `cmsSupportID` (`cmsSupportID`),
  CONSTRAINT `s_cms_support_attributes_ibfk_1` FOREIGN KEY (`cmsSupportID`) REFERENCES `s_cms_support` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_cms_support_fields` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `error_msg` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `note` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `typ` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `required` int(1) NOT NULL,
  `supportID` int(11) NOT NULL,
  `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `class` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `value` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `added` datetime NOT NULL,
  `position` int(11) NOT NULL,
  `ticket_task` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`,`supportID`)
) ENGINE=InnoDB AUTO_INCREMENT=119 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_content_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `internalName` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `source` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `config` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_acl_privilege_requirements` (
  `privilege_id` int(11) unsigned NOT NULL,
  `required_privilege_id` int(11) unsigned NOT NULL,
  PRIMARY KEY (`privilege_id`,`required_privilege_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_acl_privileges` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `resourceID` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `resourceID` (`resourceID`)
) ENGINE=InnoDB AUTO_INCREMENT=211 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_acl_resources` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `pluginID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_acl_roles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `roleID` int(11) NOT NULL,
  `resourceID` int(11) DEFAULT NULL,
  `privilegeID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `roleID` (`roleID`,`resourceID`,`privilegeID`),
  KEY `resourceID` (`resourceID`),
  KEY `privilegeID` (`privilegeID`)
) ENGINE=InnoDB AUTO_INCREMENT=1879 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_auth_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `authID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `authID` (`authID`),
  CONSTRAINT `s_core_auth_attributes_ibfk_1` FOREIGN KEY (`authID`) REFERENCES `s_core_auth` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_auth_config` (
  `user_id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `config` longtext COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`user_id`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_auth_roles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parentID` int(11) DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `source` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `enabled` int(1) NOT NULL,
  `admin` int(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_config_element_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `element_id` int(11) unsigned NOT NULL,
  `locale_id` int(11) unsigned NOT NULL,
  `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `element_id` (`element_id`,`locale_id`)
) ENGINE=InnoDB AUTO_INCREMENT=496 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_config_elements` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `form_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `value` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `required` int(1) unsigned NOT NULL,
  `position` int(11) NOT NULL,
  `scope` int(11) unsigned NOT NULL,
  `options` blob DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `form_id_2` (`form_id`,`name`),
  KEY `form_id` (`form_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1267 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_config_form_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `form_id` int(11) unsigned NOT NULL,
  `locale_id` int(11) unsigned NOT NULL,
  `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_config_forms` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) unsigned DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `position` int(11) NOT NULL,
  `plugin_id` int(11) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  KEY `plugin_id` (`plugin_id`),
  KEY `parent_id` (`parent_id`)
) ENGINE=InnoDB AUTO_INCREMENT=290 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_config_mails` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `stateId` int(11) DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `frommail` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `fromname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `content` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `contentHTML` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `ishtml` int(1) NOT NULL,
  `attachment` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `mailtype` int(11) NOT NULL DEFAULT 1,
  `context` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `dirty` int(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  UNIQUE KEY `stateId` (`stateId`),
  CONSTRAINT `s_core_config_mails_ibfk_1` FOREIGN KEY (`stateId`) REFERENCES `s_core_states` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_config_mails_attachments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mailID` int(11) NOT NULL,
  `mediaID` int(11) NOT NULL,
  `shopID` int(11) DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mailID` (`mailID`,`mediaID`,`shopID`),
  KEY `mediaID` (`mediaID`),
  KEY `shopID` (`shopID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `s_core_config_mails_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mailID` int(11) DEFAULT NULL,
  `optivo_content` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `optivo_enable` int(1) DEFAULT 0,
  `optivo_authcode` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `optivo_bmmailid` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mailID` (`mailID`),
  CONSTRAINT `s_core_config_mails_attributes_ibfk_1` FOREIGN KEY (`mailID`) REFERENCES `s_core_config_mails` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_config_values` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `element_id` int(11) unsigned NOT NULL,
  `shop_id` int(11) unsigned DEFAULT NULL,
  `value` longtext COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `element_id_shop_id` (`element_id`,`shop_id`),
  KEY `shop_id` (`shop_id`),
  KEY `element_id` (`element_id`)
) ENGINE=InnoDB AUTO_INCREMENT=48850 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_countries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `countryname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `countryiso` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `areaID` int(11) DEFAULT NULL,
  `countryen` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `position` int(11) DEFAULT NULL,
  `notice` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `taxfree` int(11) DEFAULT NULL,
  `taxfree_ustid` int(11) DEFAULT NULL,
  `taxfree_ustid_checked` int(11) DEFAULT NULL,
  `active` int(11) DEFAULT NULL,
  `iso3` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
  `display_state_in_registration` int(1) NOT NULL,
  `force_state_in_registration` int(1) NOT NULL,
  `allow_shipping` int(1) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`),
  KEY `areaID` (`areaID`)
) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_countries_areas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `active` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name_UNIQUE` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_countries_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `countryID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `countryID` (`countryID`),
  CONSTRAINT `s_core_countries_attributes_ibfk_1` FOREIGN KEY (`countryID`) REFERENCES `s_core_countries` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_countries_states` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `countryID` int(11) DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `shortcode` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` int(11) DEFAULT NULL,
  `active` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `countryID` (`countryID`)
) ENGINE=InnoDB AUTO_INCREMENT=1222 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_countries_states_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `stateID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `stateID` (`stateID`),
  CONSTRAINT `s_core_countries_states_attributes_ibfk_1` FOREIGN KEY (`stateID`) REFERENCES `s_core_countries_states` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=1222 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_currencies` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `currency` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `standard` int(1) NOT NULL,
  `factor` double NOT NULL,
  `templatechar` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `symbol_position` int(11) unsigned NOT NULL,
  `position` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_customergroups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `groupkey` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `tax` int(1) NOT NULL DEFAULT 0,
  `taxinput` int(1) NOT NULL,
  `mode` int(11) NOT NULL,
  `discount` double NOT NULL,
  `minimumorder` double NOT NULL,
  `minimumordersurcharge` double NOT NULL,
  PRIMARY KEY (`id`),
  KEY `groupkey` (`groupkey`)
) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_customergroups_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `customerGroupID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `customerGroupID` (`customerGroupID`),
  CONSTRAINT `s_core_customergroups_attributes_ibfk_1` FOREIGN KEY (`customerGroupID`) REFERENCES `s_core_customergroups` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_customergroups_discounts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `groupID` int(11) NOT NULL,
  `basketdiscount` double NOT NULL,
  `basketdiscountstart` double NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `groupID` (`groupID`,`basketdiscountstart`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_customerpricegroups` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `netto` int(1) unsigned NOT NULL,
  `active` int(1) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_detail_states` (
  `id` int(11) NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` int(11) NOT NULL,
  `mail` int(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_documents_box` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `documentID` int(11) NOT NULL,
  `name` varchar(35) COLLATE utf8_unicode_ci NOT NULL,
  `style` longtext COLLATE utf8_unicode_ci NOT NULL,
  `value` longtext COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=182 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_engine_elements` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `groupID` int(11) unsigned NOT NULL DEFAULT 0,
  `domname` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  `default` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `store` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `required` int(1) NOT NULL DEFAULT 0,
  `position` int(11) NOT NULL DEFAULT 0,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `layout` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `variantable` int(1) unsigned NOT NULL,
  `help` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `translatable` int(1) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `databasefield` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_engine_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `layout` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `variantable` int(1) unsigned NOT NULL DEFAULT 0,
  `position` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_licenses` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `module` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `host` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `license` text COLLATE utf8_unicode_ci NOT NULL,
  `version` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `notation` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `type` int(11) unsigned NOT NULL,
  `source` int(11) unsigned NOT NULL,
  `added` date NOT NULL,
  `creation` date DEFAULT NULL,
  `expiration` date DEFAULT NULL,
  `active` int(1) NOT NULL,
  `plugin_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_locales` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `locale` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `language` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `territory` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `locale` (`locale`)
) ENGINE=InnoDB AUTO_INCREMENT=256 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_menu` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent` int(11) unsigned DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `onclick` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `position` int(11) NOT NULL DEFAULT 0,
  `active` int(1) NOT NULL DEFAULT 0,
  `pluginID` int(11) unsigned DEFAULT NULL,
  `controller` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `shortcut` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `action` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `content_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`,`parent`)
) ENGINE=InnoDB AUTO_INCREMENT=154 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_optin` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `datum` datetime NOT NULL,
  `hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `data` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `hash` (`hash`),
  KEY `datum` (`datum`)
) ENGINE=InnoDB AUTO_INCREMENT=730367 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_paymentmeans` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `template` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `class` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `table` varchar(70) COLLATE utf8_unicode_ci NOT NULL,
  `hide` int(1) NOT NULL,
  `additionaldescription` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `debit_percent` double NOT NULL DEFAULT 0,
  `surcharge` double NOT NULL DEFAULT 0,
  `surchargestring` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` int(11) NOT NULL,
  `active` int(1) NOT NULL DEFAULT 0,
  `esdactive` int(1) NOT NULL,
  `embediframe` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `hideprospect` int(1) NOT NULL,
  `action` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `pluginID` int(11) unsigned DEFAULT NULL,
  `source` int(11) DEFAULT NULL,
  `mobile_inactive` int(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_paymentmeans_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `paymentmeanID` int(11) DEFAULT NULL,
  `swag_paypal_unified_display_in_plus_iframe` int(1) DEFAULT 0,
  `swag_paypal_unified_plus_iframe_payment_logo` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `paymentmeanID` (`paymentmeanID`),
  CONSTRAINT `s_core_paymentmeans_attributes_ibfk_1` FOREIGN KEY (`paymentmeanID`) REFERENCES `s_core_paymentmeans` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_paymentmeans_countries` (
  `paymentID` int(11) unsigned NOT NULL,
  `countryID` int(11) unsigned NOT NULL,
  PRIMARY KEY (`paymentID`,`countryID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_paymentmeans_subshops` (
  `paymentID` int(11) unsigned NOT NULL,
  `subshopID` int(11) unsigned NOT NULL,
  PRIMARY KEY (`paymentID`,`subshopID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_plugin_categories` (
  `id` int(11) NOT NULL,
  `locale` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `name` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`,`locale`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_plugins` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `namespace` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `source` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `translations` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `description_long` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `active` int(1) unsigned NOT NULL,
  `added` datetime NOT NULL,
  `installation_date` datetime DEFAULT NULL,
  `update_date` datetime DEFAULT NULL,
  `refresh_date` datetime DEFAULT NULL,
  `author` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `copyright` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `license` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `version` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `support` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `changes` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `link` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `store_version` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `store_date` datetime DEFAULT NULL,
  `capability_update` int(1) NOT NULL,
  `capability_install` int(1) NOT NULL,
  `capability_enable` int(1) NOT NULL,
  `update_source` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `update_version` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `capability_secure_uninstall` int(1) NOT NULL DEFAULT 0,
  `in_safe_mode` tinyint(1) DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_pricegroups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `description` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_pricegroups_discounts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `groupID` int(11) NOT NULL,
  `customergroupID` int(11) NOT NULL,
  `discount` double NOT NULL,
  `discountstart` double NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `groupID` (`groupID`,`customergroupID`,`discountstart`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_rewrite_urls` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `org_path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `main` int(1) unsigned NOT NULL,
  `subshopID` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `path` (`path`,`subshopID`),
  KEY `org_path` (`org_path`)
) ENGINE=InnoDB AUTO_INCREMENT=281087184 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_rulesets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `paymentID` int(11) NOT NULL,
  `rule1` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `value1` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rule2` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `value2` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_sessions` (
  `id` varchar(128) COLLATE utf8_bin NOT NULL,
  `data` mediumblob NOT NULL,
  `modified` int(10) unsigned NOT NULL,
  `expiry` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_sess_expiry` (`expiry`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
CREATE TABLE `s_core_sessions_backend` (
  `id` varchar(128) COLLATE utf8_bin NOT NULL,
  `data` mediumblob NOT NULL,
  `modified` int(10) unsigned NOT NULL,
  `expiry` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_sess_expiry` (`expiry`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
CREATE TABLE `s_core_shop_currencies` (
  `shop_id` int(11) unsigned NOT NULL,
  `currency_id` int(11) unsigned NOT NULL,
  PRIMARY KEY (`shop_id`,`currency_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_shop_pages` (
  `shop_id` int(11) unsigned NOT NULL,
  `group_id` int(11) unsigned NOT NULL,
  PRIMARY KEY (`shop_id`,`group_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_shops` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `main_id` int(11) unsigned DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `position` int(11) NOT NULL,
  `host` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `base_path` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `base_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `hosts` text COLLATE utf8_unicode_ci NOT NULL,
  `secure` int(1) unsigned NOT NULL,
  `template_id` int(11) unsigned DEFAULT NULL,
  `document_template_id` int(11) unsigned DEFAULT NULL,
  `category_id` int(11) unsigned DEFAULT NULL,
  `locale_id` int(11) unsigned DEFAULT NULL,
  `currency_id` int(11) unsigned DEFAULT NULL,
  `customer_group_id` int(11) unsigned DEFAULT NULL,
  `fallback_id` int(11) unsigned DEFAULT NULL,
  `customer_scope` int(1) NOT NULL,
  `default` int(1) unsigned NOT NULL,
  `active` int(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `main_id` (`main_id`),
  KEY `host` (`host`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_shops_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `shopID` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `shopID` (`shopID`),
  CONSTRAINT `FK__s_core_shops` FOREIGN KEY (`shopID`) REFERENCES `s_core_shops` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_snippets` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `namespace` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `shopID` int(11) unsigned NOT NULL,
  `localeID` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `value` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `created` datetime NOT NULL,
  `updated` datetime NOT NULL,
  `dirty` int(1) DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `namespace` (`namespace`,`shopID`,`name`,`localeID`)
) ENGINE=InnoDB AUTO_INCREMENT=134674 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_states` (
  `id` int(11) NOT NULL,
  `name` varchar(55) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` int(11) NOT NULL,
  `group` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `mail` int(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_subscribes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `subscribe` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` int(11) unsigned NOT NULL,
  `listener` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `pluginID` int(11) unsigned DEFAULT NULL,
  `position` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `subscribe` (`subscribe`,`type`,`listener`),
  KEY `plugin_namespace_init_storage` (`type`,`subscribe`,`position`),
  KEY `pluginID` (`pluginID`)
) ENGINE=InnoDB AUTO_INCREMENT=319 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_tax` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tax` decimal(10,2) NOT NULL,
  `description` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `tax` (`tax`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_tax_rules` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `areaID` int(11) unsigned DEFAULT NULL,
  `countryID` int(11) unsigned DEFAULT NULL,
  `stateID` int(11) unsigned DEFAULT NULL,
  `groupID` int(11) unsigned NOT NULL,
  `customer_groupID` int(11) unsigned NOT NULL,
  `tax` decimal(10,2) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `active` int(1) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `groupID` (`groupID`),
  KEY `countryID` (`countryID`),
  KEY `stateID` (`stateID`),
  KEY `areaID` (`areaID`),
  KEY `tax_rate_by_conditions` (`customer_groupID`,`areaID`,`countryID`,`stateID`)
) ENGINE=InnoDB AUTO_INCREMENT=17872 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_templates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `template` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `author` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `license` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `esi` tinyint(1) unsigned NOT NULL,
  `style_support` tinyint(1) unsigned NOT NULL,
  `emotion` tinyint(1) unsigned NOT NULL,
  `version` int(11) unsigned NOT NULL,
  `plugin_id` int(11) unsigned DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `basename` (`template`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_templates_config_elements` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `template_id` int(11) NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` int(11) NOT NULL DEFAULT 0,
  `default_value` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `selection` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `field_label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `support_text` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `allow_blank` int(1) NOT NULL DEFAULT 1,
  `container_id` int(11) NOT NULL,
  `attributes` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `less_compatible` int(1) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`),
  UNIQUE KEY `template_id_name` (`template_id`,`name`)
) ENGINE=InnoDB AUTO_INCREMENT=806 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_templates_config_layout` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT NULL,
  `template_id` int(11) NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `attributes` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=206 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_templates_config_set` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `template_id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `element_values` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `template_id` (`template_id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_templates_config_values` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `element_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `value` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `element_id_shop_id` (`element_id`,`shop_id`)
) ENGINE=InnoDB AUTO_INCREMENT=203 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_theme_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `compiler_force` int(1) NOT NULL,
  `compiler_create_source_map` int(1) NOT NULL,
  `compiler_compress_css` int(1) NOT NULL,
  `compiler_compress_js` int(1) NOT NULL,
  `force_reload_snippets` int(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_translations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `objecttype` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `objectdata` longtext COLLATE utf8_unicode_ci NOT NULL,
  `objectkey` int(11) unsigned NOT NULL,
  `objectlanguage` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `dirty` int(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `objecttype` (`objecttype`,`objectkey`,`objectlanguage`)
) ENGINE=InnoDB AUTO_INCREMENT=389910 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_units` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `unit` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_widget_views` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `widget_id` int(11) unsigned NOT NULL,
  `auth_id` int(11) unsigned NOT NULL,
  `column` int(11) unsigned NOT NULL,
  `position` int(11) unsigned NOT NULL,
  `data` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `widget_id` (`widget_id`,`auth_id`)
) ENGINE=InnoDB AUTO_INCREMENT=69 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_core_widgets` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `plugin_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_crontab` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `action` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `elementID` int(11) DEFAULT NULL,
  `data` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `next` datetime DEFAULT NULL,
  `start` datetime DEFAULT NULL,
  `interval` int(11) NOT NULL,
  `active` int(1) NOT NULL,
  `disable_on_error` tinyint(1) NOT NULL DEFAULT 1,
  `end` datetime DEFAULT NULL,
  `inform_template` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `inform_mail` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `pluginID` int(11) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `action` (`action`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_customer_search_index` (
  `id` int(11) NOT NULL,
  `email` varchar(70) COLLATE utf8_unicode_ci DEFAULT NULL,
  `active` int(1) DEFAULT NULL,
  `accountmode` int(11) DEFAULT NULL,
  `firstlogin` date DEFAULT NULL,
  `newsletter` int(1) DEFAULT NULL,
  `shop_id` int(11) DEFAULT NULL,
  `default_billing_address_id` int(11) DEFAULT NULL,
  `title` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `salutation` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
  `firstname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `lastname` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `birthday` date DEFAULT NULL,
  `customernumber` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
  `customer_group_id` int(11) DEFAULT NULL,
  `customer_group_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `payment_id` int(11) DEFAULT NULL,
  `company` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `department` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `street` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zipcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `city` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `phone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `additional_address_line1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `additional_address_line2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `country_id` int(11) DEFAULT NULL,
  `country_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `state_id` int(11) DEFAULT NULL,
  `age` int(11) DEFAULT NULL,
  `count_orders` int(11) DEFAULT NULL,
  `invoice_amount_sum` double DEFAULT NULL,
  `invoice_amount_avg` double DEFAULT NULL,
  `invoice_amount_min` double DEFAULT NULL,
  `invoice_amount_max` double DEFAULT NULL,
  `first_order_time` date DEFAULT NULL,
  `last_order_time` date DEFAULT NULL,
  `has_canceled_orders` int(1) DEFAULT NULL,
  `product_avg` double DEFAULT NULL,
  `ordered_at_weekdays` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `ordered_in_shops` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `ordered_on_devices` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `ordered_with_deliveries` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `ordered_with_payments` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `ordered_products` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `ordered_products_of_categories` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `ordered_products_of_manufacturer` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `index_time` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_customer_streams` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `conditions` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `freeze_up` datetime DEFAULT NULL,
  `static` int(1) DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_customer_streams_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `streamID` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `streamID` (`streamID`),
  CONSTRAINT `s_customer_streams_attributes_ibfk_1` FOREIGN KEY (`streamID`) REFERENCES `s_customer_streams` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_customer_streams_mapping` (
  `stream_id` int(11) NOT NULL,
  `customer_id` int(11) NOT NULL,
  UNIQUE KEY `stream_id` (`stream_id`,`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emarketing_banners` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `description` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  `valid_from` datetime DEFAULT '0000-00-00 00:00:00',
  `valid_to` datetime DEFAULT '0000-00-00 00:00:00',
  `img` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `link` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `link_target` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `categoryID` int(11) NOT NULL DEFAULT 0,
  `extension` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emarketing_banners_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `bannerID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `bannerID` (`bannerID`),
  CONSTRAINT `s_emarketing_banners_attributes_ibfk_1` FOREIGN KEY (`bannerID`) REFERENCES `s_emarketing_banners` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emarketing_banners_statistics` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `bannerID` int(11) NOT NULL,
  `display_date` date NOT NULL,
  `clicks` int(11) NOT NULL,
  `views` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `display_date` (`bannerID`,`display_date`),
  KEY `bannerID` (`bannerID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emarketing_partner` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idcode` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `datum` date NOT NULL,
  `company` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `contact` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `street` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `zipcode` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `fax` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `country` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `web` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `profil` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `fix` double NOT NULL DEFAULT 0,
  `percent` double NOT NULL DEFAULT 0,
  `cookielifetime` int(11) NOT NULL DEFAULT 0,
  `active` int(1) NOT NULL DEFAULT 0,
  `userID` int(11) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idcode` (`idcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emarketing_partner_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `partnerID` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `partnerID` (`partnerID`),
  CONSTRAINT `FK__s_emarketing_partner` FOREIGN KEY (`partnerID`) REFERENCES `s_emarketing_partner` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emarketing_referer` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userID` int(11) NOT NULL,
  `referer` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=38607 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emarketing_tellafriend` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `datum` date NOT NULL DEFAULT '0000-00-00',
  `recipient` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `sender` int(11) NOT NULL DEFAULT 0,
  `confirmed` int(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emarketing_voucher_codes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `voucherID` int(11) NOT NULL DEFAULT 0,
  `userID` int(11) DEFAULT NULL,
  `code` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `cashed` int(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`),
  KEY `voucherID_cashed` (`voucherID`,`cashed`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emarketing_vouchers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `vouchercode` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `numberofunits` int(11) NOT NULL DEFAULT 0,
  `value` double NOT NULL DEFAULT 0,
  `minimumcharge` double NOT NULL DEFAULT 0,
  `shippingfree` int(1) NOT NULL DEFAULT 0,
  `bindtosupplier` int(11) DEFAULT NULL,
  `valid_from` date DEFAULT NULL,
  `valid_to` date DEFAULT NULL,
  `ordercode` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `modus` int(1) NOT NULL DEFAULT 0,
  `percental` int(1) NOT NULL,
  `numorder` int(11) NOT NULL,
  `customergroup` int(11) DEFAULT NULL,
  `restrictarticles` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `strict` int(1) NOT NULL,
  `subshopID` int(1) DEFAULT NULL,
  `taxconfig` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `customer_stream_ids` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `modus` (`modus`)
) ENGINE=InnoDB AUTO_INCREMENT=207 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emarketing_vouchers_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `voucherID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `voucherID` (`voucherID`),
  CONSTRAINT `s_emarketing_vouchers_attributes_ibfk_1` FOREIGN KEY (`voucherID`) REFERENCES `s_emarketing_vouchers` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emotion_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `emotionID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `emotionID` (`emotionID`),
  CONSTRAINT `s_emotion_attributes_ibfk_1` FOREIGN KEY (`emotionID`) REFERENCES `s_emotion` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emotion_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `emotion_id` int(11) NOT NULL,
  `category_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5309 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emotion_element` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `emotionID` int(11) NOT NULL,
  `componentID` int(11) NOT NULL,
  `start_row` int(11) NOT NULL,
  `start_col` int(11) NOT NULL,
  `end_row` int(11) NOT NULL,
  `end_col` int(11) NOT NULL,
  `css_class` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `get_emotion_elements` (`emotionID`,`start_row`,`start_col`)
) ENGINE=InnoDB AUTO_INCREMENT=83511 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emotion_element_value` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `emotionID` int(11) NOT NULL,
  `elementID` int(11) NOT NULL,
  `componentID` int(11) NOT NULL,
  `fieldID` int(11) NOT NULL,
  `value` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `emotionID` (`elementID`),
  KEY `fieldID` (`fieldID`)
) ENGINE=InnoDB AUTO_INCREMENT=362297 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emotion_element_viewports` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `elementID` int(11) NOT NULL,
  `emotionID` int(11) NOT NULL,
  `alias` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `start_row` int(11) NOT NULL,
  `start_col` int(11) NOT NULL,
  `end_row` int(11) NOT NULL,
  `end_col` int(11) NOT NULL,
  `visible` int(1) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=417551 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emotion_preset_translations` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `presetID` int(11) unsigned NOT NULL,
  `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `locale` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'de_DE',
  PRIMARY KEY (`id`),
  UNIQUE KEY `presetID` (`presetID`,`locale`),
  CONSTRAINT `s_emotion_preset_translations_preset_fk` FOREIGN KEY (`presetID`) REFERENCES `s_emotion_presets` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emotion_presets` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `premium` tinyint(1) NOT NULL DEFAULT 0,
  `custom` tinyint(1) NOT NULL DEFAULT 1,
  `thumbnail` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `preview` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `preset_data` longtext COLLATE utf8_unicode_ci NOT NULL,
  `required_plugins` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `emotion_translations` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `assets_imported` tinyint(1) NOT NULL DEFAULT 1,
  `hidden` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emotion_shops` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `emotion_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6094 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_emotion_templates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `file` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_es_backend_backlog` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `entity` varchar(500) COLLATE utf8_unicode_ci NOT NULL,
  `entity_id` int(11) NOT NULL,
  `time` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_es_backlog` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `event` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `payload` text COLLATE utf8_unicode_ci NOT NULL,
  `time` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_export_articles` (
  `feedID` int(11) NOT NULL,
  `articleID` int(11) NOT NULL,
  PRIMARY KEY (`feedID`,`articleID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_export_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `exportID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `exportID` (`exportID`),
  CONSTRAINT `s_export_attributes_ibfk_1` FOREIGN KEY (`exportID`) REFERENCES `s_export` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_export_categories` (
  `feedID` int(11) NOT NULL,
  `categoryID` int(11) NOT NULL,
  PRIMARY KEY (`feedID`,`categoryID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_export_suppliers` (
  `feedID` int(11) NOT NULL,
  `supplierID` int(11) NOT NULL,
  PRIMARY KEY (`feedID`,`supplierID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_filter` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` int(11) NOT NULL,
  `comparable` int(1) NOT NULL,
  `sortmode` int(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `get_sets_query` (`position`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_filter_articles` (
  `articleID` int(10) unsigned NOT NULL,
  `valueID` int(10) unsigned NOT NULL,
  PRIMARY KEY (`articleID`,`valueID`),
  KEY `valueID` (`valueID`),
  KEY `articleID` (`articleID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_filter_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `filterID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `filterID` (`filterID`),
  CONSTRAINT `s_filter_attributes_ibfk_1` FOREIGN KEY (`filterID`) REFERENCES `s_filter` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_filter_options` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `filterable` int(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `get_options_query` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_filter_options_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `optionID` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `optionID` (`optionID`),
  CONSTRAINT `s_filter_options_attributes_ibfk_1` FOREIGN KEY (`optionID`) REFERENCES `s_filter_options` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_filter_relations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `groupID` int(11) NOT NULL,
  `optionID` int(11) NOT NULL,
  `position` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `groupID` (`groupID`,`optionID`),
  KEY `get_set_assigns_query` (`groupID`,`position`),
  KEY `groupID_2` (`groupID`),
  KEY `optionID` (`optionID`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_filter_values` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `optionID` int(11) NOT NULL,
  `value` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` int(11) NOT NULL,
  `media_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `optionID` (`optionID`,`value`),
  KEY `get_property_value_by_option_id_query` (`optionID`,`position`),
  KEY `optionID_2` (`optionID`),
  KEY `filters_order_by_position` (`optionID`,`position`,`id`),
  KEY `filters_order_by_numeric` (`optionID`,`id`),
  KEY `filters_order_by_alphanumeric` (`optionID`,`value`,`id`),
  KEY `media_id` (`media_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1865 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_filter_values_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `valueID` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `valueID` (`valueID`),
  CONSTRAINT `s_filter_values_attributes_ibfk_1` FOREIGN KEY (`valueID`) REFERENCES `s_filter_values` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=1865 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_library_component` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `x_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `convert_function` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `template` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `cls` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `pluginID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_library_component_field` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `componentID` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `x_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `value_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `field_label` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `support_text` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `help_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `help_text` text COLLATE utf8_unicode_ci NOT NULL,
  `store` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `display_field` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `value_field` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `default_value` text COLLATE utf8_unicode_ci NOT NULL,
  `allow_blank` int(1) NOT NULL,
  `translatable` int(1) NOT NULL DEFAULT 0,
  `position` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_mail_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type_id` int(11) DEFAULT NULL,
  `order_id` int(11) DEFAULT NULL,
  `shop_id` int(10) unsigned DEFAULT NULL,
  `subject` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `sender` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `sent_at` datetime NOT NULL,
  `content_html` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `content_text` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `s_mail_log_idx_type_id` (`type_id`),
  KEY `s_mail_log_idx_order_id` (`order_id`),
  KEY `s_mail_log_idx_shop_id` (`shop_id`),
  CONSTRAINT `s_mail_log_fk_order_id` FOREIGN KEY (`order_id`) REFERENCES `s_order` (`id`) ON DELETE SET NULL ON UPDATE NO ACTION,
  CONSTRAINT `s_mail_log_fk_shop_id` FOREIGN KEY (`shop_id`) REFERENCES `s_core_shops` (`id`) ON DELETE SET NULL ON UPDATE NO ACTION,
  CONSTRAINT `s_mail_log_fk_type_id` FOREIGN KEY (`type_id`) REFERENCES `s_core_config_mails` (`id`) ON DELETE SET NULL ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_mail_log_contact` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mail_address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_mail_log_document` (
  `log_id` int(11) NOT NULL,
  `document_id` int(11) NOT NULL,
  PRIMARY KEY (`log_id`,`document_id`),
  KEY `s_mail_log_document_idx_log_id` (`log_id`),
  KEY `s_mail_log_document_idx_document_id` (`document_id`),
  CONSTRAINT `s_mail_log_document_fk_document_id` FOREIGN KEY (`document_id`) REFERENCES `s_order_documents` (`id`) ON DELETE CASCADE,
  CONSTRAINT `s_mail_log_document_fk_log_id` FOREIGN KEY (`log_id`) REFERENCES `s_mail_log` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_mail_log_recipient` (
  `log_id` int(11) NOT NULL,
  `contact_id` int(11) NOT NULL,
  PRIMARY KEY (`log_id`,`contact_id`),
  KEY `s_mail_log_recipient_idx_log_id` (`log_id`),
  KEY `s_mail_log_recipient_idx_contact_id` (`contact_id`),
  CONSTRAINT `s_mail_log_recipient_fk_contact_id` FOREIGN KEY (`contact_id`) REFERENCES `s_mail_log_contact` (`id`) ON DELETE CASCADE,
  CONSTRAINT `s_mail_log_recipient_fk_log_id` FOREIGN KEY (`log_id`) REFERENCES `s_mail_log` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_media` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `albumID` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `extension` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `file_size` int(10) unsigned NOT NULL,
  `width` int(11) unsigned DEFAULT NULL,
  `height` int(11) unsigned DEFAULT NULL,
  `userID` int(11) NOT NULL,
  `created` date NOT NULL,
  PRIMARY KEY (`id`),
  KEY `Album` (`albumID`),
  KEY `path` (`path`)
) ENGINE=InnoDB AUTO_INCREMENT=2905192 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_media_album` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `parentID` int(11) DEFAULT NULL,
  `position` int(11) NOT NULL,
  `garbage_collectable` tinyint(1) DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=112 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_media_album_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `albumID` int(11) NOT NULL,
  `create_thumbnails` int(11) NOT NULL,
  `thumbnail_size` text COLLATE utf8_unicode_ci NOT NULL,
  `icon` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `thumbnail_high_dpi` int(1) DEFAULT NULL,
  `thumbnail_quality` int(11) DEFAULT NULL,
  `thumbnail_high_dpi_quality` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `albumID` (`albumID`)
) ENGINE=InnoDB AUTO_INCREMENT=125 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_media_association` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mediaID` int(11) NOT NULL,
  `targetType` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `targetID` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `Media` (`mediaID`),
  KEY `Target` (`targetID`,`targetType`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_media_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mediaID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mediaID` (`mediaID`),
  CONSTRAINT `s_media_attributes_ibfk_1` FOREIGN KEY (`mediaID`) REFERENCES `s_media` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_multi_edit_backup` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `filter_string` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'Filter string of the backed up change',
  `operation_string` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'Operations applied after the backup',
  `items` int(255) unsigned NOT NULL COMMENT 'Number of items affected by the backup',
  `date` datetime DEFAULT '0000-00-00 00:00:00' COMMENT 'Creation date',
  `size` int(255) unsigned NOT NULL COMMENT 'Size of the backup file',
  `path` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Path of the backup file',
  `hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Hash of the backup file',
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `size` (`size`),
  KEY `items` (`items`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Backups known to the system';
CREATE TABLE `s_multi_edit_filter` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Name of the filter',
  `filter_string` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'The actual filter string',
  `description` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'User description of the filter',
  `created` datetime DEFAULT '0000-00-00 00:00:00' COMMENT 'Creation date',
  `is_favorite` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Did the user mark this filter as favorite?',
  `is_simple` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Can the filter be loaded and modified with the simple editor?',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Holds all multi edit filters';
CREATE TABLE `s_multi_edit_queue` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `resource` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Queued resource (e.g. product)',
  `filter_string` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'The actual filter string',
  `operations` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'Operations to apply',
  `items` int(255) unsigned NOT NULL COMMENT 'Initial number of objects in the queue',
  `active` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'When active, the queue is allowed to be progressed by cronjob',
  `created` datetime DEFAULT '0000-00-00 00:00:00' COMMENT 'Creation date',
  PRIMARY KEY (`id`),
  KEY `filter_string` (`filter_string`(255)),
  KEY `created` (`created`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Holds the batch process queue';
CREATE TABLE `s_multi_edit_queue_articles` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `queue_id` int(11) unsigned NOT NULL COMMENT 'Id of the queue this article belongs to',
  `detail_id` int(11) unsigned NOT NULL COMMENT 'Id of the article detail',
  PRIMARY KEY (`id`),
  UNIQUE KEY `queue_id_2` (`queue_id`,`detail_id`),
  KEY `detail_id` (`detail_id`),
  KEY `queue_id` (`queue_id`),
  CONSTRAINT `s_multi_edit_queue_articles_ibfk_1` FOREIGN KEY (`detail_id`) REFERENCES `s_articles_details` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
  CONSTRAINT `s_multi_edit_queue_articles_ibfk_2` FOREIGN KEY (`queue_id`) REFERENCES `s_multi_edit_queue` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Products belonging to a certain queue';
CREATE TABLE `s_optivo_broadmail_error_queue` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_at` datetime NOT NULL,
  `retry_count` int(11) NOT NULL,
  `last_retry_at` datetime DEFAULT NULL,
  `error_status` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `error_message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `options` longtext COLLATE utf8_unicode_ci NOT NULL COMMENT '(DC2Type:array)',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_order` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ordernumber` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `userID` int(11) DEFAULT NULL,
  `invoice_amount` double NOT NULL DEFAULT 0,
  `invoice_amount_net` double NOT NULL,
  `invoice_shipping` double NOT NULL DEFAULT 0,
  `invoice_shipping_net` double NOT NULL,
  `invoice_shipping_tax_rate` double DEFAULT NULL,
  `ordertime` datetime DEFAULT NULL,
  `status` int(11) NOT NULL DEFAULT 0,
  `cleared` int(11) NOT NULL DEFAULT 0,
  `paymentID` int(11) NOT NULL DEFAULT 0,
  `transactionID` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `comment` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `customercomment` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `internalcomment` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `net` int(1) NOT NULL,
  `taxfree` int(11) NOT NULL,
  `partnerID` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `temporaryID` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `referer` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `cleareddate` datetime DEFAULT NULL,
  `trackingcode` text COLLATE utf8_unicode_ci NOT NULL,
  `language` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `dispatchID` int(11) NOT NULL,
  `currency` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `currencyFactor` double NOT NULL,
  `subshopID` int(11) NOT NULL,
  `remote_addr` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `deviceType` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `is_proportional_calculation` tinyint(4) NOT NULL DEFAULT 0,
  `changed` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `partnerID` (`partnerID`),
  KEY `userID` (`userID`),
  KEY `ordertime` (`ordertime`),
  KEY `cleared` (`cleared`),
  KEY `status` (`status`),
  KEY `paymentID` (`paymentID`),
  KEY `temporaryID` (`temporaryID`),
  KEY `ordernumber` (`ordernumber`),
  KEY `transactionID` (`transactionID`),
  KEY `ordernumber_2` (`ordernumber`,`status`),
  KEY `invoice_amount` (`invoice_amount`)
) ENGINE=InnoDB AUTO_INCREMENT=3257537 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_order_insert` AFTER INSERT ON `s_order`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, NEW.id, 1);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_order_update` AFTER UPDATE ON `s_order`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @changes = 0;
	SET @json = "{";
	SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');

	IF (OLD.id != NEW.id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');
	END IF;

	IF (OLD.ordernumber != NEW.ordernumber) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"ordernumber":', '"', NEW.ordernumber, '"');
	END IF;

	IF (OLD.userID != NEW.userID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"userID":', '"', NEW.userID, '"');
	END IF;

	IF (OLD.invoice_amount != NEW.invoice_amount) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"invoice_amount":', '"', NEW.invoice_amount, '"');
	END IF;

	IF (OLD.invoice_amount_net != NEW.invoice_amount_net) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"invoice_amount_net":', '"', NEW.invoice_amount_net, '"');
	END IF;

	IF (OLD.invoice_shipping != NEW.invoice_shipping) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"invoice_shipping":', '"', NEW.invoice_shipping, '"');
	END IF;

	IF (OLD.invoice_shipping_net != NEW.invoice_shipping_net) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"invoice_shipping_net":', '"', NEW.invoice_shipping_net, '"');
	END IF;

	IF (OLD.invoice_shipping_tax_rate != NEW.invoice_shipping_tax_rate) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"invoice_shipping_tax_rate":', '"', NEW.invoice_shipping_tax_rate, '"');
	END IF;

	IF (OLD.ordertime != NEW.ordertime) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"ordertime":', '"', NEW.ordertime, '"');
	END IF;

	IF (OLD.status != NEW.status) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"status":', '"', NEW.status, '"');
	END IF;

	IF (OLD.cleared != NEW.cleared) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"cleared":', '"', NEW.cleared, '"');
	END IF;

	IF (OLD.paymentID != NEW.paymentID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"paymentID":', '"', NEW.paymentID, '"');
	END IF;

	IF (OLD.transactionID != NEW.transactionID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"transactionID":', '"', NEW.transactionID, '"');
	END IF;

	IF (OLD.comment != NEW.comment) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"comment":', '"', NEW.comment, '"');
	END IF;

	IF (OLD.customercomment != NEW.customercomment) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"customercomment":', '"', NEW.customercomment, '"');
	END IF;

	IF (OLD.internalcomment != NEW.internalcomment) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"internalcomment":', '"', NEW.internalcomment, '"');
	END IF;

	IF (OLD.net != NEW.net) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"net":', '"', NEW.net, '"');
	END IF;

	IF (OLD.taxfree != NEW.taxfree) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"taxfree":', '"', NEW.taxfree, '"');
	END IF;

	IF (OLD.partnerID != NEW.partnerID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"partnerID":', '"', NEW.partnerID, '"');
	END IF;

	IF (OLD.temporaryID != NEW.temporaryID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"temporaryID":', '"', NEW.temporaryID, '"');
	END IF;

	IF (OLD.referer != NEW.referer) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"referer":', '"', NEW.referer, '"');
	END IF;

	IF (OLD.cleareddate != NEW.cleareddate) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"cleareddate":', '"', NEW.cleareddate, '"');
	END IF;

	IF (OLD.trackingcode != NEW.trackingcode) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"trackingcode":', '"', NEW.trackingcode, '"');
	END IF;

	IF (OLD.language != NEW.language) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"language":', '"', NEW.language, '"');
	END IF;

	IF (OLD.dispatchID != NEW.dispatchID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"dispatchID":', '"', NEW.dispatchID, '"');
	END IF;

	IF (OLD.currency != NEW.currency) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"currency":', '"', NEW.currency, '"');
	END IF;

	IF (OLD.currencyFactor != NEW.currencyFactor) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"currencyFactor":', '"', NEW.currencyFactor, '"');
	END IF;

	IF (OLD.subshopID != NEW.subshopID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"subshopID":', '"', NEW.subshopID, '"');
	END IF;

	IF (OLD.remote_addr != NEW.remote_addr) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"remote_addr":', '"', NEW.remote_addr, '"');
	END IF;

	IF (OLD.deviceType != NEW.deviceType) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"deviceType":', '"', NEW.deviceType, '"');
	END IF;

	IF (OLD.is_proportional_calculation != NEW.is_proportional_calculation) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"is_proportional_calculation":', '"', NEW.is_proportional_calculation, '"');
	END IF;

	IF (OLD.changed != NEW.changed) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"changed":', '"', NEW.changed, '"');
	END IF;

	SET @json = CONCAT(@json, "}");

	IF (@changes > 0) THEN
		INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, OLD.id, 2);
	END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `before_s_order_delete` BEFORE DELETE ON `s_order`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"id":', '"', OLD.id, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, OLD.id, 3);
END */;;
DELIMITER ;
CREATE TABLE `s_order_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `orderID` int(11) DEFAULT NULL,
  `attribute1` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute2` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute3` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute4` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute5` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute6` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `asmc_express_requesteddeliverydate` date DEFAULT NULL,
  `asmc_express_shippingdate` date DEFAULT NULL,
  `asmc_express_servicenumber` int(11) DEFAULT NULL,
  `swag_paypal_unified_payment_type` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `swag_paypal_unified_payment_instructions` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `orderID` (`orderID`),
  CONSTRAINT `s_order_attributes_ibfk_1` FOREIGN KEY (`orderID`) REFERENCES `s_order` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=3256930 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_order_attributes_insert` AFTER INSERT ON `s_order_attributes`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"orderID":', '"', NEW.orderID, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, NEW.orderID, 1);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_order_attributes_update` AFTER UPDATE ON `s_order_attributes`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @changes = 0;
	SET @json = "{";
	SET @json = CONCAT(@json, '"orderID":', '"', NEW.orderID, '"');

	IF (OLD.id != NEW.id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');
	END IF;

	IF (OLD.orderID != NEW.orderID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"orderID":', '"', NEW.orderID, '"');
	END IF;

	IF (OLD.asmc_express_requesteddeliverydate != NEW.asmc_express_requesteddeliverydate) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"asmc_express_requesteddeliverydate":', '"', NEW.asmc_express_requesteddeliverydate, '"');
	END IF;

	IF (OLD.asmc_express_shippingdate != NEW.asmc_express_shippingdate) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"asmc_express_shippingdate":', '"', NEW.asmc_express_shippingdate, '"');
	END IF;

	IF (OLD.asmc_express_servicenumber != NEW.asmc_express_servicenumber) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"asmc_express_servicenumber":', '"', NEW.asmc_express_servicenumber, '"');
	END IF;

	IF (OLD.swag_paypal_unified_payment_type != NEW.swag_paypal_unified_payment_type) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"swag_paypal_unified_payment_type":', '"', NEW.swag_paypal_unified_payment_type, '"');
	END IF;

	SET @json = CONCAT(@json, "}");

	IF (@changes > 0) THEN
		INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, OLD.orderID, 2);
	END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `before_s_order_attributes_delete` BEFORE DELETE ON `s_order_attributes`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"orderID":', '"', OLD.orderID, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, OLD.orderID, 3);
END */;;
DELIMITER ;
CREATE TABLE `s_order_basket_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `basketID` int(11) DEFAULT NULL,
  `attribute1` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute2` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute3` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute4` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute5` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute6` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `swag_promotion_id` int(11) DEFAULT NULL,
  `swag_is_free_good_by_promotion_id` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `swag_is_shipping_free_promotion` int(1) DEFAULT 0,
  `swag_promotion_item_discount` double DEFAULT 0,
  `swag_promotion_direct_item_discount` double DEFAULT 0,
  `swag_promotion_direct_promotions` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `asmc_custom_product_value` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `swag_live_shopping_timestamp` datetime DEFAULT NULL,
  `swag_live_shopping_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `basketID` (`basketID`),
  CONSTRAINT `s_order_basket_attributes_ibfk_2` FOREIGN KEY (`basketID`) REFERENCES `s_order_basket` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=1660111 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_order_basket_signatures` (
  `signature` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  `basket` longtext COLLATE utf8_unicode_ci NOT NULL,
  `created_at` date NOT NULL,
  PRIMARY KEY (`signature`),
  KEY `created_at` (`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_order_billingaddress` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userID` int(11) DEFAULT NULL,
  `orderID` int(11) NOT NULL,
  `company` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `department` varchar(35) COLLATE utf8_unicode_ci NOT NULL,
  `salutation` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `customernumber` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
  `firstname` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `lastname` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  `street` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zipcode` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(70) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
  `countryID` int(11) NOT NULL DEFAULT 0,
  `stateID` int(11) DEFAULT NULL,
  `ustid` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `additional_address_line1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `additional_address_line2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `title` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `orderID` (`orderID`),
  KEY `userid` (`userID`)
) ENGINE=InnoDB AUTO_INCREMENT=699820 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_order_billingaddress_insert` AFTER INSERT ON `s_order_billingaddress`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"orderID":', '"', NEW.orderID, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, NEW.orderID, 1);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_order_billingaddress_update` AFTER UPDATE ON `s_order_billingaddress`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @changes = 0;
	SET @json = "{";
	SET @json = CONCAT(@json, '"orderID":', '"', NEW.orderID, '"');

	IF (OLD.id != NEW.id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');
	END IF;

	IF (OLD.userID != NEW.userID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"userID":', '"', NEW.userID, '"');
	END IF;

	IF (OLD.orderID != NEW.orderID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"orderID":', '"', NEW.orderID, '"');
	END IF;

	IF (OLD.company != NEW.company) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"company":', '"', NEW.company, '"');
	END IF;

	IF (OLD.department != NEW.department) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"department":', '"', NEW.department, '"');
	END IF;

	IF (OLD.salutation != NEW.salutation) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"salutation":', '"', NEW.salutation, '"');
	END IF;

	IF (OLD.customernumber != NEW.customernumber) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"customernumber":', '"', NEW.customernumber, '"');
	END IF;

	IF (OLD.firstname != NEW.firstname) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"firstname":', '"', NEW.firstname, '"');
	END IF;

	IF (OLD.lastname != NEW.lastname) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"lastname":', '"', NEW.lastname, '"');
	END IF;

	IF (OLD.street != NEW.street) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"street":', '"', NEW.street, '"');
	END IF;

	IF (OLD.zipcode != NEW.zipcode) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"zipcode":', '"', NEW.zipcode, '"');
	END IF;

	IF (OLD.city != NEW.city) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"city":', '"', NEW.city, '"');
	END IF;

	IF (OLD.phone != NEW.phone) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"phone":', '"', NEW.phone, '"');
	END IF;

	IF (OLD.countryID != NEW.countryID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"countryID":', '"', NEW.countryID, '"');
	END IF;

	IF (OLD.stateID != NEW.stateID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"stateID":', '"', NEW.stateID, '"');
	END IF;

	IF (OLD.ustid != NEW.ustid) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"ustid":', '"', NEW.ustid, '"');
	END IF;

	IF (OLD.additional_address_line1 != NEW.additional_address_line1) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"additional_address_line1":', '"', NEW.additional_address_line1, '"');
	END IF;

	IF (OLD.additional_address_line2 != NEW.additional_address_line2) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"additional_address_line2":', '"', NEW.additional_address_line2, '"');
	END IF;

	IF (OLD.title != NEW.title) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"title":', '"', NEW.title, '"');
	END IF;

	SET @json = CONCAT(@json, "}");

	IF (@changes > 0) THEN
		INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, OLD.orderID, 2);
	END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `before_s_order_billingaddress_delete` BEFORE DELETE ON `s_order_billingaddress`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"orderID":', '"', OLD.orderID, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, OLD.orderID, 3);
END */;;
DELIMITER ;
CREATE TABLE `s_order_billingaddress_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `billingID` int(11) DEFAULT NULL,
  `text1` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text2` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text3` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text4` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text5` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text6` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `billingID` (`billingID`),
  CONSTRAINT `s_order_billingaddress_attributes_ibfk_2` FOREIGN KEY (`billingID`) REFERENCES `s_order_billingaddress` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=141081 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_order_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `orderID` int(11) NOT NULL DEFAULT 0,
  `ordernumber` varchar(255) COLLATE utf8_unicode_ci DEFAULT '',
  `articleID` int(11) NOT NULL DEFAULT 0,
  `articleordernumber` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `price` double NOT NULL DEFAULT 0,
  `quantity` int(11) NOT NULL DEFAULT 0,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `status` int(1) NOT NULL DEFAULT 0,
  `shipped` int(11) NOT NULL DEFAULT 0,
  `shippedgroup` int(11) NOT NULL DEFAULT 0,
  `releasedate` date DEFAULT NULL,
  `modus` int(11) NOT NULL,
  `esdarticle` int(1) NOT NULL,
  `taxID` int(11) DEFAULT NULL,
  `tax_rate` double NOT NULL,
  `config` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `ean` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `unit` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `pack_unit` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `articleDetailID` int(11) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `orderID` (`orderID`),
  KEY `articleID` (`articleID`),
  KEY `ordernumber` (`ordernumber`),
  KEY `articleordernumber` (`articleordernumber`),
  CONSTRAINT `s_order_details_ibfk_1` FOREIGN KEY (`orderID`) REFERENCES `s_order` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=12205008 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_order_details_insert` AFTER INSERT ON `s_order_details`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"orderID":', '"', NEW.orderID, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, NEW.orderID, 1);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_order_details_update` AFTER UPDATE ON `s_order_details`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @changes = 0;
	SET @json = "{";
	SET @json = CONCAT(@json, '"orderID":', '"', NEW.orderID, '"');

	IF (OLD.id != NEW.id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');
	END IF;

	IF (OLD.orderID != NEW.orderID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"orderID":', '"', NEW.orderID, '"');
	END IF;

	IF (OLD.ordernumber != NEW.ordernumber) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"ordernumber":', '"', NEW.ordernumber, '"');
	END IF;

	IF (OLD.articleID != NEW.articleID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"articleID":', '"', NEW.articleID, '"');
	END IF;

	IF (OLD.articleordernumber != NEW.articleordernumber) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"articleordernumber":', '"', NEW.articleordernumber, '"');
	END IF;

	IF (OLD.price != NEW.price) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"price":', '"', NEW.price, '"');
	END IF;

	IF (OLD.quantity != NEW.quantity) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"quantity":', '"', NEW.quantity, '"');
	END IF;

	IF (OLD.name != NEW.name) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"name":', '"', NEW.name, '"');
	END IF;

	IF (OLD.status != NEW.status) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"status":', '"', NEW.status, '"');
	END IF;

	IF (OLD.shipped != NEW.shipped) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"shipped":', '"', NEW.shipped, '"');
	END IF;

	IF (OLD.shippedgroup != NEW.shippedgroup) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"shippedgroup":', '"', NEW.shippedgroup, '"');
	END IF;

	IF (OLD.releasedate != NEW.releasedate) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"releasedate":', '"', NEW.releasedate, '"');
	END IF;

	IF (OLD.modus != NEW.modus) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"modus":', '"', NEW.modus, '"');
	END IF;

	IF (OLD.esdarticle != NEW.esdarticle) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"esdarticle":', '"', NEW.esdarticle, '"');
	END IF;

	IF (OLD.taxID != NEW.taxID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"taxID":', '"', NEW.taxID, '"');
	END IF;

	IF (OLD.tax_rate != NEW.tax_rate) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"tax_rate":', '"', NEW.tax_rate, '"');
	END IF;

	IF (OLD.config != NEW.config) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"config":', '"', NEW.config, '"');
	END IF;

	IF (OLD.ean != NEW.ean) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"ean":', '"', NEW.ean, '"');
	END IF;

	IF (OLD.unit != NEW.unit) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"unit":', '"', NEW.unit, '"');
	END IF;

	IF (OLD.pack_unit != NEW.pack_unit) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"pack_unit":', '"', NEW.pack_unit, '"');
	END IF;

	IF (OLD.articleDetailID != NEW.articleDetailID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"articleDetailID":', '"', NEW.articleDetailID, '"');
	END IF;

	SET @json = CONCAT(@json, "}");

	IF (@changes > 0) THEN
		INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, OLD.orderID, 2);
	END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `before_s_order_details_delete` BEFORE DELETE ON `s_order_details`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"orderID":', '"', OLD.orderID, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, OLD.orderID, 3);
END */;;
DELIMITER ;
CREATE TABLE `s_order_details_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `detailID` int(11) DEFAULT NULL,
  `attribute1` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute2` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute3` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute4` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute5` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `attribute6` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `swag_promotion_item_discount` double DEFAULT 0,
  `swag_promotion_direct_item_discount` double DEFAULT 0,
  `swag_promotion_direct_promotions` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `asmc_custom_product_value` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `asmc_is_returned` int(1) DEFAULT 0,
  `asmc_returned_quantity` int(11) DEFAULT NULL,
  `asmc_discount` float DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `detailID` (`detailID`),
  CONSTRAINT `s_order_details_attributes_ibfk_1` FOREIGN KEY (`detailID`) REFERENCES `s_order_details` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=12202550 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_order_documents_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `documentID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `documentID` (`documentID`),
  CONSTRAINT `s_order_documents_attributes_ibfk_1` FOREIGN KEY (`documentID`) REFERENCES `s_order_documents` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_order_esd` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `serialID` int(255) NOT NULL DEFAULT 0,
  `esdID` int(11) NOT NULL DEFAULT 0,
  `userID` int(11) NOT NULL DEFAULT 0,
  `orderID` int(11) NOT NULL DEFAULT 0,
  `orderdetailsID` int(11) NOT NULL DEFAULT 0,
  `datum` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_order_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `orderID` int(11) NOT NULL,
  `userID` int(11) DEFAULT NULL,
  `previous_order_status_id` int(11) DEFAULT NULL,
  `order_status_id` int(11) DEFAULT NULL,
  `previous_payment_status_id` int(11) DEFAULT NULL,
  `payment_status_id` int(11) DEFAULT NULL,
  `comment` text COLLATE utf8_unicode_ci NOT NULL,
  `change_date` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user` (`userID`),
  KEY `order` (`orderID`),
  KEY `current_payment_status` (`payment_status_id`),
  KEY `current_order_status` (`order_status_id`),
  KEY `previous_payment_status` (`previous_payment_status_id`),
  KEY `previous_order_status` (`previous_order_status_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2492659 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_order_history_insert` AFTER INSERT ON `s_order_history`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"orderID":', '"', NEW.orderID, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, NEW.orderID, 1);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_order_history_update` AFTER UPDATE ON `s_order_history`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @changes = 0;
	SET @json = "{";
	SET @json = CONCAT(@json, '"orderID":', '"', NEW.orderID, '"');

	IF (OLD.id != NEW.id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');
	END IF;

	IF (OLD.orderID != NEW.orderID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"orderID":', '"', NEW.orderID, '"');
	END IF;

	IF (OLD.userID != NEW.userID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"userID":', '"', NEW.userID, '"');
	END IF;

	IF (OLD.previous_order_status_id != NEW.previous_order_status_id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"previous_order_status_id":', '"', NEW.previous_order_status_id, '"');
	END IF;

	IF (OLD.order_status_id != NEW.order_status_id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"order_status_id":', '"', NEW.order_status_id, '"');
	END IF;

	IF (OLD.previous_payment_status_id != NEW.previous_payment_status_id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"previous_payment_status_id":', '"', NEW.previous_payment_status_id, '"');
	END IF;

	IF (OLD.payment_status_id != NEW.payment_status_id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"payment_status_id":', '"', NEW.payment_status_id, '"');
	END IF;

	IF (OLD.comment != NEW.comment) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"comment":', '"', NEW.comment, '"');
	END IF;

	IF (OLD.change_date != NEW.change_date) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"change_date":', '"', NEW.change_date, '"');
	END IF;

	SET @json = CONCAT(@json, "}");

	IF (@changes > 0) THEN
		INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, OLD.orderID, 2);
	END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `before_s_order_history_delete` BEFORE DELETE ON `s_order_history`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"orderID":', '"', OLD.orderID, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, OLD.orderID, 3);
END */;;
DELIMITER ;
CREATE TABLE `s_order_notes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sUniqueID` varchar(70) COLLATE utf8_unicode_ci NOT NULL,
  `userID` int(11) NOT NULL DEFAULT 0,
  `articlename` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `articleID` int(11) NOT NULL DEFAULT 0,
  `ordernumber` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `datum` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`id`),
  KEY `basket_count_notes` (`sUniqueID`,`userID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_order_number` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `number` int(20) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `desc` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=929 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_order_shippingaddress` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userID` int(11) DEFAULT NULL,
  `orderID` int(11) NOT NULL,
  `company` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `department` varchar(35) COLLATE utf8_unicode_ci NOT NULL,
  `salutation` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `firstname` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `lastname` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  `street` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zipcode` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(70) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL,
  `countryID` int(11) NOT NULL,
  `stateID` int(11) DEFAULT NULL,
  `additional_address_line1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `additional_address_line2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `title` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `orderID` (`orderID`),
  KEY `userID` (`userID`)
) ENGINE=InnoDB AUTO_INCREMENT=699819 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_order_shippingaddress_insert` AFTER INSERT ON `s_order_shippingaddress`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"orderID":', '"', NEW.orderID, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, NEW.orderID, 1);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_order_shippingaddress_update` AFTER UPDATE ON `s_order_shippingaddress`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @changes = 0;
	SET @json = "{";
	SET @json = CONCAT(@json, '"orderID":', '"', NEW.orderID, '"');

	IF (OLD.id != NEW.id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');
	END IF;

	IF (OLD.userID != NEW.userID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"userID":', '"', NEW.userID, '"');
	END IF;

	IF (OLD.orderID != NEW.orderID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"orderID":', '"', NEW.orderID, '"');
	END IF;

	IF (OLD.company != NEW.company) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"company":', '"', NEW.company, '"');
	END IF;

	IF (OLD.department != NEW.department) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"department":', '"', NEW.department, '"');
	END IF;

	IF (OLD.salutation != NEW.salutation) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"salutation":', '"', NEW.salutation, '"');
	END IF;

	IF (OLD.firstname != NEW.firstname) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"firstname":', '"', NEW.firstname, '"');
	END IF;

	IF (OLD.lastname != NEW.lastname) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"lastname":', '"', NEW.lastname, '"');
	END IF;

	IF (OLD.street != NEW.street) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"street":', '"', NEW.street, '"');
	END IF;

	IF (OLD.zipcode != NEW.zipcode) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"zipcode":', '"', NEW.zipcode, '"');
	END IF;

	IF (OLD.city != NEW.city) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"city":', '"', NEW.city, '"');
	END IF;

	IF (OLD.phone != NEW.phone) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"phone":', '"', NEW.phone, '"');
	END IF;

	IF (OLD.countryID != NEW.countryID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"countryID":', '"', NEW.countryID, '"');
	END IF;

	IF (OLD.stateID != NEW.stateID) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"stateID":', '"', NEW.stateID, '"');
	END IF;

	IF (OLD.additional_address_line1 != NEW.additional_address_line1) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"additional_address_line1":', '"', NEW.additional_address_line1, '"');
	END IF;

	IF (OLD.additional_address_line2 != NEW.additional_address_line2) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"additional_address_line2":', '"', NEW.additional_address_line2, '"');
	END IF;

	IF (OLD.title != NEW.title) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"title":', '"', NEW.title, '"');
	END IF;

	SET @json = CONCAT(@json, "}");

	IF (@changes > 0) THEN
		INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, OLD.orderID, 2);
	END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `before_s_order_shippingaddress_delete` BEFORE DELETE ON `s_order_shippingaddress`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"orderID":', '"', OLD.orderID, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 2, OLD.orderID, 3);
END */;;
DELIMITER ;
CREATE TABLE `s_order_shippingaddress_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `shippingID` int(11) DEFAULT NULL,
  `text1` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text2` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text3` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text4` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text5` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text6` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `shippingID` (`shippingID`),
  CONSTRAINT `s_order_shippingaddress_attributes_ibfk_1` FOREIGN KEY (`shippingID`) REFERENCES `s_order_shippingaddress` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=141081 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_plugin_promotion` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rules` longtext COLLATE utf8_unicode_ci NOT NULL,
  `apply_rules` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `number` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `detail_description` longtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `max_usage` int(11) DEFAULT NULL,
  `voucher_id` int(11) DEFAULT NULL,
  `no_vouchers` tinyint(1) NOT NULL,
  `valid_from` datetime DEFAULT NULL,
  `valid_to` datetime DEFAULT NULL,
  `stack_mode` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `amount` double DEFAULT NULL,
  `step` int(11) DEFAULT NULL,
  `max_quantity` int(11) DEFAULT NULL,
  `active` tinyint(1) NOT NULL,
  `exclusive` tinyint(1) NOT NULL,
  `shipping_free` tinyint(1) DEFAULT NULL,
  `priority` int(11) DEFAULT NULL,
  `stop_processing` tinyint(1) NOT NULL,
  `show_badge` tinyint(1) DEFAULT NULL,
  `badge_text` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `free_goods_badge_text` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `apply_rules_first` tinyint(1) NOT NULL,
  `show_hint_in_basket` tinyint(1) NOT NULL,
  `discount_display` varchar(30) COLLATE utf8_unicode_ci DEFAULT 'stacked',
  `buy_button_mode` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'details',
  PRIMARY KEY (`id`),
  KEY `IDX_promotion_voucher_id` (`voucher_id`),
  KEY `promotion_repository` (`active`,`valid_from`,`valid_to`)
) ENGINE=InnoDB AUTO_INCREMENT=208 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_plugin_promotion_customer_count` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `promotion_id` int(11) DEFAULT NULL,
  `customer_id` int(11) DEFAULT NULL,
  `order_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `IDX_pcc_customer_id` (`customer_id`),
  KEY `IDX_pcc_promotion_id` (`promotion_id`),
  KEY `IDX_pcc_order_id` (`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=25893 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_plugin_promotion_customer_group` (
  `promotionID` int(11) NOT NULL,
  `groupID` int(11) NOT NULL,
  PRIMARY KEY (`promotionID`,`groupID`),
  KEY `IDX_pcg_promotion_id` (`promotionID`),
  KEY `IDX_pcg_group_id` (`groupID`),
  CONSTRAINT `FK_spp_to_sppcg_promotion_id` FOREIGN KEY (`promotionID`) REFERENCES `s_plugin_promotion` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_plugin_promotion_do_not_allow_later` (
  `promotionID` int(11) NOT NULL,
  `doNotAllowLaterID` int(11) NOT NULL,
  PRIMARY KEY (`promotionID`,`doNotAllowLaterID`),
  KEY `IDX_pdnal_promotion_id` (`promotionID`),
  KEY `IDX_pdnal_do_not_allow_later_id` (`doNotAllowLaterID`),
  CONSTRAINT `FK_spp_to_sppdnal_do_not_allow_later_id` FOREIGN KEY (`doNotAllowLaterID`) REFERENCES `s_plugin_promotion` (`id`),
  CONSTRAINT `FK_spp_to_sppdnal_promotion_id` FOREIGN KEY (`promotionID`) REFERENCES `s_plugin_promotion` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_plugin_promotion_do_not_run_after` (
  `promotionID` int(11) NOT NULL,
  `doNotRunAfterID` int(11) NOT NULL,
  PRIMARY KEY (`promotionID`,`doNotRunAfterID`),
  KEY `IDX_sppdnra_promotion_id` (`promotionID`),
  KEY `IDX_sppdnra_do_not_run_after_id` (`doNotRunAfterID`),
  CONSTRAINT `FK_spp_to_sppdnra_do_not_run_after_id` FOREIGN KEY (`doNotRunAfterID`) REFERENCES `s_plugin_promotion` (`id`),
  CONSTRAINT `FK_spp_to_sppdnra_promotion_id` FOREIGN KEY (`promotionID`) REFERENCES `s_plugin_promotion` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_plugin_promotion_free_goods` (
  `promotionID` int(11) NOT NULL,
  `articleID` int(11) NOT NULL,
  PRIMARY KEY (`promotionID`,`articleID`),
  KEY `IDX_sppfg_promotion_id` (`promotionID`),
  KEY `IDX_sppfg_article_id` (`articleID`),
  CONSTRAINT `FK_spp_to_sppfg_promotion_id` FOREIGN KEY (`promotionID`) REFERENCES `s_plugin_promotion` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_plugin_promotion_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `promotion_id` int(11) NOT NULL,
  `info` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_plugin_promotion_shop` (
  `promotionID` int(11) NOT NULL,
  `shopID` int(11) NOT NULL,
  PRIMARY KEY (`promotionID`,`shopID`),
  KEY `IDX_spps_promotion_id` (`promotionID`),
  KEY `IDX_spps_shop_id` (`shopID`),
  CONSTRAINT `FK_spp_to_spps_promotion_id` FOREIGN KEY (`promotionID`) REFERENCES `s_plugin_promotion` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_plugin_recommendations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `categoryID` int(11) NOT NULL,
  `banner_active` int(1) NOT NULL,
  `new_active` int(1) NOT NULL,
  `bought_active` int(1) NOT NULL,
  `supplier_active` int(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `categoryID_2` (`categoryID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_plugin_schema_version` (
  `plugin_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `version` int(11) NOT NULL,
  `start_date` datetime NOT NULL,
  `complete_date` datetime DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `error_msg` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`plugin_name`,`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_plugin_widgets_notes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userID` int(11) NOT NULL,
  `notes` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_premium_dispatch` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` int(11) unsigned NOT NULL,
  `description` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  `comment` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `active` int(1) unsigned NOT NULL,
  `position` int(11) NOT NULL,
  `calculation` int(1) unsigned NOT NULL,
  `surcharge_calculation` int(1) unsigned NOT NULL,
  `tax_calculation` int(11) unsigned NOT NULL,
  `shippingfree` decimal(10,2) unsigned DEFAULT NULL,
  `multishopID` int(11) unsigned DEFAULT NULL,
  `customergroupID` int(11) unsigned DEFAULT NULL,
  `bind_shippingfree` int(1) unsigned NOT NULL,
  `bind_time_from` int(11) unsigned DEFAULT NULL,
  `bind_time_to` int(11) unsigned DEFAULT NULL,
  `bind_instock` int(1) unsigned DEFAULT NULL,
  `bind_laststock` int(1) unsigned NOT NULL,
  `bind_weekday_from` int(1) unsigned DEFAULT NULL,
  `bind_weekday_to` int(1) unsigned DEFAULT NULL,
  `bind_weight_from` decimal(10,3) DEFAULT NULL,
  `bind_weight_to` decimal(10,3) DEFAULT NULL,
  `bind_price_from` decimal(10,2) DEFAULT NULL,
  `bind_price_to` decimal(10,2) DEFAULT NULL,
  `bind_sql` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `status_link` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL,
  `calculation_sql` mediumtext COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_premium_dispatch_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `dispatchID` int(11) DEFAULT NULL,
  `delivery_text` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `dispatchID` (`dispatchID`),
  CONSTRAINT `s_premium_dispatch_attributes_ibfk_1` FOREIGN KEY (`dispatchID`) REFERENCES `s_premium_dispatch` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_premium_dispatch_categories` (
  `dispatchID` int(11) unsigned NOT NULL,
  `categoryID` int(11) unsigned NOT NULL,
  PRIMARY KEY (`dispatchID`,`categoryID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_premium_dispatch_countries` (
  `dispatchID` int(11) NOT NULL,
  `countryID` int(11) NOT NULL,
  PRIMARY KEY (`dispatchID`,`countryID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_premium_dispatch_holidays` (
  `dispatchID` int(11) unsigned NOT NULL,
  `holidayID` int(11) unsigned NOT NULL,
  PRIMARY KEY (`dispatchID`,`holidayID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_premium_dispatch_paymentmeans` (
  `dispatchID` int(11) NOT NULL,
  `paymentID` int(11) NOT NULL,
  PRIMARY KEY (`dispatchID`,`paymentID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_premium_holidays` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `calculation` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `date` date NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_premium_shippingcosts` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `from` decimal(10,3) unsigned NOT NULL,
  `value` decimal(10,2) NOT NULL,
  `factor` decimal(10,2) NOT NULL,
  `dispatchID` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `from` (`from`,`dispatchID`)
) ENGINE=InnoDB AUTO_INCREMENT=1936 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_product_streams` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `conditions` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `type` int(11) DEFAULT NULL,
  `sorting` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `sorting_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=76 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_product_streams_articles` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `stream_id` int(11) unsigned NOT NULL,
  `article_id` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `stream_id` (`stream_id`,`article_id`),
  KEY `s_product_streams_articles_fk_article_id` (`article_id`),
  CONSTRAINT `s_product_streams_articles_fk_article_id` FOREIGN KEY (`article_id`) REFERENCES `s_articles` (`id`) ON DELETE CASCADE,
  CONSTRAINT `s_product_streams_articles_fk_stream_id` FOREIGN KEY (`stream_id`) REFERENCES `s_product_streams` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_product_streams_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `streamID` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `streamID` (`streamID`),
  CONSTRAINT `s_product_streams_attributes_ibfk_1` FOREIGN KEY (`streamID`) REFERENCES `s_product_streams` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_product_streams_selection` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `stream_id` int(11) unsigned NOT NULL,
  `article_id` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `stream_id` (`stream_id`,`article_id`),
  KEY `s_product_streams_selection_fk_article_id` (`article_id`),
  CONSTRAINT `s_product_streams_selection_fk_article_id` FOREIGN KEY (`article_id`) REFERENCES `s_articles` (`id`) ON DELETE CASCADE,
  CONSTRAINT `s_product_streams_selection_fk_stream_id` FOREIGN KEY (`stream_id`) REFERENCES `s_product_streams` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_schema_version` (
  `version` int(11) NOT NULL,
  `start_date` datetime NOT NULL,
  `complete_date` datetime DEFAULT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `error_msg` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_search_custom_facet` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `active` int(1) unsigned NOT NULL,
  `unique_key` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `display_in_categories` int(1) unsigned NOT NULL,
  `deletable` int(1) unsigned NOT NULL,
  `position` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `facet` longtext COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_identifier` (`unique_key`),
  KEY `sorting` (`display_in_categories`,`position`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_search_custom_sorting` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `label` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `active` int(1) unsigned NOT NULL,
  `display_in_categories` int(1) unsigned NOT NULL,
  `position` int(11) NOT NULL,
  `sortings` longtext COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sorting` (`display_in_categories`,`position`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_search_fields` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `relevance` int(11) NOT NULL,
  `field` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tableID` int(11) NOT NULL,
  `do_not_split` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `field` (`field`,`tableID`),
  KEY `tableID` (`tableID`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_search_index` (
  `keywordID` int(11) NOT NULL,
  `fieldID` int(11) NOT NULL,
  `elementID` int(11) NOT NULL,
  PRIMARY KEY (`keywordID`,`fieldID`,`elementID`),
  KEY `clean_up_index` (`keywordID`,`fieldID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_search_keywords` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `keyword` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `soundex` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `keyword` (`keyword`),
  KEY `soundex` (`soundex`)
) ENGINE=InnoDB AUTO_INCREMENT=332414 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_search_tables` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `table` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `referenz_table` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `foreign_key` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `where` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_sofort_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `message` longtext COLLATE utf8_unicode_ci NOT NULL,
  `plugin_version` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `source` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `customer_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28798 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_statistics_article_impression` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `articleId` int(11) unsigned NOT NULL,
  `shopId` int(11) unsigned NOT NULL,
  `date` date NOT NULL DEFAULT '0000-00-00',
  `impressions` int(11) NOT NULL,
  `deviceType` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'desktop',
  PRIMARY KEY (`id`),
  UNIQUE KEY `articleId_2` (`articleId`,`shopId`,`date`,`deviceType`),
  KEY `articleId` (`articleId`)
) ENGINE=InnoDB AUTO_INCREMENT=12458920 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_statistics_currentusers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `remoteaddr` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `page` varchar(70) COLLATE utf8_unicode_ci NOT NULL,
  `time` datetime DEFAULT NULL,
  `userID` int(11) NOT NULL DEFAULT 0,
  `deviceType` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'desktop',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=41778732 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_statistics_pool` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `remoteaddr` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `datum` date NOT NULL DEFAULT '0000-00-00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6137006 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_statistics_referer` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `datum` date NOT NULL DEFAULT '0000-00-00',
  `referer` mediumtext COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5273371 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_statistics_search` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `datum` datetime NOT NULL,
  `searchterm` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `results` int(11) NOT NULL,
  `shop_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `searchterm` (`searchterm`)
) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8;
CREATE TABLE `s_statistics_visitors` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `shopID` int(11) NOT NULL,
  `datum` date NOT NULL DEFAULT '0000-00-00',
  `pageimpressions` int(11) NOT NULL DEFAULT 0,
  `uniquevisits` int(11) NOT NULL DEFAULT 0,
  `deviceType` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'desktop',
  PRIMARY KEY (`id`),
  KEY `datum` (`datum`)
) ENGINE=InnoDB AUTO_INCREMENT=3929 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_user_insert` AFTER INSERT ON `s_user`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 3, NEW.id, 1);
END */;;
DELIMITER ;
DELIMITER ;;
;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `before_s_user_delete` BEFORE DELETE ON `s_user`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"id":', '"', OLD.id, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 3, OLD.id, 3);
END */;;
DELIMITER ;
CREATE TABLE `s_user_addresses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `company` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `department` varchar(35) COLLATE utf8_unicode_ci DEFAULT NULL,
  `salutation` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `title` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `firstname` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `lastname` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  `street` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zipcode` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(70) COLLATE utf8_unicode_ci NOT NULL,
  `country_id` int(11) NOT NULL,
  `state_id` int(11) DEFAULT NULL,
  `ustid` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `phone` varchar(40) COLLATE utf8_unicode_ci DEFAULT NULL,
  `additional_address_line1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `additional_address_line2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `country_id` (`country_id`),
  KEY `state_id` (`state_id`),
  CONSTRAINT `s_user_addresses_ibfk_1` FOREIGN KEY (`country_id`) REFERENCES `s_core_countries` (`id`) ON UPDATE CASCADE,
  CONSTRAINT `s_user_addresses_ibfk_2` FOREIGN KEY (`state_id`) REFERENCES `s_core_countries_states` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `s_user_addresses_ibfk_3` FOREIGN KEY (`user_id`) REFERENCES `s_user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1407440 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_user_addresses_insert` AFTER INSERT ON `s_user_addresses`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"user_id":', '"', NEW.user_id, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 3, NEW.user_id, 1);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `after_s_user_addresses_update` AFTER UPDATE ON `s_user_addresses`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @changes = 0;
	SET @json = "{";
	SET @json = CONCAT(@json, '"user_id":', '"', NEW.user_id, '"');

	IF (OLD.id != NEW.id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"id":', '"', NEW.id, '"');
	END IF;

	IF (OLD.user_id != NEW.user_id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"user_id":', '"', NEW.user_id, '"');
	END IF;

	IF (OLD.company != NEW.company) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"company":', '"', NEW.company, '"');
	END IF;

	IF (OLD.department != NEW.department) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"department":', '"', NEW.department, '"');
	END IF;

	IF (OLD.salutation != NEW.salutation) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"salutation":', '"', NEW.salutation, '"');
	END IF;

	IF (OLD.title != NEW.title) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"title":', '"', NEW.title, '"');
	END IF;

	IF (OLD.firstname != NEW.firstname) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"firstname":', '"', NEW.firstname, '"');
	END IF;

	IF (OLD.lastname != NEW.lastname) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"lastname":', '"', NEW.lastname, '"');
	END IF;

	IF (OLD.street != NEW.street) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"street":', '"', NEW.street, '"');
	END IF;

	IF (OLD.zipcode != NEW.zipcode) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"zipcode":', '"', NEW.zipcode, '"');
	END IF;

	IF (OLD.city != NEW.city) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"city":', '"', NEW.city, '"');
	END IF;

	IF (OLD.country_id != NEW.country_id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"country_id":', '"', NEW.country_id, '"');
	END IF;

	IF (OLD.state_id != NEW.state_id) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"state_id":', '"', NEW.state_id, '"');
	END IF;

	IF (OLD.ustid != NEW.ustid) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"ustid":', '"', NEW.ustid, '"');
	END IF;

	IF (OLD.phone != NEW.phone) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"phone":', '"', NEW.phone, '"');
	END IF;

	IF (OLD.additional_address_line1 != NEW.additional_address_line1) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"additional_address_line1":', '"', NEW.additional_address_line1, '"');
	END IF;

	IF (OLD.additional_address_line2 != NEW.additional_address_line2) THEN
		SET @changes = 1;
		SET @json = CONCAT(@json, ",");
		SET @json = CONCAT(@json, '"additional_address_line2":', '"', NEW.additional_address_line2, '"');
	END IF;

	SET @json = CONCAT(@json, "}");

	IF (@changes > 0) THEN
		INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 3, OLD.user_id, 2);
	END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`supersync`@`%`*/ /*!50003 TRIGGER `before_s_user_addresses_delete` BEFORE DELETE ON `s_user_addresses`
FOR EACH ROW
BEGIN
	-- Diese Prozedur wurde automatisch generiert. Bitte nicht bearbeiten!
	SET @json = "{";
	SET @json = CONCAT(@json, '"user_id":', '"', OLD.user_id, '"');
	SET @json = CONCAT(@json, "}");

	INSERT INTO asmc_changelog (`data`, `changeDate`, `modelTypeID`, `modelID`, `actionID`) VALUES (@json, NOW(), 3, OLD.user_id, 3);
END */;;
DELIMITER ;
CREATE TABLE `s_user_addresses_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `address_id` int(11) NOT NULL,
  `text1` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text2` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text3` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text4` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text5` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text6` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `is_fieldpost` int(1) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `address_id` (`address_id`),
  CONSTRAINT `s_user_addresses_attributes_ibfk_1` FOREIGN KEY (`address_id`) REFERENCES `s_user_addresses` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=112244 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_user_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userID` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `userID` (`userID`),
  CONSTRAINT `s_user_attributes_ibfk_1` FOREIGN KEY (`userID`) REFERENCES `s_user` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=83476 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_user_billingaddress` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userID` int(11) NOT NULL DEFAULT 0,
  `company` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `department` varchar(35) COLLATE utf8_unicode_ci NOT NULL,
  `salutation` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `firstname` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `lastname` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  `street` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zipcode` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(70) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
  `countryID` int(11) NOT NULL DEFAULT 0,
  `stateID` int(11) DEFAULT NULL,
  `ustid` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `additional_address_line1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `additional_address_line2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `title` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `userID` (`userID`)
) ENGINE=InnoDB AUTO_INCREMENT=657938 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_user_billingaddress_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `billingID` int(11) DEFAULT NULL,
  `text1` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text2` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text3` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text4` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text5` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text6` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `billingID` (`billingID`),
  CONSTRAINT `s_user_billingaddress_attributes_ibfk_1` FOREIGN KEY (`billingID`) REFERENCES `s_user_billingaddress` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_user_shippingaddress` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userID` int(11) NOT NULL DEFAULT 0,
  `company` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `department` varchar(35) COLLATE utf8_unicode_ci NOT NULL,
  `salutation` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `firstname` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `lastname` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  `street` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `zipcode` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(70) COLLATE utf8_unicode_ci NOT NULL,
  `countryID` int(11) DEFAULT NULL,
  `stateID` int(11) DEFAULT NULL,
  `additional_address_line1` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `additional_address_line2` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `title` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `userID` (`userID`)
) ENGINE=InnoDB AUTO_INCREMENT=657938 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `s_user_shippingaddress_attributes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `shippingID` int(11) DEFAULT NULL,
  `text1` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text2` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text3` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text4` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text5` text COLLATE utf8_unicode_ci DEFAULT NULL,
  `text6` text COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `shippingID` (`shippingID`),
  CONSTRAINT `s_user_shippingaddress_attributes_ibfk_1` FOREIGN KEY (`shippingID`) REFERENCES `s_user_shippingaddress` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `swag_payment_paypal_unified_settings_express` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `shop_id` int(11) NOT NULL,
  `detail_active` tinyint(1) NOT NULL,
  `cart_active` tinyint(1) NOT NULL,
  `off_canvas_active` tinyint(1) NOT NULL,
  `login_active` tinyint(1) NOT NULL,
  `listing_active` tinyint(1) NOT NULL,
  `button_style_color` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `button_style_shape` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `button_style_size` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `button_locale` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
  `submit_cart` tinyint(1) NOT NULL,
  `intent` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `swag_payment_paypal_unified_settings_installments` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `shop_id` int(11) NOT NULL,
  `advertise_installments` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `swag_payment_paypal_unified_settings_plus` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `shop_id` int(11) NOT NULL,
  `active` tinyint(1) DEFAULT NULL,
  `restyle` tinyint(1) NOT NULL,
  `integrate_third_party_methods` tinyint(1) NOT NULL,
  `payment_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `payment_description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
CREATE TABLE `wbm_data_layer_modules` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `module` varchar(255) NOT NULL,
  `variables` longtext DEFAULT NULL,
  `predispatch` tinyint(1) DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `module_UNIQUE` (`module`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4;
CREATE TABLE `wbm_data_layer_properties` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `module` varchar(255) NOT NULL,
  `parentID` int(11) NOT NULL DEFAULT 0,
  `name` varchar(255) NOT NULL,
  `value` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=134 DEFAULT CHARSET=utf8mb4;


