<?xml version="1.0"?>
<schema version="0.3">
	
	<table name="btForm">
		<field name="bID" type="I">
			<key />
			<unsigned />
		</field>
		<field name="questionSetId" type="I">
			<unsigned />
			<default value="0" />
		</field>
		<field name="surveyName" type="C" size="255">
		</field> 
		<index name="questionSetIdForeign">
			<col>questionSetId</col>
		</index>
		<field name="notifyMeOnSubmission" type="I1">
			<unsigned />
			<notnull />
			<default value="0" />
		</field>
		<field name="recipientEmail" type="C" size="255">
		</field>				
	</table>

	<table name="btFormQuestions">
		<field name="msqID" type="I">
			<key />
			<autoincrement />
			<unsigned />
		</field>
		<field name="questionSetId" type="I">
			<unsigned />
			<default value="0" />
		</field>
		<field name="question" type="C" size="255">
		</field>
		<field name="inputType" type="C" size="255">
		</field>
		<field name="options" type="X">
		</field>
		<field name="position" type="I">
			<unsigned />
			<default value="1000" />
		</field>
	</table>
	
	<table name="btFormAnswerSet">
		<field name="asID" type="I">
			<key />
			<autoincrement />
			<unsigned />
		</field>
		<field name="questionSetId" type="I">
			<unsigned />
			<default value="0" />
		</field>
		<field name="created" type="T">
			<deftimestamp />
		</field>
	</table>
	
	<table name="btFormAnswers">
		<field name="aID" type="I">
			<key />
			<autoincrement />
			<unsigned />
		</field>
		<field name="asID" type="I">
			<unsigned />
			<default value="0" />
		</field>
		<field name="msqID" type="I">
			<unsigned />
			<default value="0" />
		</field>
		<field name="answer" type="C" size="255">
		</field>
		<field name="answerLong" type="X">
		</field>
	</table>
</schema>