<?xml version="1.0"?>

<data>
	<tables-sql><![CDATA[create table Learn_LFActivity (
	indexNumber LONG not null primary key,
	id_ VARCHAR(512) null,
	packageID INTEGER,
	organizationID VARCHAR(512) null,
	parentID VARCHAR(512) null,
	title TEXT null,
	identifierRef TEXT null,
	resourceParameters TEXT null,
	hideLMSUI TEXT null,
	visible BOOLEAN,
	objectivesGlobalToSystem BOOLEAN,
	sharedDataGlobalToSystem BOOLEAN,
	masteryScore TEXT null,
	maxTimeAllowed TEXT null
);

create table Learn_LFActivityDataMap (
	id_ LONG not null primary key,
	packageID INTEGER,
	activityID VARCHAR(512) null,
	targetId TEXT null,
	readSharedData BOOLEAN,
	writeSharedData BOOLEAN
);

create table Learn_LFActivityState (
	id_ LONG not null primary key,
	packageID INTEGER,
	activityID TEXT null,
	active_ BOOLEAN,
	suspended BOOLEAN,
	attemptCompleted BOOLEAN null,
	attemptCompletionAmount NUMERIC(20,2),
	attemptAbsoluteDuration NUMERIC(20,2),
	attemptExperiencedDuration NUMERIC(20,2),
	activityAbsoluteDuration NUMERIC(20,2),
	activityExperiencedDuration NUMERIC(20,2),
	attemptCount INTEGER,
	activityStateNodeID INTEGER null,
	activityStateTreeID INTEGER null
);

create table Learn_LFActivityStateNode (
	id_ LONG not null primary key,
	parentID INTEGER null,
	treeID INTEGER,
	availableChildrenIDs TEXT null
);

create table Learn_LFActivityStateTree (
	id_ LONG not null primary key,
	currentActivityID TEXT null,
	suspendedActivityID TEXT null,
	attemptID INTEGER
);

create table Learn_LFAnswer (
	id_ LONG not null primary key,
	description TEXT null,
	correct BOOLEAN,
	questionId INTEGER,
	rangeFrom NUMERIC(20,2),
	rangeTo NUMERIC(20,2),
	matchingText TEXT null,
	answerPosition INTEGER,
	answerType INTEGER
);

create table Learn_LFAttempt (
	id_ LONG not null primary key,
	userID INTEGER,
	packageID INTEGER,
	organizationID TEXT null,
	isComplete BOOLEAN
);

create table Learn_LFAttemptData (
	id_ LONG not null primary key,
	dataKey TEXT null,
	dataValue TEXT null,
	attemptID INTEGER,
	activityID TEXT null
);

create table Learn_LFBigDecimal (
	id_ LONG not null primary key,
	decimal_ NUMERIC(20,2),
	text_ VARCHAR(75) null
);


create table Learn_LFChildrenSelection (
	id_ LONG not null primary key,
	sequencingID INTEGER,
	takeCount INTEGER,
	takeTimingOnEachAttempt TEXT null,
	reorderOnEachAttempt TEXT null
);

create table Learn_LFConditionRule (
	id_ LONG not null primary key,
	sequencingID INTEGER,
	combination TEXT null,
	ruleType TEXT null,
	action TEXT null
);

create table Learn_LFCourse (
	id_ LONG not null primary key,
	courseID INTEGER,
	userID INTEGER,
	grade TEXT null,
	comment_ TEXT null
);

create table Learn_LFFileStorage (
	id_ LONG not null primary key,
	filename TEXT null,
	content TEXT null
);

create table Learn_LFGlobalObjectiveState (
	id_ LONG not null primary key,
	satisfied BOOLEAN,
	normalizedMeasure NUMERIC(20,2),
	attemptCompleted BOOLEAN,
	mapKey TEXT null,
	treeID INTEGER
);

create table Learn_LFObjective (
	lfId LONG not null primary key,
	sequencingID INTEGER,
	satisfiedByMeasure BOOLEAN,
	identifier TEXT null,
	minNormalizedMeasure NUMERIC(20,2),
	isPrimary BOOLEAN
);

create table Learn_LFObjectiveMap (
	id_ LONG not null primary key,
	objectiveID INTEGER,
	readSatisfiedStatusFrom TEXT null,
	readNormalizedMeasureFrom TEXT null,
	writeSatisfiedStatusTo TEXT null,
	writeNormalizedMeasureTo TEXT null,
	readRawScoreFrom TEXT null,
	readMinScoreFrom TEXT null,
	readMaxScoreFrom TEXT null,
	readCompletionStatusFrom TEXT null,
	readProgressMeasureFrom TEXT null,
	writeRawScoreTo TEXT null,
	writeMinScoreTo TEXT null,
	writeMaxScoreTo TEXT null,
	writeCompletionStatusTo TEXT null,
	writeProgressMeasureTo TEXT null
);

create table Learn_LFObjectiveState (
	id_ LONG not null primary key,
	satisfied BOOLEAN,
	normalizedMeasure NUMERIC(20,2),
	mapKey TEXT null,
	activityStateID INTEGER,
	objectiveID INTEGER
);

create table Learn_LFPackage (
	id_ LONG not null primary key,
	defaultOrganizationID TEXT null,
	title TEXT null,
	base TEXT null,
	resourcesBase TEXT null,
	summary TEXT null,
	assetRefID LONG null,
	courseID INTEGER null
);

create table Learn_LFPackageScopeRule (
	id_ LONG not null primary key,
	packageID INTEGER,
	scope TEXT null,
	scopeID TEXT null,
	visibility BOOLEAN,
	isDefault BOOLEAN null
);

create table Learn_LFPlayerScopeRule (
	id_ LONG not null primary key,
	playerID TEXT null,
	scope TEXT null
);

create table Learn_LFQuestion (
	id_ LONG not null primary key,
	categoryId INTEGER null,
	title TEXT null,
	description TEXT null,
	explanationText TEXT null,
	forceCorrectCount BOOLEAN,
	caseSensitive BOOLEAN,
	questionType INTEGER,
	courseId INTEGER null,
	arrangementIndex INTEGER
);

create table Learn_LFQuestionCategory (
	id_ LONG not null primary key,
	title TEXT null,
	description TEXT null,
	parentId INTEGER null,
	courseId INTEGER null,
	arrangementIndex INTEGER
);

create table Learn_LFQuiz (
	id_ LONG not null primary key,
	title TEXT null,
	description TEXT null,
	welcomePageContent TEXT null,
	finalPageContent TEXT null,
	courseID INTEGER null
);

create table Learn_LFQuizQuestion (
	id_ LONG not null primary key,
	quizId INTEGER,
	categoryId INTEGER null,
	questionId INTEGER,
	questionType TEXT null,
	title TEXT null,
	url TEXT null,
	plainText TEXT null,
	arrangementIndex INTEGER
);

create table Learn_LFQuizQuestionCategory (
	id_ LONG not null primary key,
	title TEXT null,
	description TEXT null,
	quizId INTEGER,
	parentId INTEGER null,
	arrangementIndex INTEGER
);

create table Learn_LFRollupContribution (
	id_ LONG not null primary key,
	sequencingID INTEGER,
	contributeToSatisfied TEXT null,
	contributeToNotSatisfied TEXT null,
	contributeToCompleted TEXT null,
	contributeToIncomplete TEXT null,
	objectiveMeasureWeight NUMERIC(20,2),
	measureSatisfactionIfActive BOOLEAN
);

create table Learn_LFRollupRule (
	id_ LONG not null primary key,
	sequencingID INTEGER,
	combination TEXT null,
	childActivitySet TEXT null,
	minimumCount INTEGER null,
	minimumPercent NUMERIC(20,2),
	action TEXT null
);

create table Learn_LFRuleCondition (
	id_ LONG not null primary key,
	conditionType TEXT null,
	objectiveId TEXT null,
	measureThreshold NUMERIC(20,2),
	inverse BOOLEAN,
	rollupRuleID INTEGER,
	conditionRuleID INTEGER
);

create table Learn_LFResource (
	id_ LONG not null primary key,
	packageID INTEGER,
	scormType TEXT null,
	resourceID TEXT null,
	href TEXT null,
	base TEXT null
);

create table Learn_LFSequencing (
	id_ LONG not null primary key,
	packageID INTEGER,
	activityID VARCHAR(512) null,
	sharedId TEXT null,
	sharedSequencingIdReference TEXT null,
	onlyCurrentAttemptObjectiveProgressForChildren BOOLEAN,
	onlyCurrentAttemptAttemptProgressForChildren BOOLEAN,
	attemptLimit INTEGER null,
	durationLimitInMilliseconds LONG null,
	rollupContributionID INTEGER,
	preventChildrenActivation BOOLEAN,
	constrainChoice BOOLEAN
);

create table Learn_LFSequencingPermissions (
	id_ LONG not null primary key,
	sequencingID INTEGER,
	choiceForChildren BOOLEAN,
	choiceForNonDescendants BOOLEAN,
	flowForChildren BOOLEAN,
	forwardOnlyForChildren BOOLEAN
);

create table Learn_LFSequencingTracking (
	id_ LONG not null primary key,
	sequencingID INTEGER,
	completionSetByContent BOOLEAN,
	objectiveSetByContent BOOLEAN
);

create table Learn_LFUser (
	lfid LONG not null primary key,
	id_ INTEGER,
	name TEXT null,
	preferredAudioLevel DOUBLE,
	preferredLanguage TEXT null,
	preferredDeliverySpeed DOUBLE,
	preferredAudioCaptioning INTEGER
);]]></tables-sql>
	<sequences-sql><![CDATA[]]></sequences-sql>
	<indexes-sql><![CDATA[create index IX_512B8525 on Learn_FileStorage (filename);

create index IX_EF6F46A7 on Learn_LFActivity (packageID);
create index IX_64BC258D on Learn_LFActivity (packageID, id_);
create index IX_A1B5A429 on Learn_LFActivity (packageID, organizationID);
create index IX_AF1B4EE0 on Learn_LFActivity (packageID, parentID);

create index IX_26F2265B on Learn_LFActivityDataMap (packageID, activityID);

create index IX_47E7C56D on Learn_LFActivityState (activityID, activityStateNodeID, activityStateTreeID);
create index IX_87C4F2FA on Learn_LFActivityState (activityID, activityStateTreeID);
create index IX_3BDCAFB5 on Learn_LFActivityState (activityID, activityStateTreeID, activityStateNodeID);
create index IX_37DEB47C on Learn_LFActivityState (activityStateNodeID);
create index IX_E1BF8EDA on Learn_LFActivityState (activityStateNodeID, activityID);
create index IX_F6ACEB0F on Learn_LFActivityState (activityStateNodeID, activityStateTreeID);

create index IX_679A7462 on Learn_LFActivityStateNode (treeID);
create index IX_2400CEDB on Learn_LFActivityStateNode (treeID, parentID);

create index IX_9CD3C427 on Learn_LFActivityStateTree (attemptID);

create index IX_52772CEE on Learn_LFAnswer (questionId);

create index IX_B2CCF333 on Learn_LFAttempt (packageID);
create index IX_68CEBF78 on Learn_LFAttempt (userID);
create index IX_FC24D590 on Learn_LFAttempt (userID, packageID, isComplete);

create index IX_36D2C30E on Learn_LFAttemptData (attemptID, activityID);
create index IX_86C2D8F7 on Learn_LFAttemptData (attemptID, activityID, dataKey);
create index IX_1634FB95 on Learn_LFAttemptData (attemptID, dataKey);

create index IX_637C536E on Learn_LFBigDecimal (decimal_);
create index IX_6456716F on Learn_LFBigDecimal (sum);

create index IX_BEA402B on Learn_LFChildrenSelection (sequencingID);

create index IX_F3405A15 on Learn_LFConditionRule (sequencingID);
create index IX_B7D49D9F on Learn_LFConditionRule (sequencingID, ruleType);

create index IX_DCE34E3A on Learn_LFCourse (courseID, userID);
create index IX_F1E3EE51 on Learn_LFCourse (grade);

create index IX_3FD4D2B on Learn_LFFileStorage (filename);

create index IX_90049AA3 on Learn_LFGlobalObjectiveState (treeID);
create index IX_218DD1BA on Learn_LFGlobalObjectiveState (treeID, mapKey);

create index IX_B0A8C0B1 on Learn_LFObjective (sequencingID, isPrimary);
create index IX_7FF8180E on Learn_LFObjective (sequencingID, isPrimary, identifier);

create index IX_CED95AC6 on Learn_LFObjectiveMap (objectiveID);

create index IX_891A0C11 on Learn_LFObjectiveState (activityID);
create index IX_EC87417A on Learn_LFObjectiveState (activityStateID);
create index IX_84DECB43 on Learn_LFObjectiveState (mapKey, activityStateID);

create index IX_5C0470E9 on Learn_LFPackage (assetRefID);
create index IX_FD0817C1 on Learn_LFPackage (courseID);
create index IX_75B49D9D on Learn_LFPackage (id_);
create index IX_6DFDA147 on Learn_LFPackage (id_, courseID);

create index IX_5E072CCC on Learn_LFPackageScopeRule (packageID);
create index IX_B73E9B27 on Learn_LFPackageScopeRule (packageID, scope, scopeID);
create index IX_BED05C0 on Learn_LFPackageScopeRule (scope, scopeID);
create index IX_53EB15E7 on Learn_LFPackageScopeRule (scope, scopeID, isDefault);
create index IX_DF43FEC6 on Learn_LFPackageScopeRule (scope, scopeID, visibility);

create index IX_7941DC50 on Learn_LFPlayerScopeRule (playerID);

create index IX_7A8116B8 on Learn_LFQuestion (courseId, categoryId);

create index IX_35F00169 on Learn_LFQuestionCategory (courseId);
create index IX_D4CB7742 on Learn_LFQuestionCategory (courseId, parentId);

create index IX_7B90DA9A on Learn_LFQuiz (courseID);
create index IX_52F44A58 on Learn_LFQuiz (title);

create index IX_ED2AA2FA on Learn_LFQuizQuestion (quizId);
create index IX_EB6662E7 on Learn_LFQuizQuestion (quizId, categoryId);

create index IX_B1D50698 on Learn_LFQuizQuestionCategory (quizId);
create index IX_43EB0DB1 on Learn_LFQuizQuestionCategory (quizId, parentId);

create index IX_632D4C08 on Learn_LFResource (packageID);
create index IX_C88C6DE5 on Learn_LFResource (packageID, resourceID);

create index IX_61DEB730 on Learn_LFRollupContribution (sequencingID);

create index IX_E92CEF1C on Learn_LFRollupRule (sequencingID);

create index IX_27094572 on Learn_LFRuleCondition (conditionRuleID);
create index IX_C2743893 on Learn_LFRuleCondition (rollupRuleID);

create index IX_22BC4F76 on Learn_LFSequencing (packageID, activityID);

create index IX_E922EFC4 on Learn_LFSequencingPermissions (sequencingID);

create index IX_546EB23D on Learn_LFSequencingTracking (sequencingID);

create index IX_CBB67CEE on Learn_LFUser (id_);]]></indexes-sql>
</data>