Modified SQL.TableCreationScript

I added unique indexes & constraints, and foreign key relationships to the Events, Snapshots, and PipelineState tables.