Adding database migration framework, and some tests