<commit_before><?php

define("SQL_PRODUCT_LIST",		"SELECT p.name, p.id, p.active, r.version
					 FROM products AS p
					 LEFT JOIN releases AS r ON p.id = r.product_id
					 LEFT JOIN releases AS r2 ON (r.product_id = r2.product_id AND r2.id > r.id)
					 WHERE r2.id IS NULL");

define("SQL_ADD_CHANGE", 		"INSERT INTO changes (id, date, message, is_bug)
					 VALUES (NULL, CURDATE(), ?, ?)");

define("SQL_APPEND_CHANGELOG",		"INSERT INTO changelog (id, change_id, release_id, product_id)
					 VALUES (NULL, ?, NULL, ?)");

define("SQL_GET_PRODUCT_NAME",		"SELECT name FROM products WHERE id = ?");

define("SQL_GET_CHANGELOG",		"SELECT c.date, c.message, c.is_bug, r.version, r.date
					 FROM changelog AS cl
					 INNER JOIN changes AS c ON cl.change_id = c.id
					 LEFT JOIN releases AS r on cl.release_id = r.id
					 WHERE cl.product_id = ?
					 ORDER BY c.id DESC");

define("SQL_ADD_RELEASE", 		"INSERT INTO releases (id, product_id, version, date)
			   		 VALUES (NULL, ?, ?, CURDATE())");

define("SQL_UPDATE_RELEASE_IDS",	"UPDATE changelog SET release_id = ?
					 WHERE release_id IS NULL AND product_id = ?");

define("SQL_ADD_PRODUCT", 		"INSERT INTO products (id, name, active)
					 VALUES (NULL, ?, 1)");

define("SQL_ACTIVATE_ALL_PRODUCTS", 	"UPDATE products SET active = 1");

define("SQL_DEACTIVATE_PRODUCT", 	"UPDATE products SET active = 0 WHERE id = ?");

?><commit_msg>Adding table prefixes.<commit_after><?php

define("SQL_PRODUCT_LIST",		"SELECT p.name, p.id, p.active, r.version
					 FROM scl_products AS p
					 LEFT JOIN scl_releases AS r ON p.id = r.product_id
					 LEFT JOIN scl_releases AS r2 ON (r.product_id = r2.product_id AND r2.id > r.id)
					 WHERE r2.id IS NULL");

define("SQL_ADD_CHANGE", 		"INSERT INTO scl_changes (id, date, message, is_bug)
					 VALUES (NULL, CURDATE(), ?, ?)");

define("SQL_APPEND_CHANGELOG",		"INSERT INTO scl_changelog (id, change_id, release_id, product_id)
					 VALUES (NULL, ?, NULL, ?)");

define("SQL_GET_PRODUCT_NAME",		"SELECT name FROM scl_products WHERE id = ?");

define("SQL_GET_CHANGELOG",		"SELECT c.date, c.message, c.is_bug, r.version, r.date
					 FROM scl_changelog AS cl
					 INNER JOIN scl_changes AS c ON cl.change_id = c.id
					 LEFT JOIN scl_releases AS r on cl.release_id = r.id
					 WHERE cl.product_id = ?
					 ORDER BY c.id DESC");

define("SQL_ADD_RELEASE", 		"INSERT INTO scl_releases (id, product_id, version, date)
			   		 VALUES (NULL, ?, ?, CURDATE())");

define("SQL_UPDATE_RELEASE_IDS",	"UPDATE scl_changelog SET release_id = ?
					 WHERE release_id IS NULL AND product_id = ?");

define("SQL_ADD_PRODUCT", 		"INSERT INTO scl_products (id, name, active)
					 VALUES (NULL, ?, 1)");

define("SQL_ACTIVATE_ALL_PRODUCTS", 	"UPDATE scl_products SET active = 1");

define("SQL_DEACTIVATE_PRODUCT", 	"UPDATE scl_products SET active = 0 WHERE id = ?");

?>
{'fraction_non_alphanumeric': 0.12861624259323806, 'fraction_numerical': 0.004879749041477867, 'mean_word_length': 3.783333333333333, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '875314', 'n_tokens_mistral': 1193, 'n_tokens_neox': 1007, 'n_words': 286}