Sets up database migrations

This patch adds an events table and a meta_data table to track
migrations