<commit_before>/* create the RF1 data tables */

drop table if exists rf1_concept;
create table rf1_concept(
	CONCEPTID			VARBINARY (18) NOT NULL,
	CONCEPTSTATUS		TINYINT (2) UNSIGNED NOT NULL,
	FULLYSPECIFIEDNAME	VARCHAR (255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
	CTV3ID				BINARY (5) NOT NULL,
	SNOMEDID			VARBINARY (8) NOT NULL,
	ISPRIMITIVE			TINYINT (1) UNSIGNED NOT NULL,
	SOURCE				BINARY (4) NOT NULL,
key idx_id(CONCEPTID)
) engine=myisam default charset=utf8;


drop table if exists rf1_description;
create table rf1_description(
	DESCRIPTIONID		VARBINARY (18) NOT NULL,
	DESCRIPTIONSTATUS	TINYINT (2) UNSIGNED NOT NULL,
	CONCEPTID			VARBINARY (18) NOT NULL,
	TERM				VARCHAR (255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
	INITIALCAPITALSTATUS TINYINT (1) UNSIGNED NOT NULL,
	DESCRIPTIONTYPE		TINYINT (1) UNSIGNED NOT NULL,
	DEFAULTDESCTYPE		TINYINT (1) UNSIGNED NOT NULL,
	LANGUAGECODE		VARBINARY (8) NOT NULL,
	SOURCE				BINARY(4) NOT NULL,
key idx_id(DESCRIPTIONID),
key idx_status(DESCRIPTIONSTATUS)
) engine=myisam default charset=utf8;

drop table if exists rf1_textdefinition;
create table rf1_textdefinition(
	CONCEPTID			VARBINARY (18) NOT NULL,
	SNOMEDID			VARBINARY (8) NOT NULL,
	FULLYSPECIFIEDNAME	VARCHAR (255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
	DEFINITION			VARCHAR (450) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
	key idx_id(SNOMEDID)
) engine=myisam default charset=utf8;

drop table if exists rf1_relationship;
create table rf1_relationship(
	RELATIONSHIPID		VARBINARY (18) NOT NULL,
	CONCEPTID1			VARBINARY (18) NOT NULL,
	RELATIONSHIPTYPE	VARBINARY (18) NOT NULL,
	CONCEPTID2			VARBINARY (18) NOT NULL,
	CHARACTERISTICTYPE	TINYINT (1) UNSIGNED NOT NULL,
	REFINABILITY		TINYINT (1) UNSIGNED NOT NULL,
	RELATIONSHIPGROUP	TINYINT (2) UNSIGNED NOT NULL,
	SOURCE				BINARY (4) NOT NULL,
	key idx_id(RELATIONSHIPID)
) engine=myisam default charset=utf8;

drop table if exists rf1_stated_relationship;
create table rf1_stated_relationship(
	RELATIONSHIPID		VARBINARY (18) NOT NULL,
	CONCEPTID1			VARBINARY (18) NOT NULL,
	RELATIONSHIPTYPE	VARBINARY (18) NOT NULL,
	CONCEPTID2			VARBINARY (18) NOT NULL,
	CHARACTERISTICTYPE	TINYINT (1) UNSIGNED NOT NULL,
	REFINABILITY		TINYINT (1) UNSIGNED NOT NULL,
	RELATIONSHIPGROUP	TINYINT (2) UNSIGNED NOT NULL,
	SOURCE				BINARY (4) NOT NULL,
	key idx_id(RELATIONSHIPID)
) engine=myisam default charset=utf8;

DROP TABLE IF EXISTS rf1_subsetlist;
CREATE TABLE rf1_subsetlist (
	SubsetId		 VARBINARY (18) NOT NULL,
	SubsetOriginalID VARBINARY (18) NOT NULL,
	SubsetVersion	VARBINARY(4) NOT NULL,
	SubsetName		VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
	SubsetType		TINYINT (1) UNSIGNED NOT NULL,
	LanguageCode	 VARBINARY(5),
	SubsetRealmID	VARBINARY (10) NOT NULL,
	ContextID		TINYINT (1) UNSIGNED NOT NULL
);

DROP TABLE IF EXISTS rf1_subsets;
CREATE TABLE rf1_SUBSETS (
	SubsetId	VARBINARY (18) NOT NULL,
	MemberID	VARBINARY (18) NOT NULL,
	MemberStatusTINYINT (1) UNSIGNED NOT NULL,
	LinkedID	VARCHAR(18) CHARACTER SET latin1 COLLATE latin1_general_ci
);

DROP TABLE IF EXISTS rf1_xmaplist;
CREATE TABLE rf1_xmaplist (
	MapSetId			VARBINARY (18) NOT NULL,
	MapSetName			VARCHAR (255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
	MapSetType			BINARY (1) NOT NULL,
	MapSetSchemeID		VARBINARY (64) NOT NULL,
	MapSetSchemeName	VARCHAR (255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
	MapSetSchemeVersion	VARBINARY(10) NOT NULL,
	MapSetRealmID		VARBINARY (18) NOT NULL,
	MapSetSeparator		BINARY (1) NOT NULL,
	MapSetRuleType		VARBINARY (2) NOT NULL
);

DROP TABLE IF EXISTS rf1_xmaps;
CREATE TABLE rf1_xmaps (
	MapSetID		VARBINARY (18) NOT NULL,
	MapConceptID	VARBINARY (18) NOT NULL,
	MapOption		INTEGER UNSIGNED,
	MapPriority		TINYINT (1) UNSIGNED,
	MapTargetID		VARBINARY (18) NOT NULL,
	MapRule			VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
	MapAdvice		VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL
);

DROP TABLE IF EXISTS rf1_xmaptarget;
CREATE TABLE rf1_xmaptarget (
	TargetID		VARBINARY (18) NOT NULL,
	TargetSchemeID	VARCHAR (64) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
	TargetCodes		VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_general_ci,
	TargetRule		VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
	TargetAdvice	VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL
);

DROP TABLE IF EXISTS rf1_reference;
CREATE TABLE rf1_reference(
	COMPONENTID		VARBINARY (18) NOT NULL,
	REFERENCETYPE	TINYINT (1) NOT NULL,
	REFERENCEDID	VARBINARY (18) NOT NULL,
	SOURCE			BINARY (4) NOT NULL
);

DROP TABLE IF EXISTS rf1_componenthistory;
CREATE TABLE rf1_componenthistory(
	COMPONENTID		VARBINARY (18) NOT NULL,
	RELEASEVERSION	BINARY (8) NOT NULL,
	CHANGETYPE		TINYINT (1) NOT NULL,
	STAT			TINYINT (1) NOT NULL,
	REASON			VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
	SOURCE			BINARY(4) NOT NULL
);<commit_msg>Changed table names to more closely reflect file names<commit_after>/* create the RF1 data tables */

drop table if exists rf1_concept;
create table rf1_concept(
	CONCEPTID			VARBINARY (18) NOT NULL,
	CONCEPTSTATUS		TINYINT (2) UNSIGNED NOT NULL,
	FULLYSPECIFIEDNAME	VARCHAR (255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
	CTV3ID				BINARY (5) NOT NULL,
	SNOMEDID			VARBINARY (8) NOT NULL,
	ISPRIMITIVE			TINYINT (1) UNSIGNED NOT NULL,
	SOURCE				BINARY (4) NOT NULL,
key idx_id(CONCEPTID)
) engine=myisam default charset=utf8;


drop table if exists rf1_description;
create table rf1_description(
	DESCRIPTIONID		VARBINARY (18) NOT NULL,
	DESCRIPTIONSTATUS	TINYINT (2) UNSIGNED NOT NULL,
	CONCEPTID			VARBINARY (18) NOT NULL,
	TERM				VARCHAR (255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
	INITIALCAPITALSTATUS TINYINT (1) UNSIGNED NOT NULL,
	DESCRIPTIONTYPE		TINYINT (1) UNSIGNED NOT NULL,
	DEFAULTDESCTYPE		TINYINT (1) UNSIGNED NOT NULL,
	LANGUAGECODE		VARBINARY (8) NOT NULL,
	SOURCE				BINARY(4) NOT NULL,
key idx_id(DESCRIPTIONID),
key idx_status(DESCRIPTIONSTATUS)
) engine=myisam default charset=utf8;

drop table if exists rf1_textdefinition;
create table rf1_textdefinition(
	CONCEPTID			VARBINARY (18) NOT NULL,
	SNOMEDID			VARBINARY (8) NOT NULL,
	FULLYSPECIFIEDNAME	VARCHAR (255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
	DEFINITION			VARCHAR (450) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
	key idx_id(SNOMEDID)
) engine=myisam default charset=utf8;

drop table if exists rf1_relationship;
create table rf1_relationship(
	RELATIONSHIPID		VARBINARY (18) NOT NULL,
	CONCEPTID1			VARBINARY (18) NOT NULL,
	RELATIONSHIPTYPE	VARBINARY (18) NOT NULL,
	CONCEPTID2			VARBINARY (18) NOT NULL,
	CHARACTERISTICTYPE	TINYINT (1) UNSIGNED NOT NULL,
	REFINABILITY		TINYINT (1) UNSIGNED NOT NULL,
	RELATIONSHIPGROUP	TINYINT (2) UNSIGNED NOT NULL,
	SOURCE				BINARY (4) NOT NULL,
	key idx_id(RELATIONSHIPID)
) engine=myisam default charset=utf8;

drop table if exists rf1_stated_relationship;
create table rf1_stated_relationship(
	RELATIONSHIPID		VARBINARY (18) NOT NULL,
	CONCEPTID1			VARBINARY (18) NOT NULL,
	RELATIONSHIPTYPE	VARBINARY (18) NOT NULL,
	CONCEPTID2			VARBINARY (18) NOT NULL,
	CHARACTERISTICTYPE	TINYINT (1) UNSIGNED NOT NULL,
	REFINABILITY		TINYINT (1) UNSIGNED NOT NULL,
	RELATIONSHIPGROUP	TINYINT (2) UNSIGNED NOT NULL,
	SOURCE				BINARY (4) NOT NULL,
	key idx_id(RELATIONSHIPID)
) engine=myisam default charset=utf8;

DROP TABLE IF EXISTS rf1_subset;
CREATE TABLE rf1_subset (
	SubsetId			VARBINARY (18) NOT NULL,
	SubsetOriginalID	VARBINARY (18) NOT NULL,
	SubsetVersion		VARBINARY(4) NOT NULL,
	SubsetName			VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
	SubsetType			TINYINT (1) UNSIGNED NOT NULL,
	LanguageCode		VARBINARY(5),
	SubsetRealmID		VARBINARY (10) NOT NULL,
	ContextID			TINYINT (1) UNSIGNED NOT NULL
);

DROP TABLE IF EXISTS rf1_subsetmember;
CREATE TABLE rf1_subsetmember (
	SubsetId			VARBINARY (18) NOT NULL,
	MemberID			VARBINARY (18) NOT NULL,
	MemberStatus		TINYINT (1) UNSIGNED NOT NULL,
	LinkedID			VARCHAR(18) CHARACTER SET latin1 COLLATE latin1_general_ci
);

DROP TABLE IF EXISTS rf1_xmapset;
CREATE TABLE rf1_xmapset (
	MapSetId			VARBINARY (18) NOT NULL,
	MapSetName			VARCHAR (255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
	MapSetType			BINARY (1) NOT NULL,
	MapSetSchemeID		VARBINARY (64) NOT NULL,
	MapSetSchemeName	VARCHAR (255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
	MapSetSchemeVersion	VARBINARY(10) NOT NULL,
	MapSetRealmID		VARBINARY (18) NOT NULL,
	MapSetSeparator		BINARY (1) NOT NULL,
	MapSetRuleType		VARBINARY (2) NOT NULL
);

DROP TABLE IF EXISTS rf1_xmap;
CREATE TABLE rf1_xmap (
	MapSetID			VARBINARY (18) NOT NULL,
	MapConceptID		VARBINARY (18) NOT NULL,
	MapOption			INTEGER UNSIGNED,
	MapPriority			TINYINT (1) UNSIGNED,
	MapTargetID			VARBINARY (18) NOT NULL,
	MapRule				VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
	MapAdvice			VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL
);

DROP TABLE IF EXISTS rf1_xmaptarget;
CREATE TABLE rf1_xmaptarget (
	TargetID			VARBINARY (18) NOT NULL,
	TargetSchemeID		VARCHAR (64) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
	TargetCodes			VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_general_ci,
	TargetRule			VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
	TargetAdvice		VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL
);

DROP TABLE IF EXISTS rf1_reference;
CREATE TABLE rf1_reference(
	COMPONENTID			VARBINARY (18) NOT NULL,
	REFERENCETYPE		TINYINT (1) NOT NULL,
	REFERENCEDID		VARBINARY (18) NOT NULL,
	SOURCE				BINARY (4) NOT NULL
);

DROP TABLE IF EXISTS rf1_componenthistory;
CREATE TABLE rf1_componenthistory(
	COMPONENTID		VARBINARY (18) NOT NULL,
	RELEASEVERSION	BINARY (8) NOT NULL,
	CHANGETYPE		TINYINT (1) NOT NULL,
	STAT			TINYINT (1) NOT NULL,
	REASON			VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
	SOURCE			BINARY(4) NOT NULL
);
{'fraction_non_alphanumeric': 0.06102911846828879, 'fraction_numerical': 0.0396888711607499, 'mean_word_length': 5.190740740740741, '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': '3195641', 'n_tokens_mistral': 4275, 'n_tokens_neox': 3976, 'n_words': 1191}