<commit_before><commit_msg>[feat] Adding table for tracking user/authenticator data<commit_after><?php

use Hubzero\Content\Migration\Base;

// No direct access
defined('_HZEXEC_') or die();

/**
 * Migration script for installing #__auth_link_data table
 **/
class Migration20180419000000Core extends Base
{
	/**
	 * Up
	 **/
	public function up()
	{
		if (!$this->db->tableExists('#__auth_link_data'))
		{
			$query = "CREATE TABLE `#__auth_link_data` (
			  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
			  `link_id` int(11) NOT NULL DEFAULT '0',
			  `modified` datetime DEFAULT NULL,
			  `domain_key` varchar(255) DEFAULT NULL,
			  `domain_value` text,
			  PRIMARY KEY (`id`),
			  KEY `idx_link_id` (`link_id`)
			) ENGINE=MyISAM DEFAULT CHARSET=utf8;";

			$this->db->setQuery($query);
			$this->db->query();
		}
	}

	/**
	 * Down
	 **/
	public function down()
	{
		if ($this->db->tableExists('#__auth_link_data'))
		{
			$query = "DROP TABLE IF EXISTS `#__auth_link_data`;";
			$this->db->setQuery($query);
			$this->db->query();
		}
	}
}
{'fraction_non_alphanumeric': 0.16634980988593157, 'fraction_numerical': 0.021863117870722433, 'mean_word_length': 3.764705882352941, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '1683344', 'n_tokens_mistral': 447, 'n_tokens_neox': 375, 'n_words': 82}