<commit_before><?php

	class extension_uniqueuploadfield extends Extension {

		public function about() {
			return array(
				'name'			=> 'Field: Unique File Upload',
				'version'		=> '1.4',
				'release-date'	=> '2011-06-01',
				'author'		=> array(
					'name'			=> '<NAME>',
					'website'		=> 'http://www.michael-eichelsdoerfer.de',
					'email'			=> '<EMAIL>'
				),
				'description'	=> 'Upload files with unique names, using a unique ID.'
			);
		}

		public function update($previousVersion)
		{
			$symphony_version = Symphony::Configuration()->get('version', 'symphony');
			if(version_compare($symphony_version, '2.0.8RC3', '>=') && version_compare($previousVersion, '1.1', '<'))
			{
				$uniqueupload_entry_tables = Symphony::Database()->fetchCol("field_id", "SELECT `field_id` FROM `tbl_fields_uniqueupload`");
				if(is_array($uniqueupload_entry_tables) && !empty($uniqueupload_entry_tables))
				{
					foreach($uniqueupload_entry_tables as $field)
					{
						Symphony::Database()->query(sprintf(
							"ALTER TABLE `tbl_entries_data_%d` CHANGE `size` `size` INT(11) UNSIGNED NULL DEFAULT NULL",
							$field
						));
					}
				}
			}
		}

		public function uninstall() {
			Symphony::Database()->query("DROP TABLE `tbl_fields_uniqueupload`");
		}

		public function install() {
			return Symphony::Database()->query(
				"CREATE TABLE `tbl_fields_uniqueupload` (
				 `id` int(11) unsigned NOT NULL auto_increment,
				 `field_id` int(11) unsigned NOT NULL,
				 `destination` varchar(255) NOT NULL,
				 `validator` varchar(50),
				  PRIMARY KEY (`id`),
				  KEY `field_id` (`field_id`)
				) ENGINE=MyISAM;"
			);
		}

	}
<commit_msg>Explicitly set CHARSET and COLLATION.<commit_after><?php

	class extension_uniqueuploadfield extends Extension {

		public function about() {
			return array(
				'name'			=> 'Field: Unique File Upload',
				'version'		=> '1.4',
				'release-date'	=> '2011-06-01',
				'author'		=> array(
					'name'			=> '<NAME>',
					'website'		=> 'http://www.michael-eichelsdoerfer.de',
					'email'			=> '<EMAIL>'
				),
				'description'	=> 'Upload files with unique names, using a unique ID.'
			);
		}

		public function update($previousVersion)
		{
			$symphony_version = Symphony::Configuration()->get('version', 'symphony');
			if(version_compare($symphony_version, '2.0.8RC3', '>=') && version_compare($previousVersion, '1.1', '<'))
			{
				$uniqueupload_entry_tables = Symphony::Database()->fetchCol("field_id", "SELECT `field_id` FROM `tbl_fields_uniqueupload`");
				if(is_array($uniqueupload_entry_tables) && !empty($uniqueupload_entry_tables))
				{
					foreach($uniqueupload_entry_tables as $field)
					{
						Symphony::Database()->query(sprintf(
							"ALTER TABLE `tbl_entries_data_%d` CHANGE `size` `size` INT(11) UNSIGNED NULL DEFAULT NULL",
							$field
						));
					}
				}
			}
		}

		public function uninstall() {
			Symphony::Database()->query("DROP TABLE `tbl_fields_uniqueupload`");
		}

		public function install() {
			return Symphony::Database()->query(
				"CREATE TABLE `tbl_fields_uniqueupload` (
				 `id` int(11) unsigned NOT NULL auto_increment,
				 `field_id` int(11) unsigned NOT NULL,
				 `destination` varchar(255) NOT NULL,
				 `validator` varchar(50),
				  PRIMARY KEY (`id`),
				  KEY `field_id` (`field_id`)
				) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;"
			);
		}

	}

{'fraction_non_alphanumeric': 0.15876288659793814, 'fraction_numerical': 0.016494845360824743, 'mean_word_length': 3.6456908344733243, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5407474', 'n_tokens_mistral': 1443, 'n_tokens_neox': 1119, 'n_words': 225}