PRIMARY KEY (`network_cache_id`)
) TYPE={?_TABLE_TYPE?} COMMENT='Cache for all queried APIs'");
+ // Reload locks for several types
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_reloads`');
+ addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_reloads` (
+`network_reload_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`network_reload_lock` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0,
+`network_inserted` TIMESTAMP NOT NULL CURRENT_TIMESTAMP(),
+UNIQUE `provider_type` (`network_id`,`network_type_id`),
+PRIMARY KEY (`network_reload_id`)
+) TYPE={?_TABLE_TYPE?} COMMENT='Reload locks'");
+
// Insert error code types
// - Affiliate id or interface password wrong
addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_codes` (`network_code`) VALUES ('AFF_ID_PASS_WRONG')");
addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_config`');
addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_types_config`');
addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_cache`');
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_reloads`');
// Admin menu
addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='network'");