<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Queries</key>
	<array>
		<string>DROP TABLE IF EXISTS APDBAdSignalTrack</string>
		<string>DROP TABLE IF EXISTS APDBTriggerSignal</string>
		<string>DROP TABLE IF EXISTS APDBExperimentationReport</string>
		<string>CREATE TABLE IF NOT EXISTS APDBAdSignalTrack (rowid INTEGER PRIMARY KEY, triggerRowId INTEGER NOT NULL, handle TEXT NOT NULL, source INTEGER DEFAULT NULL, adFormatType INTEGER DEFAULT NULL, slot INTEGER DEFAULT NULL, opportunity INTEGER DEFAULT 0, impression INTEGER DEFAULT 0, click INTEGER DEFAULT 0, conversion INTEGER DEFAULT 0, updateTimestamp REAL NOT NULL, FOREIGN KEY (triggerRowId) REFERENCES APDBTrigger(rowid))</string>
		<string>CREATE INDEX idx_AdSignalTrack_triggerRowId ON APDBAdSignalTrack (triggerRowId)</string>
		<string>CREATE TABLE IF NOT EXISTS APDBExperimentationReport (rowid INTEGER PRIMARY KEY, triggerRowId INTERGER NOT NULL, source INTEGER NOT NULL, adFormatType INTEGER NOT NULL, slot INTEGER DEFAULT NULL, day INTEGER NOT NULL, opportunityCount INTEGER DEFAULT 0, impressionCount INTEGER DEFAULT 0, clickCount INTEGER DEFAULT 0, conversionCount INTEGER DEFAULT 0, FOREIGN KEY (triggerRowId) REFERENCES APDBTrigger(rowid) ON DELETE CASCADE)</string>
		<string>CREATE INDEX idx_ExperimentationReport_AdFormat_day ON APDBExperimentationReport (triggerRowId, source, adFormatType, day) WHERE slot IS NULL</string>
		<string>CREATE INDEX idx_ExperimentationReport_AdFormat_day_slot ON APDBExperimentationReport (triggerRowId, source, adFormatType, day, slot) WHERE slot IS NOT NULL</string>
		<string>CREATE INDEX idx_ExperimentationReport_day_source ON APDBExperimentationReport (day, source)</string>
	</array>
</dict>
</plist>
