From e7dbb071b1cd69f5ff990fa3e269227b5425f424 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 3 Nov 2009 18:38:33 +0000 Subject: [PATCH] Table for reload locks added --- inc/extensions/ext-network.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index 3825ec1595..b8a65d727d 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -180,6 +180,18 @@ UNIQUE `provider_type` (`network_id`,`network_type_id`), 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')"); @@ -228,6 +240,7 @@ PRIMARY KEY (`network_cache_id`) 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'"); -- 2.39.5