<commit_before>-- Remove PRIMARY KEY constraint from `hdid`
CREATE TABLE hdids_new(
	hdid TEXT,
	ipid INTEGER NOT NULL,
	FOREIGN KEY (ipid) REFERENCES ipids(ipid)
		ON DELETE SET NULL,
	UNIQUE (hdid, ipid) ON CONFLICT IGNORE
);
INSERT INTO hdids_new SELECT * FROM hdids;
DROP TABLE hdids;
ALTER TABLE hdids_new RENAME TO hdids;

VACUUM;

PRAGMA user_version = 2;
<commit_msg>Increase safety of migration to v2<commit_after>PRAGMA foreign_keys = OFF;

-- Remove PRIMARY KEY constraint from `hdid`
CREATE TABLE hdids_new(
	hdid TEXT,
	ipid INTEGER NOT NULL,
	FOREIGN KEY (ipid) REFERENCES ipids(ipid)
		ON DELETE SET NULL,
	UNIQUE (hdid, ipid) ON CONFLICT IGNORE
);
INSERT INTO hdids_new SELECT * FROM hdids;
DROP TABLE hdids;
ALTER TABLE hdids_new RENAME TO hdids;

PRAGMA foreign_keys = ON;

VACUUM;

PRAGMA user_version = 2;

{'fraction_non_alphanumeric': 0.07021791767554479, 'fraction_numerical': 0.0036319612590799033, 'mean_word_length': 4.823943661971831, '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': '3553032', 'n_tokens_mistral': 345, 'n_tokens_neox': 325, 'n_words': 110}