<commit_before>CREATE TABLE users(
	id INT NOT NULL AUTO_INCREMENT,
	PRIMARY KEY(id),
	username VARCHAR(256) NOT NULL,
	email VARCHAR(256),
	password_hash VARCHAR(256) NOT NULL,
	salt VARCHAR(256) NOT NULL,
	avatar_file_path VARCHAR(256),
	locked DATETIME,
	last_activity DATETIME
);

CREATE TABLE user_relationship(
	id INT NOT NULL AUTO_INCREMENT,
	PRIMARY KEY(id),
	creator_user_id INT NOT NULL,
	FOREIGN KEY(creator_user_id) REFERENCES users(id),
	target_user_id INT NOT NULL,
	FOREIGN KEY(target_user_id) REFERENCES users(id),
	relationship_type ENUM('blocked', 'friend', 'requested') NOT NULL
);

CREATE TABLE ip_history(
	id INT NOT NULL AUTO_INCREMENT,
	PRIMARY KEY(id),
	user_id INT NOT NULL,
	FOREIGN KEY(user_id) REFERENCES users(id),
	ip INT UNSIGNED NOT NULL,
	access_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE messages(
	id INT NOT NULL AUTO_INCREMENT,
	PRIMARY KEY(id),
	sent_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
	send_user_id INT NOT NULL,
	FOREIGN KEY(send_user_id) REFERENCES users(id),
	target_user_id INT NOT NULL,
	FOREIGN KEY(target_user_id) REFERENCES users(id),
	message_content MEDIUMTEXT NOT NULL
);<commit_msg>Added ECDH & message key fields to relationship and message tables<commit_after>CREATE TABLE users(
	id INT NOT NULL AUTO_INCREMENT,
	PRIMARY KEY(id),
	username VARCHAR(256) NOT NULL,
	email VARCHAR(256),
	password_hash VARCHAR(256) NOT NULL,
	salt VARCHAR(256) NOT NULL,
	avatar_file_path VARCHAR(256),
	locked DATETIME,
	last_activity DATETIME
);

CREATE TABLE user_relationship(
	id INT NOT NULL AUTO_INCREMENT,
	PRIMARY KEY(id),
	relationship_key VARCHAR(256) NOT NULL,
	creator_user_id INT NOT NULL,
	FOREIGN KEY(creator_user_id) REFERENCES users(id),
	creator_user_key VARCHAR(256) NOT NULL,
	target_user_id INT NOT NULL,
	FOREIGN KEY(target_user_id) REFERENCES users(id),
	target_user_key VARCHAR(256) NOT NULL,
	relationship_type ENUM('blocked', 'friend', 'requested') NOT NULL
);

CREATE TABLE ip_history(
	id INT NOT NULL AUTO_INCREMENT,
	PRIMARY KEY(id),
	user_id INT NOT NULL,
	FOREIGN KEY(user_id) REFERENCES users(id),
	ip INT UNSIGNED NOT NULL,
	access_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE messages(
	id INT NOT NULL AUTO_INCREMENT,
	PRIMARY KEY(id),
	message_key VARCHAR(256) NOT NULL,
	sent_time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
	send_user_id INT NOT NULL,
	FOREIGN KEY(send_user_id) REFERENCES users(id),
	target_user_id INT NOT NULL,
	FOREIGN KEY(target_user_id) REFERENCES users(id),
	message_content MEDIUMTEXT NOT NULL
);
{'fraction_non_alphanumeric': 0.07510813999213527, 'fraction_numerical': 0.01651592607156901, 'mean_word_length': 6.206798866855524, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5120250', 'n_tokens_mistral': 973, 'n_tokens_neox': 903, 'n_words': 275}