* $Date:: $ *
* $Tag:: 0.2.1-FINAL $ *
* $Author:: $ *
- * Needs to be in all Files and every File needs "svn propset *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* @TODO AbisZED: Which charset? *
* @TODO Ad-Magnet: Layer(klick?). Layerviews.Skybannerklick/-view, *
`network_charset` VARCHAR(20) NOT NULL DEFAULT 'UTF-8',
UNIQUE (`network_short_name`),
PRIMARY KEY (`network_id`)
-) TYPE={?_TABLE_TYPE?} COMMENT='Network data'");
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Network data'");
// Types the network provider is supporting (e.g. Forced-Banner and so on)
// @TODO network_type_handle is an internal name and needs documentation
`network_type_banner_url` VARCHAR(255) NULL DEFAULT NULL,
UNIQUE `provider_type` (`network_id`,`network_type_handle`),
PRIMARY KEY (`network_type_id`)
-) TYPE={?_TABLE_TYPE?} COMMENT='Types provideable by networks'");
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Types provideable by networks'");
// HTTP parameters (names) for URLs
addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_request_params`');
UNIQUE `provider_type_key` (`network_id`,`network_type_id`,`request_param_key`),
UNIQUE `provider_type_value` (`network_id`,`network_type_id`,`request_param_value`),
PRIMARY KEY (`network_param_id`)
-) TYPE={?_TABLE_TYPE?} COMMENT='Request parameters for GET/POST request'");
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Request parameters for GET/POST request'");
// Error status codes
addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_error_codes`');
UNIQUE `code_type` (`network_type_code_value`,`network_type_id`),
INDEX (`network_type_id`),
PRIMARY KEY (`network_type_code_id`)
-) TYPE={?_TABLE_TYPE?} COMMENT='Error codes for all types'");
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Error codes for all types'");
// Code types (internal table)
addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_error_types`');
`network_code` VARCHAR(100) NOT NULL DEFAULT 'INVALID_CODE',
UNIQUE (`network_code`),
PRIMARY KEY (`network_code_id`)
-) TYPE={?_TABLE_TYPE?} COMMENT='Error types, generic data, DO NOT ALTER!'");
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Error types, generic data, DO NOT ALTER!'");
// Valid translation keys (we hate hard-coded arrays, you see?)
addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_translations`');
`network_translation_name` VARCHAR(100) NOT NULL DEFAULT '',
UNIQUE (`network_translation_name`),
PRIMARY KEY (`network_translation_id`)
-) TYPE={?_TABLE_TYPE?} COMMENT='Translations for array keys, generic data, DO NOT ALTER!'");
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Translations for array keys, generic data, DO NOT ALTER!'");
// Array-Element translation tables per type/provider
addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_api_translation`');
UNIQUE `provider_type_key` (`network_id`,`network_type_id`,`network_api_index`),
INDEX (`sort`),
PRIMARY KEY (`network_api_id`)
-) TYPE={?_TABLE_TYPE?} COMMENT='Translation of API responses, generic data, DO NOT ALTER!'");
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Translation of API responses, generic data, DO NOT ALTER!'");
// Data from the webmaster (you!)
addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_config`');
UNIQUE `network_affiliate` (`network_id`,`network_affiliate_id`),
UNIQUE `affiliate_site` (`network_affiliate_id`,`network_site_id`),
PRIMARY KEY (`network_id`)
-) TYPE={?_TABLE_TYPE?} COMMENT='Configuration data from the webmaster (you!)'");
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Configuration data from the webmaster (you!)'");
// Configuration data for e.g. reload-time
addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_types_config`');
`allow_erotic` VARCHAR(10) NOT NULL DEFAULT '',
UNIQUE `provider_type` (`network_id`,`network_type_id`),
PRIMARY KEY (`network_data_id`)
-) TYPE={?_TABLE_TYPE?} COMMENT='Configuration data for every type (e.g. reload-time)'");
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Configuration data for every type (e.g. reload-time)'");
// Cache for queried APIs. Re-check depends on config
// `network_cache_refresh` in seconds or if set to zero, full day
`network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
`network_cache_data` MEDIUMBLOB,
-`network_cache_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
+`network_cache_timestamp` TIMESTAMP NULL DEFAULT NULL,
UNIQUE `provider_type` (`network_id`,`network_type_id`),
PRIMARY KEY (`network_cache_id`)
-) TYPE={?_TABLE_TYPE?} COMMENT='Cache for all queried APIs'");
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Cache for all queried APIs'");
// Reload locks for several types
addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_reloads`');
`network_inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
UNIQUE `provider_type` (`network_id`,`network_type_id`),
PRIMARY KEY (`network_reload_id`)
-) TYPE={?_TABLE_TYPE?} COMMENT='Reload locks'");
+) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Reload locks'");
// Insert API response array translations, these will be used for calling the right filter function
addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_translations` (`network_translation_name`) VALUES
// API array elements - ADCocktail
// API array elements - AdConvention
- addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`, `network_type_id`, `network_api_index`, `sort`) VALUES
+(30, 292, 1, 1),
+(30, 292, 2, 2),
+(30, 292, 4, 3),
+(30, 292, 5, 4),
+(30, 292, 6, 5),
+(30, 292, 10, 6),
+(30, 293, 1, 1),
+(30, 293, 2, 2),
+(30, 293, 4, 3),
+(30, 293, 5, 4),
+(30, 293, 6, 5),
+(30, 293, 10, 6),
+(30, 294, 1, 1),
+(30, 294, 2, 2),
+(30, 294, 4, 3),
+(30, 294, 5, 4),
+(30, 294, 6, 5),
+(30, 295, 1, 1),
+(30, 295, 2, 2),
+(30, 295, 4, 3),
+(30, 295, 5, 4),
+(30, 295, 6, 5),
+(30, 296, 1, 1),
+(30, 296, 2, 2),
+(30, 296, 4, 3),
+(30, 296, 5, 4),
+(30, 296, 6, 5),
+(30, 297, 1, 1),
+(30, 297, 2, 2),
+(30, 297, 4, 3),
+(30, 297, 5, 4),
+(30, 297, 6, 5),
+(30, 298, 1, 1),
+(30, 298, 2, 2),
+(30, 298, 4, 3),
+(30, 298, 5, 4),
+(30, 298, 6, 5),
+(30, 299, 1, 1),
+(30, 299, 2, 2),
+(30, 299, 4, 3),
+(30, 299, 5, 4),
+(30, 299, 6, 5),
+(30, 299, 10, 6),
+(30, 300, 1, 1),
+(30, 300, 2, 2),
+(30, 300, 4, 3),
+(30, 300, 5, 4),
+(30, 300, 6, 5),
+(30, 300, 10, 6),
+(30, 301, 1, 1),
+(30, 301, 2, 2),
+(30, 301, 4, 3),
+(30, 301, 5, 4),
+(30, 301, 6, 5),
+(30, 301, 10, 6),
+(30, 301, 9, 7)");
// API array elements - AdPaid
addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_network_api_translation` (`network_id`, `network_type_id`, `network_api_index`, `sort`) VALUES